net.minecraft.entity.projectile

public abstract class PersistentProjectileEntity

extends ProjectileEntity

All mapped superinterfaces:

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

net.minecraft.world.entity.projectile.arrow.AbstractArrow
net.minecraft.class_1665
net.minecraft.entity.projectile.PersistentProjectileEntity

Field summary

Modifier and TypeField
private static final double
ARROW_BASE_DAMAGE
field_30657
field_30657
private static final int
SHAKE_TIME
field_54968
field_54968
private static final float
WATER_INERTIA
field_55017
field_55017
private static final float
INERTIA
field_55018
DEFAULT_DRAG
private static final short
DEFAULT_LIFE
field_57732
DEFAULT_LIFE
private static final byte
DEFAULT_SHAKE
field_57733
DEFAULT_SHAKE
private static final boolean
DEFAULT_IN_GROUND
field_57734
DEFAULT_IN_GROUND
private static final boolean
DEFAULT_CRIT
field_57735
DEFAULT_CRITICAL
private static final byte
DEFAULT_PIERCE_LEVEL
field_57736
DEFAULT_PIERCE_LEVEL
private static final TrackedData<Byte>
ID_FLAGS
field_7573
PROJECTILE_FLAGS
private static final TrackedData<Byte>
PIERCE_LEVEL
field_7589
PIERCE_LEVEL
private static final TrackedData<Boolean>
IN_GROUND
field_54969
IN_GROUND
private static final int
FLAG_CRIT
field_30654
CRITICAL_FLAG
private static final int
FLAG_NOPHYSICS
field_30655
NO_CLIP_FLAG
private BlockState
lastState
field_7586
inBlockState
protected int
inGroundTime
field_7576
inGroundTime
public PersistentProjectileEntity$PickupPermission
pickup
field_7572
pickupType
public int
shakeTime
field_7574
shake
private int
life
field_7578
life
private double
baseDamage
field_7571
damage
private SoundEvent
soundEvent
field_7584
sound
private it.unimi.dsi.fastutil.ints.IntOpenHashSet
piercingIgnoreEntityIds
field_7590
piercedEntities
private List<Entity>
piercedAndKilledEntities
field_7579
piercingKilledEntities
private ItemStack
pickupItemStack
field_46970
stack
private ItemStack
firedFromWeapon
field_51620
weapon

Constructor summary

ModifierConstructor
protected (EntityType<? extends PersistentProjectileEntity> type, World level)
protected (EntityType<? extends PersistentProjectileEntity> type, double x, double y, double z, World world, ItemStack stack, ItemStack weapon)
protected (EntityType<? extends PersistentProjectileEntity> type, LivingEntity owner, World world, ItemStack stack, ItemStack shotFrom)

Method summary

