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 pShooter, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter, double pDistance) Gets the EntityRayTraceResult representing the entity hitstatic EntityHitResult
getEntityHitResult
(Level pLevel, Entity pProjectile, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter) Gets the EntityHitResult representing the entity hitstatic EntityHitResult
getEntityHitResult
(Level pLevel, Entity pProjectile, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter, float pInflationAmount) Gets the EntityHitResult representing the entity hitprivate static HitResult
getHitResult
(Vec3 pPos, Entity pProjectile, Predicate<Entity> pFilter, Vec3 pDeltaMovement, Level pLevel, float pMargin, ClipContext.Block pClipContext) static HitResult
getHitResultOnMoveVector
(Entity pProjectile, Predicate<Entity> pFilter) static HitResult
getHitResultOnMoveVector
(Entity pProjectile, Predicate<Entity> pFilter, ClipContext.Block pClipContext) static HitResult
getHitResultOnViewVector
(Entity pProjectile, Predicate<Entity> pFilter, double pScale) static AbstractArrow
getMobArrow
(LivingEntity pShooter, ItemStack pArrow, float pVelocity, ItemStack pWeapon) static InteractionHand
getWeaponHoldingHand
(LivingEntity livingEntity, Predicate<Item> itemPredicate) static InteractionHand
getWeaponHoldingHand
(LivingEntity pShooter, Item pWeapon) Deprecated.static void
rotateTowardsMovement
(Entity pProjectile, float pRotationSpeed)
-
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 pProjectile, Predicate<Entity> pFilter, ClipContext.Block pClipContext) -
getHitResultOnViewVector
-
getHitResult
-
getEntityHitResult
@Nullable public static EntityHitResult getEntityHitResult(Entity pShooter, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter, double pDistance) Gets the EntityRayTraceResult representing the entity hit -
getEntityHitResult
@Nullable public static EntityHitResult getEntityHitResult(Level pLevel, Entity pProjectile, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter) Gets the EntityHitResult representing the entity hit -
getEntityHitResult
@Nullable public static EntityHitResult getEntityHitResult(Level pLevel, Entity pProjectile, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter, float pInflationAmount) 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 pShooter, ItemStack pArrow, float pVelocity, @Nullable ItemStack pWeapon)
-