Fixed ItemBlocks passing the wrong block name to their constructors

This commit is contained in:
Dylan K. Taylor 2018-09-19 17:51:28 +01:00
parent d92e79ba54
commit 7da51ae97e

View File

@ -40,6 +40,7 @@ class ItemBlock extends Item{
*/ */
public function __construct(int $blockId, int $meta = 0, int $itemId = null){ public function __construct(int $blockId, int $meta = 0, int $itemId = null){
$this->blockId = $blockId; $this->blockId = $blockId;
$this->setDamage($meta);
parent::__construct($itemId ?? $blockId, $meta, $this->getBlock()->getName()); 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); return BlockFactory::get($this->blockId, $this->meta === -1 ? 0 : $this->meta & 0xf);
} }
public function getVanillaName() : string{
return $this->getBlock()->getName();
}
public function getFuelTime() : int{ public function getFuelTime() : int{
return $this->getBlock()->getFuelTime(); return $this->getBlock()->getFuelTime();
} }