Items entities are entities which contain the data attributed to blocks, tools, armour or resources. Items entities can be picked up by the player or by hoppers/hopper minecarts.
Item entities can be created in any of the following ways:
- After the death of a mob the loot table will be dropped
- After the destruction of a block the loot table will be dropped
- A player dropping an item
- A dropper or dispensing (for non dispensable item) being powered
- A villager throwing food for breeding or prizes after a raid
- Wool, carved pumpkins, and mushrooms from shearing sheep, snowmen, and mooshrooms respectively
- An item frame containing an item being damaged
- Chickens laying eggs
- Pumpkin seeds dropped after carving a pumpkin
- Scutes dropped from baby turtles when growing up
Item entities can be removed in any of the following ways:
- Burning in fire or soul fire
- Burning in lava
- Touching a cactus
- Falling into void
- Getting struck by lightning
- Picked up by hoppers or hopper minecarts
- Picked up by player
- Zombies, drowned, zombie villagers, or husks with can pick up loot grabbing any item
- Skeletons, strays, wither skeletongs, or zombie pigman picking up items for their armor slots or better weapons than what they are default holding
- Foxes biting any item to pick it up
- Villagers picking up seeds, carrots, potatoes, bread, and cake for breeding and planting
- 1.16+ piglins picking up golden items
- Despawning after 6000 in game ticks (5 minutes)
- Commands: to kill all items run "/kill @e[type=item]"
Items are static but can be moved by a piston. When inside a water (or lava in upcoming version 1.16+) stream items will travel at a speed dependant on the block beneath them. If they travel on slime blocks they will move moderately fast, and if they travel on ice/packed ice they will travel very fast. Items also slide on ice/packed ice.
If an item is in a full block which is surrounded by full blocks it will rise upwards. Mechanics:
"It will first receive a list of all blocks that colide with its bounding box. If the item collides in some way with the block's collision box OR the block its inside is a 1x1x1 block then it will iterate over all sides except downwards. If it finds a side with a non full block it will accelerate towards that side. If all sides are occupied by full 1x1x1 blocks it will accelerate directly upwards. If the list of all blocks that collide with its bounding box is empty AND the item is in a full block, it won't move at all." ~Sharir1701 [source: Minecraft Code]
Items with Special Properties Edit
- Nether stars are immune to damage via explosion.
- Ancient debris, netherite scraps, netherite ingots, netherite tools/weapons/armor are immune to burning in lava and fire
NBT Structure Edit
├ id: Entity ID. This tag does not exist for the Player entity.
├ Pos: 3 TAG_Doubles describing the current X,Y,Z position of the entity.
├ Motion: 3 TAG_Doubles describing the current dX,dY,dZ velocity of the entity in meters per tick.
├ Rotation: Two TAG_Floats representing rotation in degrees.
├ The entity's rotation clockwise around the Y axis (called yaw). Due west is 0. Does not exceed 360 degrees.
└ The entity's declination from the horizon (called pitch). Horizontal is 0. Positive values look downward. Does not exceed positive or negative 90 degrees.
├ FallDistance: Distance the entity has fallen. Larger values cause more damage when the entity lands.
├ Fire: Number of ticks until the fire is put out. Negative values reflect how long the entity can stand in fire before burning. Default -20 when not on fire.
├ Air: How much air the entity has, in ticks. Fills to a maximum of 300 in air, giving 15 seconds submerged before the entity starts to drown, and a total of up to 35 seconds before the entity dies (if it has 20 health). Decreases while underwater. If 0 while underwater, the entity loses 1 health per second.
├ OnGround: 1 or 0 (true/false) - true if the entity is touching the ground.
├ Dimension: Unknown usage; entities are only saved in the region files for the dimension they are in. -1 for [[The Nether]], 0 for [[The Overworld]], and 1 for [[The End]].
├ Invulnerable: 1 or 0 (true/false) - true if the entity should not take damage. This applies to living and nonliving entities alike: mobs will not take damage from any source (including potion effects), and cannot be moved by fishing rods, attacks, explosions, or projectiles, and objects such as vehicles and item frames cannot be destroyed unless their supports are removed. Note that these entities can be damaged by players in Creative mode.
├ PortalCooldown: The number of ticks before which the entity may be teleported back through a portal of any kind. Initially starts at 900 ticks (45 seconds) after teleportation and counts down to 0.
├ UUIDMost: The most significant bits of this entity's. This is joined with UUIDLeast to form this entity's unique ID.
├ UUIDLeast: The least significant bits of this entity's.
├ UUID: The UUID of this entity. Converts a hexadecimal UUID (for example: <code>069a79f4-44e9-4726-a5be-fca90e38aaf5</code>) into the UUIDLeast and UUIDMost tags. Will not apply new UUIDLeast and UUIDMost tags if both of these tags are already present. The "UUID" tag is removed once the entity is loaded.
├ CustomName: The custom name of this entity. Appears in player death messages and villager trading interfaces, as well as above the entity when your cursor is over it. May not exist, or may exist and be empty.
├ CustomNameVisible: 1 or 0 (true/false) - if true, and this entity has a custom name, it will always appear above them, whether or not the cursor is pointing at it. If the entity hasn't a custom name, a default name will be shown. May not exist.
├ Silent: 1 or 0 (true/false) - if true, this entity will not make sound. May not exist.
├ Riding: The data of the entity being ridden. Note that if an entity is being ridden, the ''topmost'' entity in the stack has the Pos tag, and the coordinates specify the location of the ''bottommost'' entity. Also note that the bottommost entity controls movement, while the topmost entity determines spawning conditions when created by a mob spawner.
└ See this format (recursive).
├ CommandStats: Information identifying scoreboard parameters to modify relative to the last command run
├ SuccessCountObjective: Objective's name about success of the last command (will be a boolean)
├ SuccessCountName: Fake player name about success of the last command
├ AffectedBlocksObjective: Objective's name about how many blocks were modified in the last command (will be an int)
├ AffectedBlocksName: Fake player name about how many blocks were modified in the last command
├ AffectedEntitiesObjective: Objective's name about how many entities were altered in the last command (will be an int)
├ AffectedEntitiesName: Fake player name about how many entities were altered in the last command
├ AffectedItemsObjective: Objective's name about how many items were altered in the last command (will be an int)
├ AffectedItemsName: Fake player name about how many items were altered in the last command
├ QueryResultObjective: Objective's name about the query result of the last command
└ QueryResultName: Fake player name about the query result of the last command
├ Age: The number of ticks the item entity has been loaded. If Age == 6000 the item entity is removed.
├ Health: The health of the item, which starts at 5. If Health == 0 the item entity is removed.
├ PickupDelay: The number of ticks till the item can be picked up. Decreases by 1 per tick.
├ Owner: If Owner == "" then any player can pickup the item. Else only the owner can pick up the item.
├ Thrower: When a player drops an item the thrower tag is set to the players name.
└ Item: The item inventory data, without the Slot tag.
If one Item is < 0.75m away from another item of the same type and NBT (not including count and age) the two items will stack.
Stacks of 2–16 appear as two items, 17–33 as three items, 34-49 as four items, and 50–64 as five items.
Item entities will try to merge in a specific tick, if:
Its position changed by 1 or more blocks that tick OR ticksExisted % 25 == 0
boolean var1 = (int)this.prevPosX != (int)this.posX || (int)this.prevPosY != (int)this.posY || (int)this.prevPosZ != (int)this.posZ;
if (var1 || this.ticksExisted % 25 == 0)
<Search for nearby item>
[Max age: 5 minutes*64 items in a stack=Total of 320 minutes]