Package net.minecraft.entity.decoration
Class AbstractDecorationEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.decoration.AbstractDecorationEntity
- All Implemented Interfaces:
class_5568,CommandOutput,Nameable
- Direct Known Subclasses:
ItemFrameEntity,LeashKnotEntity,PaintingEntity
public abstract class AbstractDecorationEntity extends Entity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
Fields Modifier and Type Field Description protected BlockPosattachmentPosprotected Directionfacingprivate intobstructionCheckCounterprotected static Predicate<Entity>PREDICATEFields inherited from class net.minecraft.entity.Entity
age, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, inPowderSnow, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yawFields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDecorationEntity(EntityType<? extends AbstractDecorationEntity> type, World world)protectedAbstractDecorationEntity(EntityType<? extends AbstractDecorationEntity> type, World world, BlockPos pos) -
Method Summary
Modifier and Type Method Description voidaddVelocity(double deltaX, double deltaY, double deltaZ)floatapplyMirror(BlockMirror mirror)floatapplyRotation(BlockRotation rotation)voidcalculateDimensions()booleancanStayAttached()booleancollides()booleandamage(DamageSource source, float amount)ItemEntitydropStack(ItemStack stack, float yOffset)BlockPosgetDecorationBlockPos()abstract intgetHeightPixels()DirectiongetHorizontalFacing()abstract intgetWidthPixels()booleanhandleAttack(Entity attacker)protected voidinitDataTracker()private doublemethod_6893(int int2)voidmove(MovementType type, Vec3d movement)abstract voidonBreak(Entity entity)abstract voidonPlace()voidonStruckByLightning(ServerWorld world, LightningEntity lightning)voidreadCustomDataFromTag(CompoundTag tag)protected voidsetFacing(Direction facing)protected booleanshouldSetPositionOnLoad()voidtick()protected voidupdateAttachmentPosition()voidupdatePosition(double x, double y, double z)voidwriteCustomDataToTag(CompoundTag tag)Methods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, animateDamage, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canClimb, canExplosionDestroyBlock, canFly, canFreeze, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWith, copyFrom, copyPositionAndRotation, createSpawnPacket, dealDamage, destroy, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, emitGameEvent, entityDataRequiresOperator, equals, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPickBlockStack, 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, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAlive, isAttackable, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFreezing, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPlayer, isPushable, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29241, method_29919, method_30076, method_30330, method_30632, method_30633, method_30634, method_30950, method_30951, method_31166, method_31473, method_31744, method_31746, method_31748, method_32318, method_32875, method_32877, method_33189, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, 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, setFrozenTicks, setGlowing, setHeadYaw, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, unsetRemoved, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
PREDICATE
-
obstructionCheckCounter
private int obstructionCheckCounter -
attachmentPos
-
facing
-
-
Constructor Details
-
AbstractDecorationEntity
protected AbstractDecorationEntity(EntityType<? extends AbstractDecorationEntity> type, World world) -
AbstractDecorationEntity
protected AbstractDecorationEntity(EntityType<? extends AbstractDecorationEntity> type, World world, BlockPos pos)
-
-
Method Details
-
initDataTracker
protected void initDataTracker()- Specified by:
initDataTrackerin classEntity
-
setFacing
-
updateAttachmentPosition
protected void updateAttachmentPosition() -
method_6893
private double method_6893(int int2) -
tick
public void tick() -
canStayAttached
public boolean canStayAttached() -
collides
public boolean collides() -
handleAttack
- Overrides:
handleAttackin classEntity
-
getHorizontalFacing
- Overrides:
getHorizontalFacingin classEntity
-
damage
-
move
-
addVelocity
public void addVelocity(double deltaX, double deltaY, double deltaZ)- Overrides:
addVelocityin classEntity
-
writeCustomDataToTag
- Specified by:
writeCustomDataToTagin classEntity
-
readCustomDataFromTag
- Specified by:
readCustomDataFromTagin classEntity
-
getWidthPixels
public abstract int getWidthPixels() -
getHeightPixels
public abstract int getHeightPixels() -
onBreak
-
onPlace
public abstract void onPlace() -
dropStack
-
shouldSetPositionOnLoad
protected boolean shouldSetPositionOnLoad()- Overrides:
shouldSetPositionOnLoadin classEntity
-
updatePosition
public void updatePosition(double x, double y, double z)- Overrides:
updatePositionin classEntity
-
getDecorationBlockPos
-
applyRotation
- Overrides:
applyRotationin classEntity
-
applyMirror
- Overrides:
applyMirrorin classEntity
-
onStruckByLightning
- Overrides:
onStruckByLightningin classEntity
-
calculateDimensions
public void calculateDimensions()- Overrides:
calculateDimensionsin classEntity
-