24 public const BIOME_TYPE_DEFAULT = 0;
25 public const BIOME_TYPE_USER_DEFINED = 1;
27 public function __construct(
28 private int $biomeType,
29 private string $biomeName,
30 private int $dimension
33 public function getBiomeType() :
int{
34 return $this->biomeType;
37 public function getBiomeName() :
string{
38 return $this->biomeName;
45 return $this->dimension;
48 public static function read(ByteBufferReader $in) : self{
49 $biomeType = LE::readUnsignedShort($in);
50 $biomeName = CommonTypes::getString($in);
51 $dimension = VarInt::readSignedInt($in);
53 return new self($biomeType, $biomeName, $dimension);
56 public function write(ByteBufferWriter $out) : void{
57 LE::writeUnsignedShort($out, $this->biomeType);
58 CommonTypes::putString($out, $this->biomeName);
59 VarInt::writeSignedInt($out, $this->dimension);