mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 08:19:45 +00:00
Door: fix deserialization of top flag
it's not clear what bugs this caused, if any, but nonetheless it is incorrect.
This commit is contained in:
parent
962e6162eb
commit
f302517a2d
@ -58,7 +58,7 @@ class Door extends Transparent{
|
||||
}
|
||||
|
||||
public function readStateFromData(int $id, int $stateMeta) : void{
|
||||
$this->top = $stateMeta & BlockLegacyMetadata::DOOR_FLAG_TOP;
|
||||
$this->top = ($stateMeta & BlockLegacyMetadata::DOOR_FLAG_TOP) !== 0;
|
||||
if($this->top){
|
||||
$this->hingeRight = ($stateMeta & BlockLegacyMetadata::DOOR_TOP_FLAG_RIGHT) !== 0;
|
||||
$this->powered = ($stateMeta & BlockLegacyMetadata::DOOR_TOP_FLAG_POWERED) !== 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user