From 7da51ae97e93bb6220e814381bd38eb27b43a63b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 19 Sep 2018 17:51:28 +0100 Subject: [PATCH] Fixed ItemBlocks passing the wrong block name to their constructors --- src/pocketmine/item/ItemBlock.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pocketmine/item/ItemBlock.php b/src/pocketmine/item/ItemBlock.php index 865c0470d..4fa540b14 100644 --- a/src/pocketmine/item/ItemBlock.php +++ b/src/pocketmine/item/ItemBlock.php @@ -40,6 +40,7 @@ class ItemBlock extends Item{ */ public function __construct(int $blockId, int $meta = 0, int $itemId = null){ $this->blockId = $blockId; + $this->setDamage($meta); parent::__construct($itemId ?? $blockId, $meta, $this->getBlock()->getName()); } @@ -47,10 +48,6 @@ class ItemBlock extends Item{ return BlockFactory::get($this->blockId, $this->meta === -1 ? 0 : $this->meta & 0xf); } - public function getVanillaName() : string{ - return $this->getBlock()->getName(); - } - public function getFuelTime() : int{ return $this->getBlock()->getFuelTime(); }