content 02
Blocks
Every .yml file in blocks/ is loaded. Each top-level key is one block id.
A custom block is a vanilla block plus an id. When a player places an item whose stored Tessera id matches a block id, the id is written into the chunk's PersistentDataContainer at that position, and into the block's own container when the block is a tile entity. Breaking it runs your drop table instead of the vanilla one.
Keys
| Key | Type | Default | Notes |
|---|---|---|---|
block_material | material name | NOTE_BLOCK | material is accepted as a second spelling. Unknown names fall back to NOTE_BLOCK. |
display_name | MiniMessage | the id | Name of the item form. |
hardness | number | 1.0 | Stored and shown by /tessera block info. It does not change break speed in 2.0.0. |
required_tool | string | ANY | ANY and NONE disable the tool check. |
minimum_tier | string | NONE | Tier the tool has to reach. |
sounds.place | sound name | unset | Also accepted as place_sound. |
sounds.break | sound name | unset | Also accepted as break_sound. |
sounds.step | sound name | unset | Also accepted as step_sound. |
sounds.hit | sound name | unset | Also accepted as hit_sound. |
light_level | integer | 0 | Parsed and stored. Not applied to world lighting in 2.0.0. |
cancel_drop | boolean | false | Break with no drops at all. |
custom_model_data | integer | 0 | Parsed and stored. The item form is built from the matching custom item when there is one. |
drops | list or section | the block itself | See below. |
Drop tables
drops takes either a list or a section. Each entry has item, min, max and chance.
# plugins/Tessera/blocks/ruby_block.yml
ruby_block:
block_material: NOTE_BLOCK
display_name: "<gradient:#ff416c:#ff4b2b><bold>Ruby Block</bold></gradient>"
hardness: 5.0
required_tool: PICKAXE
minimum_tier: IRON
sounds:
place: BLOCK_STONE_PLACE
break: BLOCK_STONE_BREAK
step: BLOCK_STONE_STEP
hit: BLOCK_STONE_HIT
drops:
- item: ruby
min: 9
max: 9
chance: 1.0
Defaults per entry: min is 1, max is min, chance is 1.0. A plain string entry is treated
as one guaranteed drop of that id. When drops is absent and cancel_drop is false, the block drops
itself once.
Drop ids are resolved as a vanilla material first and as a custom item second. Do not name a custom item after a vanilla material if you want the custom one to drop.
Tool gate: when required_tool is neither ANY nor NONE and the tool does not match, the block
drops nothing.
required_tool understands PICKAXE, AXE, SHOVEL, HOE, SWORD and SHEARS. Any other value
is matched as a substring of the material name. minimum_tier understands NONE, WOOD or
WOODEN, GOLD or GOLDEN (both rank 1), STONE, IRON, DIAMOND and NETHERITE.
Behaviour in the world
- Pistons cannot move custom blocks. Extend and retract events that touch one are cancelled.
- Block and entity explosions remove the stored id and run the drop table.
- Note blocks used as bases do not play their note when clicked.
- The place and break sounds from the config are played on the matching events.
Storage
The id lives in the chunk container under a key derived from the block position, so it survives
restarts and chunk unloads. Removing a block through /tessera block remove clears that entry.
/tessera block info # what you are looking at
/tessera block remove # tessera.admin
Not configurable in 2.0.0
blast_resistance, fortune multipliers, requires_tool, tool_tier and the sound_group spelling
appear only in config comments. The parser does not read them.