mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Centralize all conversion-related stuff under TypeConverter
instead of having singletons for everything, which are a nightmare to manage for multi version
This commit is contained in:
3
src/network/mcpe/cache/CraftingDataCache.php
vendored
3
src/network/mcpe/cache/CraftingDataCache.php
vendored
@ -30,7 +30,6 @@ use pocketmine\crafting\ShapedRecipe;
|
||||
use pocketmine\crafting\ShapelessRecipe;
|
||||
use pocketmine\crafting\ShapelessRecipeType;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\convert\GlobalItemTypeDictionary;
|
||||
use pocketmine\network\mcpe\convert\TypeConverter;
|
||||
use pocketmine\network\mcpe\protocol\CraftingDataPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStack;
|
||||
@ -173,7 +172,7 @@ final class CraftingDataCache{
|
||||
}
|
||||
|
||||
$potionContainerChangeRecipes = [];
|
||||
$itemTypeDictionary = GlobalItemTypeDictionary::getInstance()->getDictionary();
|
||||
$itemTypeDictionary = TypeConverter::getInstance()->getItemTypeDictionary();
|
||||
foreach($manager->getPotionContainerChangeRecipes() as $recipe){
|
||||
$input = $itemTypeDictionary->fromStringId($recipe->getInputItemId());
|
||||
$ingredient = $converter->coreRecipeIngredientToNet($recipe->getIngredient())->getDescriptor();
|
||||
|
Reference in New Issue
Block a user