public function getInt()
{
return $this->endianness === self::BIG_ENDIAN ? Binary::readInt($this->get(4)) : Binary::readLInt($this->get(4));
}
public function read(NBT $nbt) { $this->value = []; $size = $nbt->getInt(); $value = unpack($nbt->endianness === NBT::LITTLE_ENDIAN ? "V*" : "N*", $nbt->get($size * 4)); foreach ($value as $i => $v) { $this->value[$i - 1] = $v; } }