fNbt
fNbt copied to clipboard
System.NullReferenceException:
This is where i get the exception.
With most schematic files it works ok. But with some other schematic files i get this error "System.NullReferenceException"
You are most likely getting a NullReferenceException because root.Get(...)
cannot find a tag named "Blocks". When a given tag cannot be found, root.Get(...)
returns null. Trying to get ByteArrayValue from that null will throw a NullReferenceException.
Could you share an example .schematic file please? It's possible that the capitalization is wrong ("blocks" or "BLOCKS" is not the same as "Blocks") or that the tag is missing.