Skip to content

Commit

Permalink
Remove deprecated JEI code
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Nov 7, 2022
1 parent bd98cb5 commit 2e5f087
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ResourceLocation getPluginUid() {
@Override
public void registerItemSubtypes(ISubtypeRegistration registry) {
IIngredientSubtypeInterpreter<ItemStack> texture = (ingredient, content) -> RetexturedBlockItem.getTextureName(ingredient);
Consumer<ItemLike> setTextureSubtype = item -> registry.registerSubtypeInterpreter(item.asItem(), texture);
Consumer<ItemLike> setTextureSubtype = item -> registry.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK, item.asItem(), texture);

// building
InspirationsBuilding.shelf.values().forEach(setTextureSubtype);
Expand All @@ -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));
}
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 2e5f087

Please sign in to comment.