Interface BlockEntityModifier
- All Superinterfaces:
Wrapper
- All Known Subinterfaces:
AppendLootModifier, AppendStaticModifier, ClearModifier, PassthroughModifier
Wraps Minecraft's RuleBlockEntityModifier: what a processor rule does to the block entity data of
the block it replaces, such as filling a suspicious sand block with loot.
- Since:
- 3.4.0
- See Also:
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic AppendLootModifierappendLoot(ResourceKey lootTable) Gives the block entity a loot table, as trail ruins do for suspicious gravel.static AppendStaticModifierappendStatic(String snbt) Merges fixed data into the block entity.static ClearModifierclear()Removes the block entity data.static BlockEntityModifierReads a Minecraft block entity modifier.static PassthroughModifierKeeps the block entity data as it is.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
clear
Removes the block entity data.- Returns:
- the clearing modifier
- Since:
- 3.4.0
-
passthrough
Keeps the block entity data as it is. A rule without a modifier uses this.- Returns:
- the pass-through modifier
- Since:
- 3.4.0
-
appendStatic
Merges fixed data into the block entity.- Parameters:
snbt- the data, as SNBT, for example{CustomName:'"Tomb"'}- Returns:
- an append-static modifier
- Since:
- 3.4.0
-
appendLoot
Gives the block entity a loot table, as trail ruins do for suspicious gravel.- Parameters:
lootTable- the key of the loot table- Returns:
- an append-loot modifier
- Since:
- 3.4.0
-
decode
Reads a Minecraft block entity modifier.- Parameters:
minecraftModifier- the modifier to read- Returns:
- the decoded modifier
- Since:
- 3.4.0
-