PyAnvilEditor icon indicating copy to clipboard operation
PyAnvilEditor copied to clipboard

I need a little bit of help to understand the lib

Open Nick403 opened this issue 2 years ago • 0 comments

How to edit a value for specific thing like SpawnX and save that?

I added sets in the nbt.py:

def sets(self):
            self.children['SpawnX'] = IntTag(100000)
            return self.children['SpawnX']

I added the following code in main

test = level_data.get("Data").sets()
new = level_data.get("Data").get("SpawnX")

and it returns : IntTag 'None' = 100000

Nick403 avatar Aug 10 '22 21:08 Nick403