1. Wiki
  2. /Blocks
  3. /minecraft:block_entity

minecraft:block_entity

Don't want to write this by hand? GodCraft sets minecraft:block_entity for you with a switch.Get GodCraft

Overview

minecraft:block_entity is a block component: it goes in the components object of a custom block. Gives each placed copy of the block its own saved data, so one block can remember things that its neighbors do not. Use it for storage blocks or blocks that scripts keep track of.

Fields

FieldTypeDefaultDescription
dynamic_propertiesbooleanfalseWhen true, scripts can save and read their own values on each placed block.
containercontainernoneGives the block an inventory that can hold items, like a chest or barrel.

Example

Inside the components object of BP/blocks/<name>.json (values are the defaults or placeholders):

BP/blocks/<name>.json
{
  "minecraft:block_entity": {
    "dynamic_properties": false,
    "container": {}
  }
}

Blocks: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more