KubeJS

KubeJS

61M Downloads

NeoForge 1.21: how to create item with nbt?

yu-re-ka opened this issue ยท 2 comments

commented

Minecraft Version

1.21

KubeJS Version

2101.7.1-build.181

Rhino Version

2101.2.5-build.54

Architectury Version

13.0.6

Forge/Fabric Version

NeoForge 21.1.72

Describe your issue

ItemWrapper.of(..., CompoundTag) no longer exists. How to create an item with nbt data (charge level of an AE2 portable cell)?

Crash report/logs

No response

commented

NBT doesn't exist in 1.21 anymore. Depending on the implementation, you might want to use data components.
https://docs.neoforged.net/docs/items/datacomponents/

commented

Thanks, I managed to do it with "minecraft:potion[minecraft:potion_contents=\"minecraft:water\"]