public class ItemFrameEntity extends AbstractDecorationEntity
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private boolean |
fixed |
private static Logger |
ITEM_FRAME_LOGGER |
private static TrackedData<ItemStack> |
ITEM_STACK |
private float |
itemDropChance |
private static TrackedData<Integer> |
ROTATION |
attachmentPos, facing, PREDICATE
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
Constructor and Description |
---|
ItemFrameEntity(EntityType<? extends ItemFrameEntity> type,
World world) |
ItemFrameEntity(World world,
BlockPos pos,
Direction direction) |
Modifier and Type | Method and 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) |
applyMirror, applyRotation, calculateDimensions, collides, dropStack, getDecorationBlockPos, getHorizontalFacing, handleAttack, onStruckByLightning, shouldSetPositionOnLoad, tick, updatePosition
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
private static final Logger ITEM_FRAME_LOGGER
private static final TrackedData<ItemStack> ITEM_STACK
private static final TrackedData<Integer> ROTATION
private float itemDropChance
private boolean fixed
public ItemFrameEntity(EntityType<? extends ItemFrameEntity> type, World world)
protected float getEyeHeight(EntityPose pose, EntityDimensions dimensions)
getEyeHeight
in class Entity
protected void initDataTracker()
initDataTracker
in class AbstractDecorationEntity
protected void setFacing(Direction facing)
setFacing
in class AbstractDecorationEntity
protected void updateAttachmentPosition()
updateAttachmentPosition
in class AbstractDecorationEntity
public boolean canStayAttached()
canStayAttached
in class AbstractDecorationEntity
public void move(MovementType type, Vec3d movement)
move
in class AbstractDecorationEntity
public void addVelocity(double deltaX, double deltaY, double deltaZ)
addVelocity
in class AbstractDecorationEntity
public float getTargetingMargin()
getTargetingMargin
in class Entity
public boolean damage(DamageSource source, float amount)
damage
in class AbstractDecorationEntity
public int getWidthPixels()
getWidthPixels
in class AbstractDecorationEntity
public int getHeightPixels()
getHeightPixels
in class AbstractDecorationEntity
@Environment(value=CLIENT) public boolean shouldRender(double distance)
shouldRender
in class Entity
public void onBreak(@Nullable Entity entity)
onBreak
in class AbstractDecorationEntity
public void onPlace()
onPlace
in class AbstractDecorationEntity
private void removeFromFrame(ItemStack map)
public ItemStack getHeldItemStack()
public void setHeldItemStack(ItemStack stack)
public void setHeldItemStack(ItemStack value, boolean update)
public void onTrackedDataSet(TrackedData<?> data)
onTrackedDataSet
in class Entity
public int getRotation()
public void setRotation(int value)
private void setRotation(int value, boolean bool)
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class AbstractDecorationEntity
public void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class AbstractDecorationEntity
public ActionResult interact(PlayerEntity player, Hand hand)
public int getComparatorPower()
public Packet<?> createSpawnPacket()
createSpawnPacket
in class Entity