Package net.minecraft.entity.decoration
Class ItemFrameEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.decoration.AbstractDecorationEntity
net.minecraft.entity.decoration.ItemFrameEntity
- All Implemented Interfaces:
CommandOutput
,Nameable
public class ItemFrameEntity extends AbstractDecorationEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater
-
Field Summary
Fields Modifier and Type Field Description private boolean
fixed
private static Logger
ITEM_FRAME_LOGGER
private static TrackedData<ItemStack>
ITEM_STACK
private float
itemDropChance
private static TrackedData<Integer>
ROTATION
Fields inherited from class net.minecraft.entity.decoration.AbstractDecorationEntity
attachmentPos, facing, PREDICATE
Fields inherited from class net.minecraft.entity.Entity
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
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
Constructors Constructor Description ItemFrameEntity(EntityType<? extends ItemFrameEntity> type, World world)
ItemFrameEntity(World world, BlockPos pos, Direction direction)
-
Method Summary
Modifier and Type Method Description void
addVelocity(double deltaX, double deltaY, double deltaZ)
boolean
canStayAttached()
Packet<?>
createSpawnPacket()
boolean
damage(DamageSource source, float amount)
private void
dropHeldStack(Entity entity, boolean alwaysDrop)
boolean
equip(int slot, ItemStack item)
int
getComparatorPower()
protected float
getEyeHeight(EntityPose pose, EntityDimensions dimensions)
int
getHeightPixels()
ItemStack
getHeldItemStack()
int
getRotation()
float
getTargetingMargin()
int
getWidthPixels()
protected void
initDataTracker()
ActionResult
interact(PlayerEntity player, Hand hand)
Called when a player interacts with this entity.void
kill()
void
move(MovementType type, Vec3d movement)
void
onBreak(Entity entity)
void
onPlace()
void
onTrackedDataSet(TrackedData<?> data)
void
readCustomDataFromTag(CompoundTag tag)
private void
removeFromFrame(ItemStack map)
protected void
setFacing(Direction facing)
void
setHeldItemStack(ItemStack stack)
void
setHeldItemStack(ItemStack value, boolean update)
void
setRotation(int value)
private void
setRotation(int value, boolean bool)
boolean
shouldRender(double distance)
protected void
updateAttachmentPosition()
void
writeCustomDataToTag(CompoundTag tag)
Methods inherited from class net.minecraft.entity.decoration.AbstractDecorationEntity
applyMirror, applyRotation, calculateDimensions, collides, dropStack, getDecorationBlockPos, getHorizontalFacing, handleAttack, onStruckByLightning, shouldSetPositionOnLoad, tick, updatePosition
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, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWith, copyFrom, copyPositionAndRotation, dealDamage, destroy, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, entityDataRequiresOperator, equals, 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, 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, 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, interactAt, isAlive, isAttackable, 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, 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, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onSwimmingStart, 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, setVelocityClient, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRenderName, 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, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
ITEM_FRAME_LOGGER
-
ITEM_STACK
-
ROTATION
-
itemDropChance
private float itemDropChance -
fixed
private boolean fixed
-
-
Constructor Details
-
ItemFrameEntity
-
ItemFrameEntity
-
-
Method Details
-
getEyeHeight
- Overrides:
getEyeHeight
in classEntity
-
initDataTracker
protected void initDataTracker()- Overrides:
initDataTracker
in classAbstractDecorationEntity
-
setFacing
- Overrides:
setFacing
in classAbstractDecorationEntity
-
updateAttachmentPosition
protected void updateAttachmentPosition()- Overrides:
updateAttachmentPosition
in classAbstractDecorationEntity
-
canStayAttached
public boolean canStayAttached()- Overrides:
canStayAttached
in classAbstractDecorationEntity
-
move
- Overrides:
move
in classAbstractDecorationEntity
-
addVelocity
public void addVelocity(double deltaX, double deltaY, double deltaZ)- Overrides:
addVelocity
in classAbstractDecorationEntity
-
getTargetingMargin
public float getTargetingMargin()- Overrides:
getTargetingMargin
in classEntity
-
kill
public void kill() -
damage
- Overrides:
damage
in classAbstractDecorationEntity
-
getWidthPixels
public int getWidthPixels()- Specified by:
getWidthPixels
in classAbstractDecorationEntity
-
getHeightPixels
public int getHeightPixels()- Specified by:
getHeightPixels
in classAbstractDecorationEntity
-
shouldRender
@Environment(CLIENT) public boolean shouldRender(double distance)- Overrides:
shouldRender
in classEntity
-
onBreak
- Specified by:
onBreak
in classAbstractDecorationEntity
-
onPlace
public void onPlace()- Specified by:
onPlace
in classAbstractDecorationEntity
-
dropHeldStack
-
removeFromFrame
-
getHeldItemStack
-
setHeldItemStack
-
setHeldItemStack
-
equip
-
onTrackedDataSet
- Overrides:
onTrackedDataSet
in classEntity
-
getRotation
public int getRotation() -
setRotation
public void setRotation(int value) -
setRotation
private void setRotation(int value, boolean bool) -
writeCustomDataToTag
- Overrides:
writeCustomDataToTag
in classAbstractDecorationEntity
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTag
in classAbstractDecorationEntity
-
interact
Called when a player interacts with this entity. -
getComparatorPower
public int getComparatorPower() -
createSpawnPacket
- Specified by:
createSpawnPacket
in classEntity
-