NBT-API

NBT-API

98.9k Downloads

addCompound overwrites Tags

tr7zw opened this issue ยท 0 comments

commented

addCompound overwrites Tags and doesn't just get them.

    NBTItem nbtItem = new NBTItem(item);
 
    NBTCompound comp = nbtItem.addCompound("testCompound");
 
    comp.setString("FirstCompoundKey", "FirstCompoundValue");
 
    NBTCompound comp2 = nbtItem.addCompound("testCompound");
 
    comp2.setString("SecondCompoundKey", "SecondCompoundKey");

should be equal to

NBTItem nbtItem = new NBTItem(item);

NBTCompound comp = nbtItem.addCompound("testCompound");

comp.setString("FirstCompoundKey", "FirstCompoundValue");

NBTCompound comp2 = nbtItem.getCompound("testCompound");

comp2.setString("SecondCompoundKey", "SecondCompoundKey");