Package baritone.api.utils
Class RayTraceUtils
java.lang.Object
baritone.api.utils.RayTraceUtils
- Since:
- 8/25/2018
- Author:
- Brady
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.phys.Vec3inferSneakingEyePosition(net.minecraft.world.entity.Entity entity) static net.minecraft.world.phys.HitResultrayTraceTowards(net.minecraft.world.entity.Entity entity, Rotation rotation, double blockReachDistance) Performs a block raytrace with the specified rotations.static net.minecraft.world.phys.HitResultrayTraceTowards(net.minecraft.world.entity.Entity entity, Rotation rotation, double blockReachDistance, boolean wouldSneak)
-
Method Details
-
rayTraceTowards
public static net.minecraft.world.phys.HitResult rayTraceTowards(net.minecraft.world.entity.Entity entity, Rotation rotation, double blockReachDistance) Performs a block raytrace with the specified rotations. This should only be used when any entity collisions can be ignored, because this method will not recognize if an entity is in the way or not. The local player's block reach distance will be used.- Parameters:
entity- The entity representing the raytrace sourcerotation- The rotation to raytrace towardsblockReachDistance- The block reach distance of the entity- Returns:
- The calculated raytrace result
-
rayTraceTowards
public static net.minecraft.world.phys.HitResult rayTraceTowards(net.minecraft.world.entity.Entity entity, Rotation rotation, double blockReachDistance, boolean wouldSneak) -
inferSneakingEyePosition
public static net.minecraft.world.phys.Vec3 inferSneakingEyePosition(net.minecraft.world.entity.Entity entity)
-