mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
ItemTranslator: use GlobalItemDataHandlers
this ensures that plugin serializers will actually be used on the network.
This commit is contained in:
parent
e44a291697
commit
405e552efd
@ -32,7 +32,7 @@ use pocketmine\item\Item;
|
|||||||
use pocketmine\network\mcpe\protocol\serializer\ItemTypeDictionary;
|
use pocketmine\network\mcpe\protocol\serializer\ItemTypeDictionary;
|
||||||
use pocketmine\utils\AssumptionFailedError;
|
use pocketmine\utils\AssumptionFailedError;
|
||||||
use pocketmine\utils\SingletonTrait;
|
use pocketmine\utils\SingletonTrait;
|
||||||
use pocketmine\world\format\io\GlobalBlockStateHandlers;
|
use pocketmine\world\format\io\GlobalItemDataHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class handles translation between network item ID+metadata to PocketMine-MP internal ID+metadata and vice versa.
|
* This class handles translation between network item ID+metadata to PocketMine-MP internal ID+metadata and vice versa.
|
||||||
@ -46,8 +46,8 @@ final class ItemTranslator{
|
|||||||
return new self(
|
return new self(
|
||||||
GlobalItemTypeDictionary::getInstance()->getDictionary(),
|
GlobalItemTypeDictionary::getInstance()->getDictionary(),
|
||||||
RuntimeBlockMapping::getInstance()->getBlockStateDictionary(),
|
RuntimeBlockMapping::getInstance()->getBlockStateDictionary(),
|
||||||
new ItemSerializer(GlobalBlockStateHandlers::getSerializer()),
|
GlobalItemDataHandlers::getSerializer(),
|
||||||
new ItemDeserializer(GlobalBlockStateHandlers::getDeserializer())
|
GlobalItemDataHandlers::getDeserializer()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user