public abstract class PersistentProjectileEntity extends ProjectileEntity
Modifier and Type | Class and Description |
---|---|
static class |
PersistentProjectileEntity.PickupPermission |
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private double |
damage |
private BlockState |
inBlockState |
protected boolean |
inGround |
protected int |
inGroundTime |
private int |
life |
PersistentProjectileEntity.PickupPermission |
pickupType |
private static TrackedData<Byte> |
PIERCE_LEVEL |
private it.unimi.dsi.fastutil.ints.IntOpenHashSet |
piercedEntities |
private List<Entity> |
piercingKilledEntities |
private static TrackedData<Byte> |
PROJECTILE_FLAGS |
private int |
punch |
int |
shake |
private SoundEvent |
sound |
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
DUMMY
Modifier | Constructor and Description |
---|---|
protected |
PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type,
double x,
double y,
double z,
World world) |
protected |
PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type,
LivingEntity owner,
World world) |
protected |
PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type,
World world) |
Modifier and Type | Method and Description |
---|---|
protected void |
age() |
void |
applyEnchantmentEffects(LivingEntity entity,
float damageModifier) |
protected abstract ItemStack |
asItemStack() |
protected boolean |
canClimb() |
private void |
clearPiercingStatus() |
Packet<?> |
createSpawnPacket() |
double |
getDamage() |
protected float |
getDragInWater() |
protected EntityHitResult |
getEntityCollision(Vec3d currentPosition,
Vec3d nextPosition) |
protected float |
getEyeHeight(EntityPose pose,
EntityDimensions dimensions) |
protected SoundEvent |
getHitSound() |
byte |
getPierceLevel() |
protected SoundEvent |
getSound() |
protected void |
initDataTracker() |
boolean |
isAttackable() |
boolean |
isCritical() |
boolean |
isNoClip() |
boolean |
isShotFromCrossbow() |
private boolean |
method_26351() |
private void |
method_26352() |
protected boolean |
method_26958(Entity entity) |
void |
move(MovementType type,
Vec3d movement) |
protected void |
onBlockHit(BlockHitResult blockHitResult) |
protected void |
onEntityHit(EntityHitResult entityHitResult) |
protected void |
onHit(LivingEntity target) |
void |
onPlayerCollision(PlayerEntity player) |
void |
readCustomDataFromTag(CompoundTag tag) |
void |
setCritical(boolean critical) |
void |
setDamage(double damage) |
void |
setNoClip(boolean noClip) |
void |
setOwner(Entity entity) |
void |
setPierceLevel(byte level) |
private void |
setProjectileFlag(int index,
boolean flag) |
void |
setPunch(int punch) |
void |
setShotFromCrossbow(boolean shotFromCrossbow) |
void |
setSound(SoundEvent sound) |
void |
setVelocity(double x,
double y,
double z,
float speed,
float divergence) |
void |
setVelocityClient(double x,
double y,
double z) |
boolean |
shouldRender(double distance) |
void |
tick() |
void |
updateTrackedPositionAndAngles(double x,
double y,
double z,
float yaw,
float pitch,
int interpolationSteps,
boolean interpolate) |
void |
writeCustomDataToTag(CompoundTag tag) |
getOwner, method_26962, onCollision, setProperties, updateRotation
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, animateDamage, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collides, collidesWith, copyFrom, copyPositionAndRotation, damage, dealDamage, destroy, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, equip, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAlive, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPushable, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29239, method_29241, method_29919, method_30076, method_30330, method_30632, method_30633, method_30634, method_30950, method_30951, method_31166, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushAwayFrom, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setHeadYaw, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
private static final TrackedData<Byte> PROJECTILE_FLAGS
private static final TrackedData<Byte> PIERCE_LEVEL
@Nullable private BlockState inBlockState
protected boolean inGround
protected int inGroundTime
public PersistentProjectileEntity.PickupPermission pickupType
public int shake
private int life
private double damage
private int punch
private SoundEvent sound
private it.unimi.dsi.fastutil.ints.IntOpenHashSet piercedEntities
protected PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type, World world)
protected PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type, double x, double y, double z, World world)
protected PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type, LivingEntity owner, World world)
public void setSound(SoundEvent sound)
@Environment(value=CLIENT) public boolean shouldRender(double distance)
shouldRender
in class Entity
protected void initDataTracker()
initDataTracker
in class Entity
public void setVelocity(double x, double y, double z, float speed, float divergence)
setVelocity
in class ProjectileEntity
@Environment(value=CLIENT) public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)
updateTrackedPositionAndAngles
in class Entity
@Environment(value=CLIENT) public void setVelocityClient(double x, double y, double z)
setVelocityClient
in class ProjectileEntity
public void tick()
tick
in class ProjectileEntity
private boolean method_26351()
private void method_26352()
public void move(MovementType type, Vec3d movement)
protected void age()
private void clearPiercingStatus()
protected void onEntityHit(EntityHitResult entityHitResult)
onEntityHit
in class ProjectileEntity
protected void onBlockHit(BlockHitResult blockHitResult)
onBlockHit
in class ProjectileEntity
protected SoundEvent getHitSound()
protected final SoundEvent getSound()
protected void onHit(LivingEntity target)
@Nullable protected EntityHitResult getEntityCollision(Vec3d currentPosition, Vec3d nextPosition)
protected boolean method_26958(Entity entity)
method_26958
in class ProjectileEntity
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class ProjectileEntity
public void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class ProjectileEntity
public void setOwner(@Nullable Entity entity)
setOwner
in class ProjectileEntity
public void onPlayerCollision(PlayerEntity player)
onPlayerCollision
in class Entity
protected abstract ItemStack asItemStack()
public void setDamage(double damage)
public double getDamage()
public void setPunch(int punch)
public boolean isAttackable()
isAttackable
in class Entity
protected float getEyeHeight(EntityPose pose, EntityDimensions dimensions)
getEyeHeight
in class Entity
public void setCritical(boolean critical)
public void setPierceLevel(byte level)
private void setProjectileFlag(int index, boolean flag)
public boolean isCritical()
public boolean isShotFromCrossbow()
public byte getPierceLevel()
public void applyEnchantmentEffects(LivingEntity entity, float damageModifier)
protected float getDragInWater()
public void setNoClip(boolean noClip)
public boolean isNoClip()
public void setShotFromCrossbow(boolean shotFromCrossbow)
public Packet<?> createSpawnPacket()
createSpawnPacket
in class Entity