mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
Corrected Fence Gate activation
This commit is contained in:
parent
084acfab00
commit
9cdd616852
1 changed files with 7 additions and 1 deletions
|
|
@ -50,7 +50,13 @@ class FenceGateBlock extends TransparentBlock{
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public function onActivate(BlockAPI $level, Item $item, Player $player){
|
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);
|
$level->setBlock($this, $this->id, $this->meta);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue