mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
PM5-specific changes for 1.20.0.23 beta
This commit is contained in:
@ -141,6 +141,20 @@ final class BlockStateWriter{
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by pumpkins as of 1.20.0.23 beta
|
||||
* @return $this
|
||||
*/
|
||||
public function writeCardinalHorizontalFacing(int $value) : self{
|
||||
return $this->writeString(BlockStateNames::CARDINAL_DIRECTION, match($value){
|
||||
Facing::SOUTH => StringValues::CARDINAL_DIRECTION_SOUTH,
|
||||
Facing::WEST => StringValues::CARDINAL_DIRECTION_WEST,
|
||||
Facing::NORTH => StringValues::CARDINAL_DIRECTION_NORTH,
|
||||
Facing::EAST => StringValues::CARDINAL_DIRECTION_EAST,
|
||||
default => throw new BlockStateSerializeException("Invalid horizontal facing $value")
|
||||
});
|
||||
}
|
||||
|
||||
/** @return $this */
|
||||
public function writeColor(DyeColor $color) : self{
|
||||
$this->writeString(BlockStateNames::COLOR, match($color->id()){
|
||||
|
Reference in New Issue
Block a user