public final class Raytracing
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Raytracing.CollisionDetector |
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.util.MovingObjectPosition |
intersectIgnoringLiquids(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end)
Standard callback for
raytrace(World, Vec3, Vec3, CollisionDetector),
only checks blocks that have a bounding box and are not liquids. |
static net.minecraft.util.MovingObjectPosition |
intersectIgnoringTransparent(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end)
Checks only blocks that have a bounding box and are not see-through.
|
static net.minecraft.util.MovingObjectPosition |
raytrace(net.minecraft.world.World world,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end)
Trace along the specified line, testing for collision with blocks along the way.
|
static net.minecraft.util.MovingObjectPosition |
raytrace(net.minecraft.world.World world,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end,
Raytracing.CollisionDetector callback)
Trace along the specified line, testing for collision with blocks along the way.
|
public static net.minecraft.util.MovingObjectPosition intersectIgnoringLiquids(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end)
raytrace(World, Vec3, Vec3, CollisionDetector),
only checks blocks that have a bounding box and are not liquids.world - the world to perform the intersection check in.x - the x position of the block to perform the intersection check with.y - the y position of the block to perform the intersection check with.z - the z position of the block to perform the intersection check with.start - the start of the line to intersect the block with.end - the end of the line to intersect the block with.public static net.minecraft.util.MovingObjectPosition intersectIgnoringTransparent(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end)
world - the world to perform the intersection check in.x - the x position of the block to perform the intersection check with.y - the y position of the block to perform the intersection check with.z - the z position of the block to perform the intersection check with.start - the start of the line to intersect the block with.end - the end of the line to intersect the block with.public static net.minecraft.util.MovingObjectPosition raytrace(net.minecraft.world.World world,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end)
Uses the default intersection logic defined in intersectIgnoringLiquids(World, int, int, int, Vec3, Vec3).
world - the world to shoot the ray in.start - the start of the line to trace.end - the end of the line to trace.public static net.minecraft.util.MovingObjectPosition raytrace(net.minecraft.world.World world,
net.minecraft.util.Vec3 start,
net.minecraft.util.Vec3 end,
Raytracing.CollisionDetector callback)
world - the world to shoot the ray in.start - the start of the line to trace.end - the end of the line to trace.callback - the method to call for each potential hit to perform collision logic.