Extracted state mappings from the Minecraft: Bedrock Edition used to update state NBT tags to the latest version.
All updaters are auto-generated!
NbtMap updatedNbt = ItemStateUpdaters.updateItemState(
NbtMap.builder()
.putString("Name", "minecraft:coal")
.putInt("Damage", 1) // You can use int, short, long and byte
.build(),
ItemStateUpdaters.LATEST_VERSION
);
NbtMap updatedNbt = BlockStateUpdaters.updateBlockState(
NbtMap.builder()
.putString("name", "minecraft:anvil")
.putCompound("states", NbtMap.builder()
.putString("damage", "very_damaged")
.putInt("direction", 3)
.build())
.build(),
BlockStateUpdaters.LATEST_VERSION
);