29 private array $weightedBiomes,
30 private int $conditionJSON,
31 private int $minPassingNeighbors,
39 public function getConditionJSON() : int{ return $this->conditionJSON; }
41 public function getMinPassingNeighbors() : int{ return $this->minPassingNeighbors; }
43 public static function read(ByteBufferReader $in) : self{
45 for($i = 0, $count = VarInt::readUnsignedInt($in); $i < $count; ++$i){
46 $weightedBiomes[] = BiomeWeightedData::read($in);
49 $conditionJSON = LE::readSignedShort($in);
50 $minPassingNeighbors = LE::readUnsignedInt($in);
59 public function write(ByteBufferWriter $out) : void{
60 VarInt::writeUnsignedInt($out, count($this->weightedBiomes));
61 foreach($this->weightedBiomes as $biome){
65 LE::writeSignedShort($out, $this->conditionJSON);
66 LE::writeUnsignedInt($out, $this->minPassingNeighbors);