From 2e5f08764a8b690e13fc61d1f5968c6a76bfe21d Mon Sep 17 00:00:00 2001 From: KnightMiner Date: Mon, 7 Nov 2022 00:45:11 -0500 Subject: [PATCH] Remove deprecated JEI code --- .../knightminer/inspirations/plugins/jei/JEIPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/knightminer/inspirations/plugins/jei/JEIPlugin.java b/src/main/java/knightminer/inspirations/plugins/jei/JEIPlugin.java index 440ea579..8ea36c3b 100644 --- a/src/main/java/knightminer/inspirations/plugins/jei/JEIPlugin.java +++ b/src/main/java/knightminer/inspirations/plugins/jei/JEIPlugin.java @@ -36,7 +36,7 @@ public ResourceLocation getPluginUid() { @Override public void registerItemSubtypes(ISubtypeRegistration registry) { IIngredientSubtypeInterpreter texture = (ingredient, content) -> RetexturedBlockItem.getTextureName(ingredient); - Consumer setTextureSubtype = item -> registry.registerSubtypeInterpreter(item.asItem(), texture); + Consumer setTextureSubtype = item -> registry.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK, item.asItem(), texture); // building InspirationsBuilding.shelf.values().forEach(setTextureSubtype); @@ -47,7 +47,7 @@ public void registerItemSubtypes(ISubtypeRegistration registry) { public void onRuntimeAvailable(IJeiRuntime jeiRuntime) { ingedientManager = jeiRuntime.getIngredientManager(); HIDABLE_ITEMS.clear(); - for (ItemStack item : ingedientManager.getAllIngredients(VanillaTypes.ITEM)) { + for (ItemStack item : ingedientManager.getAllIngredients(VanillaTypes.ITEM_STACK)) { if (item.getItem() instanceof IHidable) { HIDABLE_ITEMS.add(new HideState(item)); } @@ -72,10 +72,10 @@ private static void updateHiddenItems() { } } if (hidden.size() > 0) { - ingedientManager.removeIngredientsAtRuntime(VanillaTypes.ITEM, hidden); + ingedientManager.removeIngredientsAtRuntime(VanillaTypes.ITEM_STACK, hidden); } if (visible.size() > 0) { - ingedientManager.addIngredientsAtRuntime(VanillaTypes.ITEM, visible); + ingedientManager.addIngredientsAtRuntime(VanillaTypes.ITEM_STACK, visible); } }