twoolie / NBT

Python Parser/Writer for the NBT file format, and it's container the RegionFile.
MIT License
361 stars 74 forks source link

'TAG_End' is not defined #165

Closed SyndiShanX closed 1 year ago

SyndiShanX commented 1 year ago

I can't create a list with list_ench = TAG_List(name="ench", type=TAG_End) as it errors saying with NameError: name 'TAG_End' is not defined

from nbt.nbt import *
nbtfile = NBTFile()

list_i = TAG_List(name="i", type=TAG_Compound)
compound_main = TAG_Compound()

compound_tag = TAG_Compound(name="tag")

list_ench = TAG_List(name="ench", type=TAG_End)
compound_tag.tags.append(list_ench)

compound_main.tags.append(compound_tag)
list_i.tags.append(compound_main)
nbtfile.tags.append(list_i)
print(nbtfile.pretty_tree())
InputBlackBoxOutput commented 1 year ago

I am having a similar issue while defining the following using the package

image

Did you find a resolution for this?

SyndiShanX commented 1 year ago

I don't remember, but I think you just ignore Tag_Ends

SyndiShanX commented 1 year ago

If it somehow helps, here's the project I was working on when I ran into this https://github.com/SyndiShanX/Skyblock-Item-NBT-Generator