mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Exterminate legacy item IDs
This commit is contained in:
@ -26,6 +26,7 @@ namespace pocketmine\item;
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\block\VanillaBlocks;
|
||||
use pocketmine\data\runtime\RuntimeDataWriter;
|
||||
|
||||
/**
|
||||
* Class used for Items that directly represent blocks, such as stone, dirt, wood etc.
|
||||
@ -43,6 +44,10 @@ final class ItemBlock extends Item{
|
||||
$this->blockTypeData = $block->computeTypeData();
|
||||
}
|
||||
|
||||
protected function encodeType(RuntimeDataWriter $w) : void{
|
||||
$w->writeInt(Block::INTERNAL_STATE_DATA_BITS, $this->blockTypeData);
|
||||
}
|
||||
|
||||
public function getBlock(?int $clickedFace = null) : Block{
|
||||
//TODO: HACKY MESS, CLEAN IT UP
|
||||
$factory = BlockFactory::getInstance();
|
||||
|
Reference in New Issue
Block a user