net.minecraft.entity.projectile

public abstract class ProjectileEntity

extends Entity implements Ownable

All mapped superinterfaces:

Nameable, EntityLike, UniquelyIdentifiable, ScoreHolder, DataTracked, ComponentsAccess, HeldItemContext, StackReferenceGetter, DebugTrackable, EntryConvertible, Ownable

net.minecraft.world.entity.projectile.Projectile
net.minecraft.class_1676
net.minecraft.entity.projectile.ProjectileEntity

Field summary

Modifier and TypeField
private static final boolean
DEFAULT_LEFT_OWNER
field_57742
DEFAULT_LEFT_OWNER
private static final boolean
DEFAULT_HAS_BEEN_SHOT
field_57743
DEFAULT_SHOT
protected LazyEntityReference<Entity>
owner
field_60558
owner
private boolean
leftOwner
field_23740
leftOwner
private boolean
leftOwnerChecked
field_63116
checkedForLeftOwner
private boolean
hasBeenShot
field_28646
shot
private Entity
lastDeflectedBy
field_51621
lastDeflectedEntity

Constructor summary

ModifierConstructor
protected (EntityType<? extends ProjectileEntity> type, World level)

Method summary

Modifier and TypeMethod
protected void
setOwner(EntityReference<Entity> owner)
method_71623(class_10583<class_1297> arg0)
setOwner(LazyEntityReference<Entity> owner)
public void
setOwner(Entity owner)
method_7432(class_1297 arg0)
setOwner(Entity owner)
public Entity
getOwner()
method_24921()
getOwner()
public Entity
getEffectSource()
method_37225()
getEffectCause()
protected void
addAdditionalSaveData(ValueOutput output)
method_5652(class_11372 arg0)
writeCustomData(WriteView arg0)
protected boolean
ownedBy(Entity entity)
method_34714(class_1297 arg0)
isOwner(Entity entity)
protected void
readAdditionalSaveData(ValueInput input)
method_5749(class_11368 arg0)
readCustomData(ReadView arg0)
public void
restoreFrom(Entity oldEntity)
method_5878(class_1297 arg0)
copyFrom(Entity arg0)
public void
tick()
method_5773()
tick()
protected void
checkLeftOwner()
method_26961()
tickLeftOwner()
private boolean
isOutsideOwnerCollisionRange()
method_74960()
hasLeftOwner()
public Vec3d
getMovementToShoot(double xd, double yd, double zd, float pow, float uncertainty)
method_58645(double arg0, double arg1, double arg2, float arg3, float arg4)
calculateVelocity(double x, double y, double z, float power, float uncertainty)
public void
shoot(double xd, double yd, double zd, float pow, float uncertainty)
method_7485(double arg0, double arg1, double arg2, float arg3, float arg4)
setVelocity(double x, double y, double z, float power, float uncertainty)
public void
shootFromRotation(Entity source, float xRot, float yRot, float yOffset, float pow, float uncertainty)
method_24919(class_1297 arg0, float arg1, float arg2, float arg3, float arg4, float arg5)
setVelocity(Entity shooter, float pitch, float yaw, float roll, float speed, float divergence)
public void
onAboveBubbleColumn(boolean dragDown, BlockPos pos)
method_5700(boolean arg0, class_2338 arg1)
onBubbleColumnSurfaceCollision(boolean arg0, BlockPos arg1)
public void
onInsideBubbleColumn(boolean dragDown)
method_5764(boolean arg0)
onBubbleColumnCollision(boolean arg0)
public static <T extends ProjectileEntity> T
spawnProjectileFromRotation(Projectile$ProjectileFactory<T> creator, ServerLevel serverLevel, ItemStack itemStack, LivingEntity source, float yOffset, float pow, float uncertainty)
method_61549(class_1676$class_9876<T> arg0, class_3218 arg1, class_1799 arg2, class_1309 arg3, float arg4, float arg5, float arg6)
spawnWithVelocity(ProjectileEntity$ProjectileCreator<T> creator, ServerWorld world, ItemStack projectileStack, LivingEntity shooter, float roll, float power, float divergence)
public static <T extends ProjectileEntity> T
spawnProjectileUsingShoot(Projectile$ProjectileFactory<T> creator, ServerLevel serverLevel, ItemStack itemStack, LivingEntity source, double targetX, double targetY, double targetZ, float pow, float uncertainty)
method_61548(class_1676$class_9876<T> arg0, class_3218 arg1, class_1799 arg2, class_1309 arg3, double arg4, double arg5, double arg6, float arg7, float arg8)
spawnWithVelocity(ProjectileEntity$ProjectileCreator<T> creator, ServerWorld world, ItemStack projectileStack, LivingEntity shooter, double velocityX, double velocityY, double velocityZ, float power, float divergence)
public static <T extends ProjectileEntity> T
spawnProjectileUsingShoot(T projectile, ServerLevel serverLevel, ItemStack itemStack, double targetX, double targetY, double targetZ, float pow, float uncertainty)
method_61552(T arg0, class_3218 arg1, class_1799 arg2, double arg3, double arg4, double arg5, float arg6, float arg7)
spawnWithVelocity(T projectile, ServerWorld world, ItemStack projectileStack, double velocityX, double velocityY, double velocityZ, float power, float divergence)
public static <T extends ProjectileEntity> T
spawnProjectile(T projectile, ServerLevel serverLevel, ItemStack itemStack)
method_61551(T arg0, class_3218 arg1, class_1799 arg2)
spawn(T projectile, ServerWorld world, ItemStack projectileStack)
public static <T extends ProjectileEntity> T
spawnProjectile(T projectile, ServerLevel serverLevel, ItemStack itemStack, Consumer<T> shootFunction)
method_61553(T arg0, class_3218 arg1, class_1799 arg2, Consumer<T> arg3)
spawn(T projectile, ServerWorld world, ItemStack projectileStack, Consumer<T> beforeSpawn)
public void
applyOnProjectileSpawned(ServerLevel serverLevel, ItemStack pickupItemStack)
method_61546(class_3218 arg0, class_1799 arg1)
triggerProjectileSpawned(ServerWorld world, ItemStack projectileStack)
protected ProjectileDeflection
hitTargetOrDeflectSelf(HitResult hitResult)
method_59860(class_239 arg0)
hitOrDeflect(HitResult hitResult)
protected boolean
shouldBounceOnWorldBorder()
method_62823()
deflectsAgainstWorldBorder()
public boolean
deflect(ProjectileDeflection deflection, Entity deflectingEntity, EntityReference<Entity> newOwner, boolean byAttack)
method_59859(class_9109 arg0, class_1297 arg1, class_10583<class_1297> arg2, boolean arg3)
deflect(ProjectileDeflection deflection, Entity deflector, LazyEntityReference<Entity> arg2, boolean fromAttack)
protected void
onDeflection(boolean byAttack)
method_59525(boolean arg0)
onDeflected(boolean arg0)
protected void
onItemBreak(Item item)
method_61544(class_1792 arg0)
onBroken(Item item)
protected void
onHit(HitResult hitResult)
method_7488(class_239 arg0)
onCollision(HitResult hitResult)
protected void
onHitEntity(EntityHitResult hitResult)
method_7454(class_3966 arg0)
onEntityHit(EntityHitResult entityHitResult)
protected void
onHitBlock(BlockHitResult hitResult)
method_24920(class_3965 arg0)
onBlockHit(BlockHitResult blockHitResult)
protected boolean
canHitEntity(Entity entity)
method_26958(class_1297 arg0)
canHit(Entity entity)
protected void
updateRotation()
method_26962()
updateRotation()
protected static float
lerpRotation(float rotO, float rot)
method_26960(float arg0, float arg1)
updateRotation(float lastRot, float newRot)
public Packet<ClientPlayPacketListener>
getAddEntityPacket(ServerEntity serverEntity)
method_18002(class_3231 arg0)
createSpawnPacket(EntityTrackerEntry arg0)
public void
recreateFromPacket(ClientboundAddEntityPacket packet)
method_31471(class_2604 arg0)
onSpawnPacket(EntitySpawnS2CPacket arg0)
public boolean
mayInteract(ServerLevel level, BlockPos pos)
method_36971(class_3218 arg0, class_2338 arg1)
canModifyAt(ServerWorld arg0, BlockPos arg1)
public boolean
mayBreak(ServerLevel level)
method_54457(class_3218 arg0)
canBreakBlocks(ServerWorld world)
public boolean
isPickable()
method_5863()
canHit()
public float
getPickRadius()
method_5871()
getTargetingMargin()
public it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePair
calculateHorizontalHurtKnockbackDirection(LivingEntity hurtEntity, DamageSource damageSource)
method_59959(class_1309 arg0, class_1282 arg1)
getKnockback(LivingEntity target, DamageSource source)
public int
getDimensionChangingDelay()
method_5806()
getDefaultPortalCooldown()
public boolean
hurtServer(ServerLevel level, DamageSource source, float damage)
method_64397(class_3218 arg0, class_1282 arg1, float arg2)
damage(ServerWorld arg0, DamageSource arg1, float arg2)
private static void
lambda$applyOnProjectileSpawned$0(Item arg0)
method_61556(class_1792 arg0)
method_61556(Item item)
private static void
lambda$spawnProjectile$0(Projectile arg0)
method_61554(class_1676 arg0)
method_61554(ProjectileEntity entity)
private static void
lambda$spawnProjectileUsingShoot$1(Projectile arg0, double arg1, double arg2, double arg3, float arg4, float arg5, Projectile arg6)
method_61550(class_1676 arg0, double arg1, double arg2, double arg3, float arg4, float arg5, class_1676 arg6)
method_61550(ProjectileEntity arg0, double arg1, double arg2, double arg3, float arg4, float arg5, ProjectileEntity entity)
private static void
lambda$spawnProjectileUsingShoot$0(double arg0, double arg1, double arg2, float arg3, float arg4, Projectile arg5)
method_61545(double arg0, double arg1, double arg2, float arg3, float arg4, class_1676 arg5)
method_61545(double arg0, double arg1, double arg2, float arg3, float arg4, ProjectileEntity entity)
private static void
lambda$spawnProjectileFromRotation$0(LivingEntity arg0, float arg1, float arg2, float arg3, Projectile arg4)
method_61547(class_1309 arg0, float arg1, float arg2, float arg3, class_1676 arg4)
method_61547(LivingEntity arg0, float arg1, float arg2, float arg3, ProjectileEntity entity)
private static boolean
lambda$isOutsideOwnerCollisionRange$0(AABB arg0, Entity arg1)
method_74959(class_238 arg0, class_1297 arg1)
method_74959(Box arg0, Entity entity)