public abstract class HangingEntity extends Entity
Entity.IMoveCallback| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected Direction |
facingDirection
The direction the entity is facing
|
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, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, worldDUMMY| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
HangingEntity(EntityType<? extends HangingEntity> type,
World p_i48561_2_) |
protected |
HangingEntity(EntityType<? extends HangingEntity> type,
World p_i48562_2_,
BlockPos p_i48562_3_) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addVelocity(double x,
double y,
double z)
Adds to the current velocity of the entity, and sets
Entity.isAirBorne to true. |
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
ItemEntity |
entityDropItem(ItemStack stack,
float offsetY)
Drops an item at the position of the entity.
|
BlockPos |
getHangingPosition() |
abstract int |
getHeightPixels() |
Direction |
getHorizontalFacing()
Gets the horizontal facing direction of this Entity.
|
float |
getMirroredYaw(Mirror transformMirror)
Transforms the entity's current yaw with the given Mirror and returns it.
|
float |
getRotatedYaw(Rotation transformRotation)
Transforms the entity's current yaw with the given Rotation and returns it.
|
abstract int |
getWidthPixels() |
boolean |
hitByEntity(Entity entityIn)
Called when a player attacks an entity.
|
void |
move(MoverType typeIn,
Vec3d pos) |
abstract void |
onBroken(Entity brokenEntity)
Called when this entity is broken.
|
void |
onStruckByLightning(LightningBoltEntity lightningBolt)
Called when a lightning bolt hits the entity.
|
boolean |
onValidSurface()
checks to make sure painting can be placed there
|
abstract void |
playPlaceSound() |
void |
readAdditional(CompoundNBT compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
recalculateSize() |
protected void |
registerData() |
void |
setPosition(double x,
double y,
double z)
Sets the x,y,z of the entity from the given parameters.
|
protected boolean |
shouldSetPosAfterLoading() |
void |
tick()
Called to update the entity's position/logic.
|
protected void |
updateBoundingBox()
Updates the entity bounding box based on current facing
|
protected void |
updateFacingWithBoundingBox(Direction facingDirectionIn)
Updates facing and bounding box based on it
|
void |
writeAdditional(CompoundNBT compound) |
addPassenger, addTag, addTrackingPlayer, allowLogging, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, baseTick, calculateUpVector, canBeAttackedWithItem, canBePushed, canBeRidden, canBeRiddenInWater, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, createSpawnPacket, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, func_225513_by_, func_225514_a_, func_226265_a_, func_226266_a_, func_226276_cg_, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMotion, getMountedYOffset, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotationYawHead, getScoreboardName, getServer, getSize, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYaw, getYOffset, handleFluidAcceleration, handlePistonMovement, handleStatusUpdate, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, horizontalMag, ignoreItemEntityData, isActualySwimming, isAddedToWorld, isAlive, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, 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, isShiftKeyDown, isSilent, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, lookAt, makeFlySound, markVelocityChanged, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillCommand, onKillEntity, onLivingFall, onRemovedFromWorld, outOfWorld, performHurtAnimation, pick, playFlySound, playSound, playStepSound, playSwimSound, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, read, recenterBoundingBox, remove, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setHeadRotation, setInLava, setInvisible, setInvulnerable, setItemStackToSlot, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPositionAndRotation, setPositionAndRotationDirect, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSneaking, setSprinting, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, spawnRunningParticles, startRiding, startRiding, stopRiding, teleportKeepLoaded, toString, updateFallState, updatePassenger, updatePortal, updateRidden, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeIdareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapscanBeRiddenInWater, 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 クラス内 Entityprotected void updateFacingWithBoundingBox(Direction facingDirectionIn)
protected void updateBoundingBox()
public boolean onValidSurface()
public boolean canBeCollidedWith()
canBeCollidedWith クラス内 Entitypublic boolean hitByEntity(Entity entityIn)
hitByEntity クラス内 Entitypublic Direction getHorizontalFacing()
getHorizontalFacing クラス内 Entitypublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom クラス内 Entitypublic void addVelocity(double x,
double y,
double z)
Entity.isAirBorne to true.addVelocity クラス内 Entitypublic void writeAdditional(CompoundNBT compound)
writeAdditional クラス内 Entitypublic void readAdditional(CompoundNBT compound)
readAdditional クラス内 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 クラス内 Entityprotected boolean shouldSetPosAfterLoading()
shouldSetPosAfterLoading クラス内 Entitypublic void setPosition(double x,
double y,
double z)
setPosition クラス内 Entitypublic BlockPos getHangingPosition()
public float getRotatedYaw(Rotation transformRotation)
getRotatedYaw クラス内 Entitypublic float getMirroredYaw(Mirror transformMirror)
getMirroredYaw クラス内 Entitypublic void onStruckByLightning(LightningBoltEntity lightningBolt)
onStruckByLightning クラス内 Entitypublic void recalculateSize()
recalculateSize クラス内 Entity