Block entity format

From Minecraft Wiki
Jump to navigation Jump to search
Not to be confused with Entity format.
This feature is exclusive to Java Edition.

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

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

NBT format

[edit | edit source]

Block entities are stored using NBT in the following format:

  • [NBT Compound / JSON Object]: A block entity
    • [String] id: Block entity ID
    • [Boolean] keepPacked: 1 or 0 (true/false) - 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.
    • [Int] x: X coordinate of the block entity.
    • [Int] y: Y coordinate of the block entity.
    • [Int] z: Z coordinate of the block entity.
    • [NBT Compound / JSON Object] components: Optional map of data components that are not represented by additional fields.
    • Additional fields depending on the block entity type ([String] id), see Block entity format § Types

Types

[edit | edit source]

History

[edit | edit source]
This section is missing information about: All data field changes/removals/additions
Please edit the article to include this information and other missing details.
Java Edition Indev
0.3120100124-2119 Added tile entities.
Added Chest for chests.
20100219 Added Furnace for furnaces.
Java Edition Infdev
20100607 Added Sign for signs.
20100625-1917 Added monster spawners, however, they reused the ID for signs resulting in issues.
20100627 Added MobSpawner for monster spawners to fix the issues mentioned above.
Java Edition Beta
1.2 Added Trap for dispensers.
Added Music for note blocks.
1.7 Added Piston for moving pistons.
1.8Pre-release Chest is now used to render chests newly changed model.
Java Edition
1.0.0Beta 1.9 Prerelease 3 Added Cauldron for brewing stands.
Added EnchantTable for enchantment tables.
Added AirPortal for End portal blocks.
1.3.112w21a Added EnderChest for ender chests.
1.4.212w32a Added Control for command blocks.
Added Beacon for beacons.
12w36a Added Skull for heads.
1.513w01a Added DLDetector for daylight sensors.
Added Hopper for hoppers.
Added Comparator for redstone comparators.
13w03a Added Dropper for droppers.
1.7.213w36a Added FlowerPot for flower pots.
1.814w30a Added Banner for banners.
1.915w31a Added EndGateway for the End gateway block.
Added Structure for structure blocks.
Added powered and conditional fields to Control
15w47a Added PaymentItem to Beacon.
15w49a Removed PaymentItem from Beacon.
1.1116w32a The namespaced ID of block entities have been lowercased, renamed and namespaced.
16w39a Added shulker_box for shulker boxes.
1.1217w15a Added bed for beds.
1.1317w47a Removed noteblock for note blocks.
Removed flower_pot for flower pots.
Removed color from bed.
Removed Base from banner.
Removed Rot and SkullType from skull.
Added trapped_chest for trapped chests.
Merged fields BlockId and BlockData into blockState for piston.
Removed Record from jukebox.
18w15a Added conduit for conduits.
1.13-pre1 Added keepPacked to all block entities
1.1418w44a Added barrel for barrels.
Added bell for bells.
Added lectern for lectern.
18w46a Added jigsaw for jigsaw block.
19w02a Added campfire for camfires.
18w50a Added blast_furnace for blast furnaces.
Added smoker for smokers.
1.1519w34a Added beehive for beehives and bee nests.
1.1720w49a Added sculk_sensor for sculk sensors.
1.19Deep Dark Experimental Snapshot 1 Added sculk_catelyst for sculk catelyst.
Added sculk_shrieker for sculk shriekers.
22w11a Implemented the previously mentioned features into normal snapshot.
1.19.3
Experiment
Update 1.20
22w42a Added chiseled_bookshelf for chiseled bookshelves.
Added hanging_sign for hanging signs.
1.19.4
Experiment
Update 1.20
23w07a Added decorated_pot for decorated pots.
Added suspicious_sand for suspicious sand.
1.2023w12a Added calibrated_sculk_sensor for calibrated sculk sensors.
Renamed suspicious_sand to brushable_block.
1.20.223w32a Some fields in beacon were changed:
  • Primary (integer) -> primary_effect (string, resource identifier)
  • Secondary (integer) -> secondary_effect (string, resource identifier)
1.20.3
Experiment
Update 1.21
23w45a Added trial_spawner for trial spawners.
23w42a Added crafter for crafters.
1.20.5
Experiment
Update 1.21
24w05a Added vault for vaults.
1.21.2
Experiment
Winter Drop
24w40a Added creaking_heart for creaking heart.
24w39a Renamed Lock field in containers to lock as now it has become a compound that represents an item predicate.
1.21.4Pre-Release 2 Some fields for furnace, blast_furnace, and smoker were changed:
  • Renamed CookTime to cooking_time_spent.
  • Renamed CookTimeTotal to cooking_total_time.
  • Renamed BurnTime to lit_time_remaining.
  • Added the field lit_total_time representing the total time the furnace should be lit.
1.21.525w03a Added test_block for test blocks.
Added test_instance_block for test instance blocks.
25w07a The CustomName field is no longer preserved when removed.
The LootTable field is no longer preserved when removed.
The exit_portal field for end_gateway is no longer preserved when removed.
The RecipesUsed field for furnace, smoker and blast_furnace is no longer preserved when removed.
The note_block_sound field for skull is no longer preserved when removed.
25w09a The CookingTimes and CookingTotalTimes for campfire fields are no longer preserved when removed.
The last_interacted_slot field for chiseled_bookshelf now defaults to -1 if not specified.
The TransferCooldown field for hopper now default to -1 if not specified.
The jigsaw fields, name, target, and pool now default to minecraft:empty if not specified, and the final_state field now defaults to minecraft:air if not specified.
The warning_level field for sculk_shrieker now defaults to 0 if not specified.
The ignoreEntities and showboundingbox fields for structure_block now default to true if not specified, the posY field now defaults to 1 if not specified.
1.21.925w31a Added copper_golem_statue for copper golem statues.
Added shelf for shelves.
25w34a Added align_items_to_bottom to shelf.
26.2snap3 Removed bed for beds.
snap5 Added potent_sulfur for potent sulfur.
26.3snap1 The sherds field for decorated_pot no longer stores a list of 4 item IDs. Instead, the new format is an object with 4 optional item stack fields.
[edit | edit source]