mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Block::readStateFromWorld() now returns the block object that should be used for the target position
this enables changing the block type completely if the situation calls for it.
This commit is contained in:
@ -59,7 +59,7 @@ class Stair extends Transparent{
|
||||
$w->writeBool($this->upsideDown);
|
||||
}
|
||||
|
||||
public function readStateFromWorld() : void{
|
||||
public function readStateFromWorld() : Block{
|
||||
parent::readStateFromWorld();
|
||||
|
||||
$clockwise = Facing::rotateY($this->facing, true);
|
||||
@ -70,6 +70,8 @@ class Stair extends Transparent{
|
||||
}else{
|
||||
$this->shape = StairShape::STRAIGHT();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isUpsideDown() : bool{ return $this->upsideDown; }
|
||||
|
Reference in New Issue
Block a user