Package net.minecraft.entity.projectile
Class AbstractArrowEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
-
- net.minecraft.entity.Entity
-
- net.minecraft.entity.projectile.ProjectileEntity
-
- net.minecraft.entity.projectile.AbstractArrowEntity
-
- All Implemented Interfaces:
ICommandSource
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeEntity
,INBTSerializable<CompoundNBT>
- Direct Known Subclasses:
ArrowEntity
,SpectralArrowEntity
,TridentEntity
public abstract class AbstractArrowEntity extends ProjectileEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractArrowEntity.PickupStatus
-
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.IMoveCallback
-
-
Field Summary
Fields Modifier and Type Field Description private double
baseDamage
private static DataParameter<java.lang.Byte>
ID_FLAGS
protected boolean
inGround
protected int
inGroundTime
private int
knockback
private BlockState
lastState
private int
life
AbstractArrowEntity.PickupStatus
pickup
private static DataParameter<java.lang.Byte>
PIERCE_LEVEL
private java.util.List<Entity>
piercedAndKilledEntities
private it.unimi.dsi.fastutil.ints.IntOpenHashSet
piercingIgnoreEntityIds
int
shakeTime
private SoundEvent
soundEvent
-
Fields inherited from class net.minecraft.entity.Entity
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, ENTITY_COUNTER, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractArrowEntity(EntityType<? extends AbstractArrowEntity> p_i48547_1_, double p_i48547_2_, double p_i48547_4_, double p_i48547_6_, World p_i48547_8_)
protected
AbstractArrowEntity(EntityType<? extends AbstractArrowEntity> p_i48548_1_, LivingEntity p_i48548_2_, World p_i48548_3_)
protected
AbstractArrowEntity(EntityType<? extends AbstractArrowEntity> p_i48546_1_, World p_i48546_2_)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAdditionalSaveData(CompoundNBT p_213281_1_)
protected boolean
canHitEntity(Entity p_230298_1_)
protected void
defineSynchedData()
protected void
doPostHurtEffects(LivingEntity p_184548_1_)
protected EntityRayTraceResult
findHitEntity(Vector3d p_213866_1_, Vector3d p_213866_2_)
IPacket<?>
getAddEntityPacket()
double
getBaseDamage()
protected SoundEvent
getDefaultHitGroundSoundEvent()
protected float
getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
protected SoundEvent
getHitGroundSoundEvent()
protected abstract ItemStack
getPickupItem()
byte
getPierceLevel()
protected float
getWaterInertia()
boolean
isAttackable()
boolean
isCritArrow()
protected boolean
isMovementNoisy()
boolean
isNoPhysics()
void
lerpMotion(double p_70016_1_, double p_70016_3_, double p_70016_5_)
void
lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
void
move(MoverType p_213315_1_, Vector3d p_213315_2_)
protected void
onHitBlock(BlockRayTraceResult p_230299_1_)
protected void
onHitEntity(EntityRayTraceResult p_213868_1_)
void
playerTouch(PlayerEntity p_70100_1_)
void
readAdditionalSaveData(CompoundNBT p_70037_1_)
private void
resetPiercedEntities()
void
setBaseDamage(double p_70239_1_)
void
setCritArrow(boolean p_70243_1_)
void
setEnchantmentEffectsFromEntity(LivingEntity p_190547_1_, float p_190547_2_)
private void
setFlag(int p_203049_1_, boolean p_203049_2_)
void
setKnockback(int p_70240_1_)
void
setNoPhysics(boolean p_203045_1_)
void
setOwner(Entity p_212361_1_)
void
setPierceLevel(byte p_213872_1_)
void
setShotFromCrossbow(boolean p_213865_1_)
void
setSoundEvent(SoundEvent p_213869_1_)
void
shoot(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
boolean
shotFromCrossbow()
private boolean
shouldFall()
boolean
shouldRenderAtSqrDistance(double p_70112_1_)
private void
startFalling()
void
tick()
protected void
tickDespawn()
-
Methods inherited from class net.minecraft.entity.projectile.ProjectileEntity
getOwner, lerpRotation, onHit, shootFromRotation, updateRotation
-
Methods inherited from class net.minecraft.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, animateHurt, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkDespawn, checkFallDamage, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFireImmuneTicks, getFluidHeight, getFluidJumpThreshold, getForward, getHandSlots, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMyRidingOffset, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getX, getX, getY, getY, getYHeadRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, hurt, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPickable, isPushable, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killed, lavaHurt, lerpHeadTo, limitPistonMovement, load, lookAt, makeFlySound, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mirror, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, outOfWorld, pick, playFlySound, playSound, playStepSound, playSwimSound, position, positionRider, processPortalCooldown, push, push, reapplyPosition, refreshDimensions, remove, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetPos, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setItemSlot, setLevel, setLocationFromBoundingbox, setNoGravity, setOnGround, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSlot, setSprinting, setSwimming, setUUID, setViewScale, setYBodyRot, setYHeadRot, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getDimensionsForge, getEntity, getEyeHeightForge, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
-
-
-
Field Detail
-
ID_FLAGS
private static final DataParameter<java.lang.Byte> ID_FLAGS
-
PIERCE_LEVEL
private static final DataParameter<java.lang.Byte> PIERCE_LEVEL
-
lastState
@Nullable private BlockState lastState
-
inGround
protected boolean inGround
-
inGroundTime
protected int inGroundTime
-
pickup
public AbstractArrowEntity.PickupStatus pickup
-
shakeTime
public int shakeTime
-
life
private int life
-
baseDamage
private double baseDamage
-
knockback
private int knockback
-
soundEvent
private SoundEvent soundEvent
-
piercingIgnoreEntityIds
private it.unimi.dsi.fastutil.ints.IntOpenHashSet piercingIgnoreEntityIds
-
piercedAndKilledEntities
private java.util.List<Entity> piercedAndKilledEntities
-
-
Constructor Detail
-
AbstractArrowEntity
protected AbstractArrowEntity(EntityType<? extends AbstractArrowEntity> p_i48546_1_, World p_i48546_2_)
-
AbstractArrowEntity
protected AbstractArrowEntity(EntityType<? extends AbstractArrowEntity> p_i48547_1_, double p_i48547_2_, double p_i48547_4_, double p_i48547_6_, World p_i48547_8_)
-
AbstractArrowEntity
protected AbstractArrowEntity(EntityType<? extends AbstractArrowEntity> p_i48548_1_, LivingEntity p_i48548_2_, World p_i48548_3_)
-
-
Method Detail
-
setSoundEvent
public void setSoundEvent(SoundEvent p_213869_1_)
-
shouldRenderAtSqrDistance
public boolean shouldRenderAtSqrDistance(double p_70112_1_)
- Overrides:
shouldRenderAtSqrDistance
in classEntity
-
defineSynchedData
protected void defineSynchedData()
- Specified by:
defineSynchedData
in classEntity
-
shoot
public void shoot(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
- Overrides:
shoot
in classProjectileEntity
-
lerpTo
public void lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
-
lerpMotion
public void lerpMotion(double p_70016_1_, double p_70016_3_, double p_70016_5_)
- Overrides:
lerpMotion
in classProjectileEntity
-
tick
public void tick()
- Overrides:
tick
in classProjectileEntity
-
shouldFall
private boolean shouldFall()
-
startFalling
private void startFalling()
-
tickDespawn
protected void tickDespawn()
-
resetPiercedEntities
private void resetPiercedEntities()
-
onHitEntity
protected void onHitEntity(EntityRayTraceResult p_213868_1_)
- Overrides:
onHitEntity
in classProjectileEntity
-
onHitBlock
protected void onHitBlock(BlockRayTraceResult p_230299_1_)
- Overrides:
onHitBlock
in classProjectileEntity
-
getDefaultHitGroundSoundEvent
protected SoundEvent getDefaultHitGroundSoundEvent()
-
getHitGroundSoundEvent
protected final SoundEvent getHitGroundSoundEvent()
-
doPostHurtEffects
protected void doPostHurtEffects(LivingEntity p_184548_1_)
-
findHitEntity
@Nullable protected EntityRayTraceResult findHitEntity(Vector3d p_213866_1_, Vector3d p_213866_2_)
-
canHitEntity
protected boolean canHitEntity(Entity p_230298_1_)
- Overrides:
canHitEntity
in classProjectileEntity
-
addAdditionalSaveData
public void addAdditionalSaveData(CompoundNBT p_213281_1_)
- Overrides:
addAdditionalSaveData
in classProjectileEntity
-
readAdditionalSaveData
public void readAdditionalSaveData(CompoundNBT p_70037_1_)
- Overrides:
readAdditionalSaveData
in classProjectileEntity
-
setOwner
public void setOwner(@Nullable Entity p_212361_1_)
- Overrides:
setOwner
in classProjectileEntity
-
playerTouch
public void playerTouch(PlayerEntity p_70100_1_)
- Overrides:
playerTouch
in classEntity
-
getPickupItem
protected abstract ItemStack getPickupItem()
-
isMovementNoisy
protected boolean isMovementNoisy()
- Overrides:
isMovementNoisy
in classEntity
-
setBaseDamage
public void setBaseDamage(double p_70239_1_)
-
getBaseDamage
public double getBaseDamage()
-
setKnockback
public void setKnockback(int p_70240_1_)
-
isAttackable
public boolean isAttackable()
- Overrides:
isAttackable
in classEntity
-
getEyeHeight
protected float getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
- Overrides:
getEyeHeight
in classEntity
-
setCritArrow
public void setCritArrow(boolean p_70243_1_)
-
setPierceLevel
public void setPierceLevel(byte p_213872_1_)
-
setFlag
private void setFlag(int p_203049_1_, boolean p_203049_2_)
-
isCritArrow
public boolean isCritArrow()
-
shotFromCrossbow
public boolean shotFromCrossbow()
-
getPierceLevel
public byte getPierceLevel()
-
setEnchantmentEffectsFromEntity
public void setEnchantmentEffectsFromEntity(LivingEntity p_190547_1_, float p_190547_2_)
-
getWaterInertia
protected float getWaterInertia()
-
setNoPhysics
public void setNoPhysics(boolean p_203045_1_)
-
isNoPhysics
public boolean isNoPhysics()
-
setShotFromCrossbow
public void setShotFromCrossbow(boolean p_213865_1_)
-
getAddEntityPacket
public IPacket<?> getAddEntityPacket()
- Specified by:
getAddEntityPacket
in classEntity
-
-