Unsure how to format NBT data for custom NBT Datas
Saereth opened this issue ยท 7 comments
so I've been able to add in some new vanilla potions and enchants without much issues, the examples worked fine. I need to create custom loot however that would be similar to this
item defined in the chest.cfg"
modularmachinery:itemblueprint
NBT Data I need to specify:
{dynamicmachine: "modularmachinery:mana_concentrator"}
I've tried
BLUEPRINT String dynamicmachine "modularmachinery:mana_concentrator"
but it just spawns the item with no NBT data, any help would be appreciated, pretty sure this is user error but in case its a bug I'd be happy to provide any additional info
There may be a version with an alternate system coming out this even, once I have a chance to clear my head of some personal life, test the new version, compile and upload it. You can thank Hubry for the fix / extension.
Want to be a beta tester? Try out this new system and see if you can make it work this way:
http://www.mediafire.com/file/8vsisfk31u18dns/DoomlikeDungeons-1.12.1-MC1.12.2.jar/file
Info / new example here: http://www.mediafire.com/file/7lbikcnzrz127db/nbt.cfg/file
it's working great now
https://imgur.com/a/aHOgb6n
modularmachinery:itemblueprint, 1, 1, BLUEPRINT
...would be correct for the item (not couting category and level missing at the beginning).
Now where to put the NBT string for that mod I don't know -- they can be complicated. Take the vanilla example:
EEGG5 String Name "Fortuna Major"
EEGG6 Compound display EEGG5
...where Name has to be put inside display for it to work. If the tag is attached right at the bottom / root / whatever-its-called of the item's NBT (and is correct) it should work if the mod put it somewhere else (or Forge puts all the tags in some place I don't know of) it might not find it.
This is how minecraft stores the NBT for the item
root
->dynamicmachine => modularmachinery:mana_concentrator
Screenshot of NBT edit with a potion for reference
https://imgur.com/a/JO7cHut
the item spawns, as defined in chests.cfg as defined:
heal, 1 modularmachinery:itemblueprint, 1, 1, CONCENTRATOR
the NBT in nbt.cfg is defined as:
CONCENTRATOR String dynamicmachine modularmachinery:mana_concentrator
which coincides with how the potion nbt data works, unfortunately the item still spawns in with no nbt
data, a blank blueprint instead of the machine specific one. I similarly tried this with a botania flask potion that has the entries
heal, 1, botania:brewvial, 1, 1, BOTANIANIGHTVISION
and nbt.cfg:
BOTANIANIGHTVISION String brewKey nightVision
it also spawns in with no nbt at all
I also tried encapsulating the nbt entries in quotes like
CONCENTRATOR String dynamicmachine "modularmachinery:mana_concentrator"
also tried setting it as a Compound tag instead of a string, same thing
and it made no difference. The log file throws the errror:
[08:34:58] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.nbt.NBTHelper:setNbtTag:44]: ERROR! null tag on item item.modularmachinery.itemblueprint
I'm at a loss at this point one what I need to do differently