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.math.RayTraceResult |
intersectIgnoringLiquids(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d end)
Standard callback for
raytrace(World, Vec3d, Vec3d, CollisionDetector),
only checks blocks that have a bounding box and are not liquids. |
static net.minecraft.util.math.RayTraceResult |
intersectIgnoringTransparent(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d end)
Checks only blocks that have a bounding box and are not see-through.
|
static net.minecraft.util.math.RayTraceResult |
raytrace(net.minecraft.world.World world,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d end)
Trace along the specified line, testing for collision with blocks along the way.
|
static net.minecraft.util.math.RayTraceResult |
raytrace(net.minecraft.world.World world,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d end,
Raytracing.CollisionDetector callback)
Trace along the specified line, testing for collision with blocks along the way.
|
public static net.minecraft.util.math.RayTraceResult intersectIgnoringLiquids(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d end)
raytrace(World, Vec3d, Vec3d, CollisionDetector),
only checks blocks that have a bounding box and are not liquids.world - the world to perform the intersection check in.position - the 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.math.RayTraceResult intersectIgnoringTransparent(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d end)
world - the world to perform the intersection check in.position - the 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.math.RayTraceResult raytrace(net.minecraft.world.World world,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d end)
Uses the default intersection logic defined in intersectIgnoringLiquids(World, BlockPos, Vec3d, Vec3d).
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.math.RayTraceResult raytrace(net.minecraft.world.World world,
net.minecraft.util.math.Vec3d start,
net.minecraft.util.math.Vec3d 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.