Modifier and TypeMethod
public void
setSoundEvent(SoundEvent soundEvent)
method_7444(class_3414 arg0)
setSound(SoundEvent sound)
public boolean
shouldRenderAtSqrDistance(double distance)
method_5640(double arg0)
shouldRender(double arg0)
protected void
defineSynchedData(SynchedEntityData$Builder entityData)
method_5693(class_2945$class_9222 arg0)
initDataTracker(DataTracker$Builder arg0)
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 arg0, double arg1, double arg2, float arg3, float arg4)
public void
lerpMotion(Vec3 movement)
method_5750(class_243 arg0)
setVelocityClient(Vec3d arg0)
public void
onSyncedDataUpdated(EntityDataAccessor<?> accessor)
method_5674(class_2940<?> arg0)
onTrackedDataSet(TrackedData<?> arg0)
public void
tick()
method_5773()
tick()
private void
stepMoveAndHit(BlockHitResult blockHitResult)
method_63670(class_3965 arg0)
applyCollision(BlockHitResult blockHitResult)
private ProjectileDeflection
hitTargetsOrDeflectSelf(Collection<EntityHitResult> entityHitResults)
method_75207(Collection<class_3966> arg0)
hitOrDeflect(Collection<EntityHitResult> hitResults)
private void
applyInertia(float inertia)
method_63669(float arg0)
applyDrag(float drag)
private void
addBubbleParticles(Vec3 position)
method_64646(class_243 arg0)
spawnBubbleParticles(Vec3d pos)
protected double
getDefaultGravity()
method_7490()
getGravity()
private boolean
shouldFall()
method_26351()
shouldFall()
private void
startFalling()
method_26352()
fall()
protected boolean
isInGround()
method_65059()
isInGround()
protected void
setInGround(boolean inGround)
method_65058(boolean arg0)
setInGround(boolean inGround)
public boolean
isPushedByFluid()
method_5675()
isPushedByFluids()
public void
move(MoverType moverType, Vec3 delta)
method_5784(class_1313 arg0, class_243 arg1)
move(MovementType arg0, Vec3d arg1)
protected void
tickDespawn()
method_7446()
age()
private void
resetPiercedEntities()
method_7453()
clearPiercingStatus()
public void
onItemBreak(Item item)
method_61544(class_1792 arg0)
onBroken(Item arg0)
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 void
push(double xa, double ya, double za)
method_5762(double arg0, double arg1, double arg2)
addVelocity(double arg0, double arg1, double arg2)
protected void
onHitEntity(EntityHitResult hitResult)
method_7454(class_3966 arg0)
onEntityHit(EntityHitResult arg0)
protected void
doKnockback(LivingEntity mob, DamageSource damageSource)
method_59957(class_1309 arg0, class_1282 arg1)
knockback(LivingEntity target, DamageSource source)
protected void
onHitBlock(BlockHitResult hitResult)
method_24920(class_3965 arg0)
onBlockHit(BlockHitResult arg0)
protected void
hitBlockEnchantmentEffects(ServerLevel serverLevel, BlockHitResult hitResult, ItemStack weapon)
method_59956(class_3218 arg0, class_3965 arg1, class_1799 arg2)
onBlockHitEnchantmentEffects(ServerWorld world, BlockHitResult blockHitResult, ItemStack weaponStack)
public ItemStack
getWeaponItem()
method_59958()
getWeaponStack()
protected SoundEvent
getDefaultHitGroundSoundEvent()
method_7440()
getHitSound()
protected final SoundEvent
getHitGroundSoundEvent()
method_20011()
getSound()
protected void
doPostHurtEffects(LivingEntity mob)
method_7450(class_1309 arg0)
onHit(LivingEntity target)
protected EntityHitResult
findHitEntity(Vec3 from, Vec3 to)
method_7434(class_243 arg0, class_243 arg1)
getEntityCollision(Vec3d currentPosition, Vec3d nextPosition)
protected Collection<EntityHitResult>
findHitEntities(Vec3 from, Vec3 to)
method_75208(class_243 arg0, class_243 arg1)
collectPiercingCollisions(Vec3d from, Vec3d to)
protected boolean
canHitEntity(Entity entity)
method_26958(class_1297 arg0)
canHit(Entity arg0)
protected void
addAdditionalSaveData(ValueOutput output)
method_5652(class_11372 arg0)
writeCustomData(WriteView arg0)
protected void
readAdditionalSaveData(ValueInput input)
method_5749(class_11368 arg0)
readCustomData(ReadView arg0)
public void
setOwner(Entity owner)
method_7432(class_1297 arg0)
setOwner(Entity arg0)
public void
playerTouch(Player player)
method_5694(class_1657 arg0)
onPlayerCollision(PlayerEntity arg0)
protected boolean
tryPickup(Player player)
method_34713(class_1657 arg0)
tryPickup(PlayerEntity player)
protected ItemStack
getPickupItem()
method_7445()
asItemStack()
protected abstract ItemStack
getDefaultPickupItem()
method_57314()
getDefaultItemStack()
protected Entity$MoveEffect
getMovementEmission()
method_33570()
getMoveEffect()
public ItemStack
getPickupItemStackOrigin()
method_54759()
getItemStack()
public void
setBaseDamage(double baseDamage)
method_7438(double arg0)
setDamage(double damage)
public boolean
isAttackable()
method_5732()
isAttackable()
public void
setCritArrow(boolean critArrow)
method_7439(boolean arg0)
setCritical(boolean critical)
private void
setPierceLevel(byte pieceLevel)
method_7451(byte arg0)
setPierceLevel(byte level)
private void
setFlag(int flag, boolean value)
method_7455(int arg0, boolean arg1)
setProjectileFlag(int index, boolean flag)
protected void
setPickupItemStack(ItemStack itemStack)
method_57313(class_1799 arg0)
setStack(ItemStack stack)
public boolean
isCritArrow()
method_7443()
isCritical()
public byte
getPierceLevel()
method_7447()
getPierceLevel()
public void
setBaseDamageFromMob(float power)
method_59955(float arg0)
applyDamageModifier(float damageModifier)
protected float
getWaterInertia()
method_7436()
getDragInWater()
public void
setNoPhysics(boolean noPhysics)
method_7433(boolean arg0)
setNoClip(boolean noClip)
public boolean
isNoPhysics()
method_7441()
isNoClip()
public boolean
isPickable()
method_5863()
canHit()
public StackReference
getSlot(int slot)
method_32318(int arg0)
getStackReference(int arg0)
protected boolean
shouldBounceOnWorldBorder()
method_62823()
deflectsAgainstWorldBorder()
private void
lambda$hitBlockEnchantmentEffects$0(Item arg0)
method_59953(class_1792 arg0)
method_59953(Item item)
private static double
lambda$stepMoveAndHit$0(Vec3 arg0, EntityHitResult arg1)
method_75206(class_243 arg0, class_3966 arg1)
method_75206(Vec3d arg0, EntityHitResult arg1)