mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 19:37:17 +00:00
Corrected Fence Gate activation
This commit is contained in:
parent
084acfab00
commit
9cdd616852
@ -50,7 +50,13 @@ class FenceGateBlock extends TransparentBlock{
|
||||
);
|
||||
}
|
||||
public function onActivate(BlockAPI $level, Item $item, Player $player){
|
||||
$this->meta ^= 0x04;
|
||||
$faces = array(
|
||||
0 => 3,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 2,
|
||||
);
|
||||
$this->meta = ($faces[$player->entity->getDirection()] & 0x03) | ((~$this->meta) & 0x04);
|
||||
$level->setBlock($this, $this->id, $this->meta);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user