mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +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\utils\AssumptionFailedError;
|
||||
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.
|
||||
@ -46,8 +46,8 @@ final class ItemTranslator{
|
||||
return new self(
|
||||
GlobalItemTypeDictionary::getInstance()->getDictionary(),
|
||||
RuntimeBlockMapping::getInstance()->getBlockStateDictionary(),
|
||||
new ItemSerializer(GlobalBlockStateHandlers::getSerializer()),
|
||||
new ItemDeserializer(GlobalBlockStateHandlers::getDeserializer())
|
||||
GlobalItemDataHandlers::getSerializer(),
|
||||
GlobalItemDataHandlers::getDeserializer()
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user