Assign auto-generated runtime type IDs to all items

This commit is contained in:
Dylan K. Taylor
2022-06-29 13:50:58 +01:00
parent 56428e8a4e
commit dd63681f94
10 changed files with 584 additions and 293 deletions

View File

@ -35,8 +35,8 @@ use pocketmine\block\BlockFactory;
final class ItemBlock extends Item{
private int $blockFullId;
public function __construct(ItemIdentifier $identifier, Block $block){
parent::__construct($identifier, $block->getName());
public function __construct(Block $block){
parent::__construct(ItemIdentifier::fromBlock($block), $block->getName());
$this->blockFullId = $block->getStateId();
}