Пример #1
0
 def read(self, nbt: NBT, network: bool = False):
     size = nbt.getInt(network)
     if nbt.endianness == NBT.LITTLE_ENDIAN:
         array = struct.unpack("<L" * len(self.value), *nbt.get(size * 4))
     else:
         array = struct.unpack(">L" * len(self.value), *nbt.get(size * 4))
     self.value = [v for key in array for v in key]
Пример #2
0
 def read(self, nbt: NBT, network: bool = False):
     self.value = {}
     self.tagType = nbt.getByte()
     size = nbt.getInt(network)
     i = 0
     while i < size and not nbt.feof():
         if self.tagType == NBT.TAG_Byte:
             tag = ByteTag("")
Пример #3
0
 def read(self, nbt: NBT, network: bool = False):
     self.value = nbt.getInt(network)