Class RayTraceUtils

java.lang.Object
baritone.api.utils.RayTraceUtils

public final class RayTraceUtils extends Object
Since:
8/25/2018
Author:
Brady
  • 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 source
      rotation - The rotation to raytrace towards
      blockReachDistance - 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)