mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Assign auto-generated runtime type IDs to all items
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user