mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
A giant hack to cut down code needed for runtime block serialization by 50%
this also avoids repeated information and inconsistencies.
This commit is contained in:
@ -31,12 +31,8 @@ class Sponge extends Opaque{
|
||||
|
||||
public function getRequiredTypeDataBits() : int{ return 1; }
|
||||
|
||||
protected function decodeType(RuntimeDataReader $r) : void{
|
||||
$this->wet = $r->readBool();
|
||||
}
|
||||
|
||||
protected function encodeType(RuntimeDataWriter $w) : void{
|
||||
$w->writeBool($this->wet);
|
||||
protected function describeType(RuntimeDataReader|RuntimeDataWriter $w) : void{
|
||||
$w->bool($this->wet);
|
||||
}
|
||||
|
||||
public function isWet() : bool{ return $this->wet; }
|
||||
|
Reference in New Issue
Block a user