public class RaytraceBlock
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Vector |
direction()
Gets the direction vector of the ray.
|
double |
distance()
Gets the length of the ray.
|
static RaytraceBlock |
set(Point src,
Point dest,
int x,
int y,
int z)
Sets the parameters for the ray trace and returns the
RaytraceBlock instance. |
static RaytraceBlock |
set(Point src,
Vector v,
int x,
int y,
int z)
Sets the parameters for the ray trace and returns the
RaytraceBlock instance. |
static RaytraceBlock |
set(Ray ray,
int x,
int y,
int z)
Sets the parameters for the ray trace and returns the
RaytraceBlock instance. |
static RaytraceBlock |
set(net.minecraft.util.Vec3 src,
net.minecraft.util.Vec3 dest,
int x,
int y,
int z)
Sets the parameters for the ray trace and returns the
RaytraceBlock instance. |
net.minecraft.util.MovingObjectPosition |
trace()
Does the raytracing.
|
net.minecraft.world.World |
world() |
public static RaytraceBlock set(Ray ray, int x, int y, int z)
RaytraceBlock
instance.ray
- the rayx
- the x coordinate of the blocky
- the y coordinate of the blockz
- the z coordinate of the blockRaytraceBlock
instancepublic static RaytraceBlock set(Point src, Vector v, int x, int y, int z)
RaytraceBlock
instance.src
- the srcv
- the vx
- the x coordinate of the blocky
- the y coordinate of the blockz
- the z coordinate of the blockRaytraceBlock
instancepublic static RaytraceBlock set(Point src, Point dest, int x, int y, int z)
RaytraceBlock
instance.src
- the srcdest
- the destx
- the x coordinate of the blocky
- the y coordinate of the blockz
- the z coordinate of the blockRaytraceBlock
instancepublic static RaytraceBlock set(net.minecraft.util.Vec3 src, net.minecraft.util.Vec3 dest, int x, int y, int z)
RaytraceBlock
instance.src
- the srcdest
- the destx
- the x coordinate of the blocky
- the y coordinate of the blockz
- the z coordinate of the blockRaytraceBlock
instancepublic net.minecraft.world.World world()
public Vector direction()
public double distance()
public net.minecraft.util.MovingObjectPosition trace()
MovingObjectPosition
with typeOfHit
BLOCK if a ray hits a block in the way, or MISS if it
reaches dest
without any hit