diff --git a/src/material/block/attachable/Ladder.php b/src/material/block/attachable/Ladder.php index 3ccc0eedf..128361bae 100644 --- a/src/material/block/attachable/Ladder.php +++ b/src/material/block/attachable/Ladder.php @@ -42,6 +42,18 @@ class LadderBlock extends TransparentBlock{ } return false; } + + public function onUpdate($type){ + if($type === BLOCK_UPDATE_NORMAL){ + if($this->getSide(0)->getID() === AIR){ //Replace with common break method + ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem(LADDER, 0, 1)); + $this->level->setBlock($this, new AirBlock(), true, true, true); + return BLOCK_UPDATE_NORMAL; + } + } + return false; + } + public function getDrops(Item $item, Player $player){ return array( array($this->id, 0, 1),