public abstract class HangingEntity extends Entity
| Modifier and Type | Field and Description |
|---|---|
protected Direction |
facingDirection |
protected BlockPos |
hangingPosition |
protected static java.util.function.Predicate<Entity> |
IS_HANGING_ENTITY |
addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, worldfield_213139_a_| Modifier | Constructor and Description |
|---|---|
protected |
HangingEntity(EntityType<? extends HangingEntity> type,
World p_i48561_2_) |
protected |
HangingEntity(EntityType<? extends HangingEntity> type,
World p_i48562_2_,
BlockPos p_i48562_3_) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVelocity(double x,
double y,
double z) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeCollidedWith() |
ItemEntity |
entityDropItem(ItemStack stack,
float offsetY) |
BlockPos |
getHangingPosition() |
abstract int |
getHeightPixels() |
Direction |
getHorizontalFacing() |
float |
getMirroredYaw(Mirror transformMirror) |
float |
getRotatedYaw(Rotation transformRotation) |
abstract int |
getWidthPixels() |
boolean |
hitByEntity(Entity entityIn) |
void |
move(MoverType typeIn,
Vec3d pos) |
abstract void |
onBroken(Entity brokenEntity) |
void |
onStruckByLightning(LightningBoltEntity lightningBolt) |
boolean |
onValidSurface() |
abstract void |
playPlaceSound() |
void |
readAdditional(CompoundNBT compound) |
void |
recalculateSize() |
protected void |
registerData() |
void |
setPosition(double x,
double y,
double z) |
protected boolean |
shouldSetPosAfterLoading() |
void |
tick() |
protected void |
updateBoundingBox() |
protected void |
updateFacingWithBoundingBox(Direction facingDirectionIn) |
void |
writeAdditional(CompoundNBT compound) |
addPassenger, addTag, addTrackingPlayer, allowLogging, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, baseTick, canBeAttackedWithItem, canBePushed, canBeRidden, canBeRiddenInWater, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, createSpawnPacket, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fall, fillCrashReport, func_213286_i, func_213296_b, func_213300_bk, func_213312_b, func_213314_bj, func_213320_d, func_213324_a, func_223307_a, func_223308_g, func_223310_a, func_223314_ad, getAbsoluteMotion, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBoundingBox, getBoundingBox, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHoverEvent, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMotion, getMountedYOffset, getName, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionVec, getPositionVector, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotationYawHead, getScoreboardName, getServer, getSize, getSoundCategory, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeleportDirection, getType, getUniqueID, getVectorForRotation, getWidth, getYaw, getYOffset, handleFluidAcceleration, handlePistonMovement, handleSneakMovement, handleStatusUpdate, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, ignoreItemEntityData, isAddedToWorld, isAlive, isBeingRidden, isBurning, isCustomNameVisible, isEntityEqual, isEntityInsideOpaqueBlock, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSwimming, isWet, lookAt, makeFlySound, markVelocityChanged, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillCommand, onKillEntity, onRemovedFromWorld, outOfWorld, performHurtAnimation, playFlySound, playSound, playStepSound, playSwimSound, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, read, remove, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFlag, setGlowing, setHeadRotation, setInLava, setInvisible, setInvulnerable, setItemStackToSlot, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPortal, setPose, setPositionAndRotation, setPositionAndRotationDirect, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSneaking, setSprinting, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldRenderSneaking, spawnRunningParticles, startRiding, startRiding, stopRiding, teleportKeepLoaded, toString, updateFallState, updatePassenger, updatePortal, updateRidden, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeIdareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSitgetCapability, getCapabilityprotected static final java.util.function.Predicate<Entity> IS_HANGING_ENTITY
protected BlockPos hangingPosition
protected Direction facingDirection
protected HangingEntity(EntityType<? extends HangingEntity> type, World p_i48561_2_)
protected HangingEntity(EntityType<? extends HangingEntity> type, World p_i48562_2_, BlockPos p_i48562_3_)
protected void registerData()
registerData in class Entityprotected void updateFacingWithBoundingBox(Direction facingDirectionIn)
protected void updateBoundingBox()
public boolean onValidSurface()
public boolean canBeCollidedWith()
canBeCollidedWith in class Entitypublic boolean hitByEntity(Entity entityIn)
hitByEntity in class Entitypublic Direction getHorizontalFacing()
getHorizontalFacing in class Entitypublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom in class Entitypublic void addVelocity(double x,
double y,
double z)
addVelocity in class Entitypublic void writeAdditional(CompoundNBT compound)
writeAdditional in class Entitypublic void readAdditional(CompoundNBT compound)
readAdditional in class Entitypublic abstract int getWidthPixels()
public abstract int getHeightPixels()
public abstract void onBroken(@Nullable
Entity brokenEntity)
public abstract void playPlaceSound()
public ItemEntity entityDropItem(ItemStack stack, float offsetY)
entityDropItem in class Entityprotected boolean shouldSetPosAfterLoading()
shouldSetPosAfterLoading in class Entitypublic void setPosition(double x,
double y,
double z)
setPosition in class Entitypublic BlockPos getHangingPosition()
public float getRotatedYaw(Rotation transformRotation)
getRotatedYaw in class Entitypublic float getMirroredYaw(Mirror transformMirror)
getMirroredYaw in class Entitypublic void onStruckByLightning(LightningBoltEntity lightningBolt)
onStruckByLightning in class Entitypublic void recalculateSize()
recalculateSize in class Entity