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]
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("")
def read(self, nbt: NBT, network: bool = False): self.value = nbt.getInt(network)