Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Block entity format: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 52: Line 52:
|-
|-
| command_block
| command_block
| [[Minecraft:Command Block]]
| [[Minecraft:Command Block]]s
|-
|-
| conduit
| conduit
Line 211: Line 211:
{{collapse|title={{BlockSprite|lectern|link=Lectern|text='''lectern'''}}|content={{#lst:Lectern|block data}}}}
{{collapse|title={{BlockSprite|lectern|link=Lectern|text='''lectern'''}}|content={{#lst:Lectern|block data}}}}
{{collapse|title={{BlockSprite|monster-spawner|link=Monster Spawner|text='''mob_spawner'''}}|content={{#lst:Monster Spawner|block data}}}}
{{collapse|title={{BlockSprite|monster-spawner|link=Monster Spawner|text='''mob_spawner'''}}|content={{#lst:Monster Spawner|block data}}}}
{{collapse|title={{BlockSprite|piston|link=Piston/Technical components#Moving piston|text='''piston'''}}|content={{#lst:Piston/Technical components|block data}}}}
{{collapse|title={{BlockSprite|moving-piston|link=Piston/Technical components#Moving piston|text='''piston'''}}|content={{#lst:Piston/Technical components|block data}}}}
{{collapse|title={{BlockSprite|potent-sulfur|link=Potent Sulfur|text='''potent_sulfur'''}}|content={{#lst:Potent Sulfur|block data}}}}
{{collapse|title={{BlockSprite|potent-sulfur|link=Potent Sulfur|text='''potent_sulfur'''}}|content={{#lst:Potent Sulfur|block data}}}}
{{collapse|title={{BlockSprite|sculk-catalyst|link=Sculk Catalyst|text='''sculk_catalyst'''}}|content={{#lst:Sculk Catalyst|block data}}}}
{{collapse|title={{BlockSprite|sculk-catalyst|link=Sculk Catalyst|text='''sculk_catalyst'''}}|content={{#lst:Sculk Catalyst|block data}}}}
Line 222: Line 222:
{{collapse|title={{BlockSprite|soul-campfire|link=Soul Campfire|text='''soul_campfire'''}}|content={{#lst:Campfire|block data}}}}
{{collapse|title={{BlockSprite|soul-campfire|link=Soul Campfire|text='''soul_campfire'''}}|content={{#lst:Campfire|block data}}}}
{{collapse|title={{BlockSprite|structure-block|link=Structure Block|text='''structure_block'''}}|content={{#lst:Structure Block|block data}}}}
{{collapse|title={{BlockSprite|structure-block|link=Structure Block|text='''structure_block'''}}|content={{#lst:Structure Block|block data}}}}
<!--{{collapse|title={{BlockSprite|test-block|link=Test Block|text='''test_block'''}}|content={{#lst:Test Block|block data}}}}
{{collapse|title={{BlockSprite|test-block|link=Test Block|text='''test_block'''}}|content={{#lst:Test Block|block data}}}}
{{collapse|title={{BlockSprite|test-instance-block|link=Test Instance Block|text='''test_instance_block'''}}|content={{#lst:Test Instance Block|block data}}}}-->
{{collapse|title={{BlockSprite|test-instance-block|link=Test Instance Block|text='''test_instance_block'''}}|content={{#lst:Test Instance Block|block data}}}}
{{collapse|title={{BlockSprite|trapped-chest|link=Trapped Chest|text='''trapped_chest'''}}|content={{#lst:Chest|block data}}}}
{{collapse|title={{BlockSprite|trapped-chest|link=Trapped Chest|text='''trapped_chest'''}}|content={{#lst:Chest|block data}}}}
{{collapse|title={{BlockSprite|trial-spawner|link=Trial Spawner|text='''trial_spawner'''}}|content={{#lst:Trial Spawner|block data}}}}
{{collapse|title={{BlockSprite|trial-spawner|link=Trial Spawner|text='''trial_spawner'''}}|content={{#lst:Trial Spawner|block data}}}}
Line 230: Line 230:


== History ==
== History ==
{{info needed section|How were chest and furnace contents handled in their initial implementation versions? Or spawner entities? Or signs, when implemented as placed blocks rather than as entities?}}
{{info needed section|All data field changes/removals/additions}}
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java indev}}
|{{HistoryLine||0.31|dev=20100124-2119|Added tile entities.
|Added <code>Chest</code> for chests.}}
|{{HistoryLine||20100219|Added <code>Furnace</code> for furnaces.}}
|{{HistoryLine|java infdev}}
|{{HistoryLine||20100607|Added <code>Sign</code> for signs.}}
|{{HistoryLine||20100625-1917|Added monster spawners, however, they reused the ID for signs resulting in issues.}}
|{{HistoryLine||20100627|Added <code>MobSpawner</code> for monster spawners to fix the issues mentioned above.}}
|{{HistoryLine|java beta}}
|{{HistoryLine|java beta}}
|{{HistoryLine||1.2|Added <code>Trap</code> for dispensers.
|{{HistoryLine||1.2|Added <code>Trap</code> for dispensers.
Line 268: Line 276:
|Removed <code>Record</code> from <code>jukebox</code>.}}
|Removed <code>Record</code> from <code>jukebox</code>.}}
|{{HistoryLine|||dev=18w15a|Added <code>conduit</code> for conduits.}}
|{{HistoryLine|||dev=18w15a|Added <code>conduit</code> for conduits.}}
|{{HistoryLine|||dev=1.13-pre1|Added <code>keepPacked</code> to all block entities}}
|{{HistoryLine||1.14|dev=18w44a|Added <code>barrel</code> for barrels.
|{{HistoryLine||1.14|dev=18w44a|Added <code>barrel</code> for barrels.
|Added <code>bell</code> for bells.
|Added <code>bell</code> for bells.
Line 311: Line 320:
|The <code>jigsaw</code> fields, <code>name</code>, <code>target</code>, and <code>pool</code> now default to <code>minecraft:empty</code> if not specified, and the <code>final_state</code> field now defaults to <code>minecraft:air</code> if not specified.
|The <code>jigsaw</code> fields, <code>name</code>, <code>target</code>, and <code>pool</code> now default to <code>minecraft:empty</code> if not specified, and the <code>final_state</code> field now defaults to <code>minecraft:air</code> if not specified.
|The <code>warning_level</code> field for <code>sculk_shrieker</code> now defaults to 0 if not specified.
|The <code>warning_level</code> field for <code>sculk_shrieker</code> now defaults to 0 if not specified.
|<code>structure_block</code>The <code>ignoreEntities</code> and <code>showboundingbox</code> fields now default to <code>true</code> if not specified, the <code>posY</code> field now defaults to 1 if not specified.}}
|The <code>ignoreEntities</code> and <code>showboundingbox</code> fields for <code>structure_block</code> now default to <code>true</code> if not specified, the <code>posY</code> field now defaults to 1 if not specified.}}
|{{HistoryLine||1.21.9|dev=25w31a|Added <code>copper_golem_statue</code> for copper golem statues.
|{{HistoryLine||1.21.9|dev=25w31a|Added <code>copper_golem_statue</code> for copper golem statues.
|Added <code>shelf</code> for shelves.}}
|Added <code>shelf</code> for shelves.}}
Line 317: Line 326:
|{{HistoryLine||26.2|dev=snap3|Removed <code>bed</code> for beds.}}
|{{HistoryLine||26.2|dev=snap3|Removed <code>bed</code> for beds.}}
|{{HistoryLine|||dev=snap5|Added <code>potent_sulfur</code> for potent sulfur.}}
|{{HistoryLine|||dev=snap5|Added <code>potent_sulfur</code> for potent sulfur.}}
|{{HistoryLine||26.3|dev=snap1|{{cd|minecraft:decorated_pot}}: Field {{cd|sherds}} no longer stores a list of 4 item IDs. Instead, the new format is an object with 4 optional item stack fields.}}
|{{HistoryLine||26.3|dev=snap1|The <code>sherds</code> field for <code>decorated_pot</code> no longer stores a list of 4 item IDs. Instead, the new format is an object with 4 optional item stack fields.}}
}}
}}



Latest revision as of 11:04, 12 October 2026

Template:Distinguish Template:For Template:Exclusive

A Minecraft:block entity is used to store information about a block that can't be stored in the block's Minecraft:block states. It is stored inside the chunk data and Minecraft:structure files.

Block Entities
Block Entity ID Associated Block
banner Minecraft:Banners
barrel Minecraft:Barrel
beacon Minecraft:Beacon
beehive Minecraft:Bee Nest/Minecraft:Beehive
bell Minecraft:Bell
blast_furnace Minecraft:Blast Furnace
brewing_stand Minecraft:Brewing Stand
brushable_block Minecraft:Suspicious Gravel/Minecraft:Suspicious Sand
calibrated_sculk_sensor Minecraft:Calibrated Sculk Sensor
campfire Minecraft:Campfire
chest Minecraft:Chest/Minecraft:Copper Chests
chiseled_bookshelf Minecraft:Chiseled Bookshelf
comparator Minecraft:Redstone Comparator
command_block Minecraft:Command Blocks
conduit Minecraft:Conduit
copper_golem_statue Minecraft:Copper Golem Statues
crafter Minecraft:Crafter
creaking_heart Minecraft:Creaking Heart
daylight_detector Minecraft:Daylight Detector
decorated_pot Minecraft:Decorated Pot
dispenser Minecraft:Dispenser
dropper Minecraft:Dropper
enchanting_table Minecraft:Enchanting Table
ender_chest Minecraft:Ender Chest
end_gateway End Gateway
end_portal End Portal
furnace Minecraft:Furnace
hanging_sign Minecraft:Hanging Signs
hopper Minecraft:Hopper
jigsaw Minecraft:Jigsaw Block
jukebox Minecraft:Jukebox
lectern Minecraft:Lectern
mob_spawner Minecraft:Monster Spawner
piston Minecraft:Moving Piston
potent_sulfur Minecraft:Potent Sulfur
shelf Minecraft:Shelves
shulker_box Minecraft:Shulker Boxes
sign Minecraft:Signs
skull Minecraft:Heads
sculk_catalyst Minecraft:Sculk Catalyst
sculk_sensor Minecraft:Sculk Sensor
sculk_shrieker Minecraft:Sculk Shrieker
smoker Minecraft:Smoker
soul_campfire Minecraft:Soul Campfire
structure_block Minecraft:Structure Block
test_block Minecraft:Test Block
test_instance_block Minecraft:Test Instance Block
trapped_chest Minecraft:Trapped Chest
trial_spawner Minecraft:Trial Spawner
vault Minecraft:Vault

NBT format

Block entities are stored using Minecraft:NBT in the following format:

  • Template:Nbt: A block entity<section begin="nbt format" />
    • Template:Nbt: Block entity ID
    • Template:Nbt: 1 or 0 (Template:Cd) - If true, this is an invalid block entity, and this block is not immediately placed when a loaded chunk is loaded. If false, this is a normal block entity that can be immediately placed.
    • Template:Nbt: X coordinate of the block entity.
    • Template:Nbt: Y coordinate of the block entity.
    • Template:Nbt: Z coordinate of the block entity.
    • Template:Nbt: Optional map of data components that are not represented by additional fields.
    • Additional fields depending on the block entity type (Template:Nbt), see Template:Slink

Types

Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse

History

Template:Info needed section Template:HistoryTable

Navigation

Template:Navbox Java Edition technical

Minecraft:ja:ブロックエンティティフォーマット Minecraft:ko:블록 개체 형식 Minecraft:uk:Формат блока-сутности Minecraft:zh:方块实体数据格式