Replace disallowed operators in src/block/

This commit is contained in:
Dylan K. Taylor
2022-01-20 16:57:09 +00:00
parent 2f32bd877a
commit 79d1feff9c
67 changed files with 169 additions and 169 deletions

View File

@ -80,7 +80,7 @@ class FenceGate extends Transparent{
private function checkInWall() : bool{
return (
$this->getSide(Facing::rotateY($this->facing, false)) instanceof Wall or
$this->getSide(Facing::rotateY($this->facing, false)) instanceof Wall ||
$this->getSide(Facing::rotateY($this->facing, true)) instanceof Wall
);
}
@ -105,7 +105,7 @@ class FenceGate extends Transparent{
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
$this->open = !$this->open;
if($this->open and $player !== null){
if($this->open && $player !== null){
$playerFacing = $player->getHorizontalFacing();
if($playerFacing === Facing::opposite($this->facing)){
$this->facing = $playerFacing;