Class ProjectileUtil
java.lang.Object
net.minecraft.world.entity.projectile.ProjectileUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityHitResult
getEntityHitResult
(Entity shooter, Vec3 startVec, Vec3 endVec, AABB boundingBox, Predicate<Entity> filter, double distance) Gets the EntityRayTraceResult representing the entity hitstatic EntityHitResult
getEntityHitResult
(Level level, Entity projectile, Vec3 startVec, Vec3 endVec, AABB boundingBox, Predicate<Entity> filter) Gets the EntityHitResult representing the entity hitstatic EntityHitResult
getEntityHitResult
(Level level, Entity projectile, Vec3 startVec, Vec3 endVec, AABB boundingBox, Predicate<Entity> filter, float inflationAmount) Gets the EntityHitResult representing the entity hitprivate static HitResult
getHitResult
(Vec3 pos, Entity projectile, Predicate<Entity> filter, Vec3 deltaMovement, Level level, float margin, ClipContext.Block clipContext) static HitResult
getHitResultOnMoveVector
(Entity projectile, Predicate<Entity> filter) static HitResult
getHitResultOnMoveVector
(Entity projectile, Predicate<Entity> filter, ClipContext.Block clipContext) static HitResult
getHitResultOnViewVector
(Entity projectile, Predicate<Entity> filter, double scale) static AbstractArrow
getMobArrow
(LivingEntity shooter, ItemStack arrow, float velocity, ItemStack weapon) static InteractionHand
getWeaponHoldingHand
(LivingEntity livingEntity, Predicate<Item> itemPredicate) static InteractionHand
getWeaponHoldingHand
(LivingEntity shooter, Item weapon) Deprecated.static void
rotateTowardsMovement
(Entity projectile, float rotationSpeed)
-
Field Details
-
DEFAULT_ENTITY_HIT_RESULT_MARGIN
private static final float DEFAULT_ENTITY_HIT_RESULT_MARGIN- See Also:
-
-
Constructor Details
-
ProjectileUtil
public ProjectileUtil()
-
-
Method Details
-
getHitResultOnMoveVector
-
getHitResultOnMoveVector
public static HitResult getHitResultOnMoveVector(Entity projectile, Predicate<Entity> filter, ClipContext.Block clipContext) -
getHitResultOnViewVector
-
getHitResult
-
getEntityHitResult
@Nullable public static EntityHitResult getEntityHitResult(Entity shooter, Vec3 startVec, Vec3 endVec, AABB boundingBox, Predicate<Entity> filter, double distance) Gets the EntityRayTraceResult representing the entity hit -
getEntityHitResult
@Nullable public static EntityHitResult getEntityHitResult(Level level, Entity projectile, Vec3 startVec, Vec3 endVec, AABB boundingBox, Predicate<Entity> filter) Gets the EntityHitResult representing the entity hit -
getEntityHitResult
@Nullable public static EntityHitResult getEntityHitResult(Level level, Entity projectile, Vec3 startVec, Vec3 endVec, AABB boundingBox, Predicate<Entity> filter, float inflationAmount) Gets the EntityHitResult representing the entity hit -
rotateTowardsMovement
-
getWeaponHoldingHand
Deprecated. -
getWeaponHoldingHand
public static InteractionHand getWeaponHoldingHand(LivingEntity livingEntity, Predicate<Item> itemPredicate) -
getMobArrow
public static AbstractArrow getMobArrow(LivingEntity shooter, ItemStack arrow, float velocity, @Nullable ItemStack weapon)
-