Class ProjectileUtil
java.lang.Object
net.minecraft.world.entity.projectile.ProjectileUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityHitResultgetEntityHitResult(Entity pShooter, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter, double pDistance) Gets the EntityRayTraceResult representing the entity hitstatic EntityHitResultgetEntityHitResult(Level pLevel, Entity pProjectile, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter) Gets the EntityHitResult representing the entity hitstatic EntityHitResultgetEntityHitResult(Level pLevel, Entity pProjectile, Vec3 pStartVec, Vec3 pEndVec, AABB pBoundingBox, Predicate<Entity> pFilter, float pInflationAmount) Gets the EntityHitResult representing the entity hitprivate static HitResultgetHitResult(Vec3 pPos, Entity pProjectile, Predicate<Entity> pFilter, Vec3 pDeltaMovement, Level pLevel, float pMargin, ClipContext.Block pClipContext) static HitResultgetHitResultOnMoveVector(Entity pProjectile, Predicate<Entity> pFilter) static HitResultgetHitResultOnMoveVector(Entity pProjectile, Predicate<Entity> pFilter, ClipContext.Block pClipContext) static HitResultgetHitResultOnViewVector(Entity pProjectile, Predicate<Entity> pFilter, double pScale) static AbstractArrowgetMobArrow(LivingEntity pShooter, ItemStack pArrow, float pVelocity, ItemStack pWeapon) static InteractionHandgetWeaponHoldingHand(LivingEntity livingEntity, Predicate<Item> itemPredicate) static InteractionHandgetWeaponHoldingHand(LivingEntity pShooter, Item pWeapon) Deprecated.static voidrotateTowardsMovement(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)
-