diff --git a/src/pocketmine/block/ItemFrame.php b/src/pocketmine/block/ItemFrame.php index 8373c0f3c..41179f1fd 100644 --- a/src/pocketmine/block/ItemFrame.php +++ b/src/pocketmine/block/ItemFrame.php @@ -72,10 +72,10 @@ class ItemFrame extends Flowable{ public function onUpdate(int $type){ if($type === Level::BLOCK_UPDATE_NORMAL){ $sides = [ - 0 => 4, - 1 => 5, - 2 => 2, - 3 => 3 + 0 => Vector3::SIDE_WEST, + 1 => Vector3::SIDE_EAST, + 2 => Vector3::SIDE_NORTH, + 3 => Vector3::SIDE_SOUTH ]; if(!$this->getSide($sides[$this->meta])->isSolid()){ $this->level->useBreakOn($this); diff --git a/src/pocketmine/block/Torch.php b/src/pocketmine/block/Torch.php index 02f1fc5fa..39247a5cd 100644 --- a/src/pocketmine/block/Torch.php +++ b/src/pocketmine/block/Torch.php @@ -50,15 +50,15 @@ class Torch extends Flowable{ $below = $this->getSide(Vector3::SIDE_DOWN); $side = $this->getDamage(); $faces = [ - 0 => 0, - 1 => 4, - 2 => 5, - 3 => 2, - 4 => 3, - 5 => 0 + 0 => Vector3::SIDE_DOWN, + 1 => Vector3::SIDE_WEST, + 2 => Vector3::SIDE_EAST, + 3 => Vector3::SIDE_NORTH, + 4 => Vector3::SIDE_SOUTH, + 5 => Vector3::SIDE_DOWN ]; - if($this->getSide($faces[$side])->isTransparent() === true and !($side === 0 and ($below->getId() === self::FENCE or $below->getId() === self::COBBLESTONE_WALL))){ + if($this->getSide($faces[$side])->isTransparent() === true and !($side === Vector3::SIDE_DOWN and ($below->getId() === self::FENCE or $below->getId() === self::COBBLESTONE_WALL))){ $this->getLevel()->useBreakOn($this); return Level::BLOCK_UPDATE_NORMAL;