public class RaytraceWorld extends Raytrace
| Modifier and Type | Class and Description |
|---|---|
static class |
RaytraceWorld.Options
The Class Options.
|
| Modifier and Type | Field and Description |
|---|---|
java.util.HashMap<net.minecraft.util.math.BlockPos,net.minecraft.util.math.RayTraceResult> |
blockPassed
List of blocks passed by the ray trace.
|
int |
options
Options for the ray tracing.
|
| Constructor and Description |
|---|
RaytraceWorld(net.minecraft.world.World world,
Point src,
Point dest)
Instantiates a new
RaytraceWorld. |
RaytraceWorld(net.minecraft.world.World world,
Point src,
Point dest,
int options)
Instantiates a new
RaytraceWorld. |
RaytraceWorld(net.minecraft.world.World world,
Point src,
Vector v)
Instantiates a new
RaytraceWorld. |
RaytraceWorld(net.minecraft.world.World world,
Point src,
Vector v,
int options)
Instantiates a new
RaytraceWorld. |
RaytraceWorld(net.minecraft.world.World world,
Ray ray)
Instantiates a new
RaytraceWorld. |
RaytraceWorld(net.minecraft.world.World world,
Ray ray,
int options)
Instantiates a new
RaytraceWorld. |
| Modifier and Type | Method and Description |
|---|---|
double |
getMin(double x,
double y,
double z)
Gets the minimum value of
x, y, z. |
boolean |
hasOption(int opt)
Checks if the option
opt is set. |
net.minecraft.util.math.RayTraceResult |
rayTraceBlock(net.minecraft.util.math.BlockPos pos,
Point exit)
Raytraces inside an actual block area.
|
void |
setLength(double length)
Sets the length of this
RaytraceWorld. |
net.minecraft.util.math.RayTraceResult |
trace()
Does the raytracing.
|
direction, distance, getClosestHit, getDestination, getSource, tracepublic java.util.HashMap<net.minecraft.util.math.BlockPos,net.minecraft.util.math.RayTraceResult> blockPassed
LOG_BLOCK_PASSED is setpublic int options
public RaytraceWorld(net.minecraft.world.World world,
Ray ray,
int options)
RaytraceWorld.ray - the rayoptions - the optionspublic RaytraceWorld(net.minecraft.world.World world,
Ray ray)
RaytraceWorld.ray - the raypublic RaytraceWorld(net.minecraft.world.World world,
Point src,
Vector v,
int options)
RaytraceWorld.src - the srcv - the voptions - the optionspublic RaytraceWorld(net.minecraft.world.World world,
Point src,
Vector v)
RaytraceWorld.src - the srcv - the vpublic RaytraceWorld(net.minecraft.world.World world,
Point src,
Point dest,
int options)
RaytraceWorld.src - the srcdest - the destoptions - the optionspublic RaytraceWorld(net.minecraft.world.World world,
Point src,
Point dest)
RaytraceWorld.src - the srcdest - the destpublic void setLength(double length)
RaytraceWorld.public boolean hasOption(int opt)
opt is set.opt - the option to checkpublic net.minecraft.util.math.RayTraceResult trace()
RayTraceResult with typeOfHit BLOCK if a ray hits a block in the way, or MISS if it
reaches dest without any hitpublic double getMin(double x,
double y,
double z)
x, y, z.x - the xy - the yz - the zDouble.NaN if x, y and z are all three Double.NaNpublic net.minecraft.util.math.RayTraceResult rayTraceBlock(net.minecraft.util.math.BlockPos pos,
Point exit)
Block.collisionRayTrace(IBlockState, World, BlockPos, net.minecraft.util.math.Vec3d, net.minecraft.util.math.Vec3d)pos - the posexit - the exitRayTraceResult return by block raytrace