24 public function __construct(
25 private int $steepBlock,
26 private bool $northSlopes,
27 private bool $southSlopes,
28 private bool $westSlopes,
29 private bool $eastSlopes,
30 private bool $topSlideEnabled,
33 public function getSteepBlock() :
int{
return $this->steepBlock; }
35 public function hasNorthSlopes() :
bool{
return $this->northSlopes; }
37 public function hasSouthSlopes() :
bool{
return $this->southSlopes; }
39 public function hasWestSlopes() :
bool{
return $this->westSlopes; }
41 public function hasEastSlopes() :
bool{
return $this->eastSlopes; }
43 public function hasTopSlideEnabled() :
bool{
return $this->topSlideEnabled; }
45 public static function read(ByteBufferReader $in) :
self{
46 $steepBlock = LE::readUnsignedInt($in);
47 $northSlopes = CommonTypes::getBool($in);
48 $southSlopes = CommonTypes::getBool($in);
49 $westSlopes = CommonTypes::getBool($in);
50 $eastSlopes = CommonTypes::getBool($in);
51 $topSlideEnabled = CommonTypes::getBool($in);
63 public function write(ByteBufferWriter $out) :
void{
64 LE::writeUnsignedInt($out, $this->steepBlock);
65 CommonTypes::putBool($out, $this->northSlopes);
66 CommonTypes::putBool($out, $this->southSlopes);
67 CommonTypes::putBool($out, $this->westSlopes);
68 CommonTypes::putBool($out, $this->eastSlopes);
69 CommonTypes::putBool($out, $this->topSlideEnabled);