From ff4467ba84af42f8c23bf308d89e5f6d5653bb4d Mon Sep 17 00:00:00 2001 From: IvanCraft623 Date: Mon, 23 Sep 2024 16:28:26 -0500 Subject: [PATCH] Remove `Door::isCompatibleForHinge()` change No longer valid behavior on newer versions --- src/block/CopperDoor.php | 7 ------- src/block/Door.php | 6 +----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/block/CopperDoor.php b/src/block/CopperDoor.php index 7cf73363621..d53be2323c1 100644 --- a/src/block/CopperDoor.php +++ b/src/block/CopperDoor.php @@ -50,11 +50,4 @@ public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player return parent::onInteract($item, $face, $clickVector, $player, $returnedItems); } - - protected function isCompatibleForHinge(Block $other) : bool{ - return parent::isCompatibleForHinge($other) && - $other instanceof CopperDoor && - $this->getOxidation() === $other->getOxidation() && - $this->isWaxed() === $other->isWaxed(); - } } diff --git a/src/block/Door.php b/src/block/Door.php index 2378a9384a4..82ddaab518b 100644 --- a/src/block/Door.php +++ b/src/block/Door.php @@ -127,7 +127,7 @@ public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Blo $next = $this->getSide(Facing::rotateY($this->facing, false)); $next2 = $this->getSide(Facing::rotateY($this->facing, true)); - if($this->isCompatibleForHinge($next) || (!$next2->isTransparent() && $next->isTransparent())){ //Door hinge + if($next->hasSameTypeId($this) || (!$next2->isTransparent() && $next->isTransparent())){ //Door hinge $this->hingeRight = true; } @@ -176,8 +176,4 @@ public function getAffectedBlocks() : array{ private function canBeSupportedAt(Block $block) : bool{ return $block->getAdjacentSupportType(Facing::DOWN)->hasEdgeSupport(); } - - protected function isCompatibleForHinge(Block $other) : bool{ - return $other->hasSameTypeId($this); - } }