diff --git a/CommonApi/src/main/java/mezz/jei/api/gui/builder/IRecipeSlotBuilder.java b/CommonApi/src/main/java/mezz/jei/api/gui/builder/IRecipeSlotBuilder.java index 76bca017c..e844a2675 100644 --- a/CommonApi/src/main/java/mezz/jei/api/gui/builder/IRecipeSlotBuilder.java +++ b/CommonApi/src/main/java/mezz/jei/api/gui/builder/IRecipeSlotBuilder.java @@ -3,6 +3,7 @@ import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.gui.ingredient.IRecipeSlotRichTooltipCallback; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.helpers.IGuiHelper; import mezz.jei.api.ingredients.IIngredientRenderer; import mezz.jei.api.ingredients.IIngredientType; import mezz.jei.api.recipe.category.IRecipeCategory; @@ -51,6 +52,16 @@ public interface IRecipeSlotBuilder extends IIngredientAcceptor outputSlotBuilder = builder.addInvisibleIngredients(RecipeIngredientRole.OUTPUT); diff --git a/Library/src/main/java/mezz/jei/library/plugins/jei/tags/TagInfoRecipeCategory.java b/Library/src/main/java/mezz/jei/library/plugins/jei/tags/TagInfoRecipeCategory.java index 08d459e1f..ec36aa98e 100644 --- a/Library/src/main/java/mezz/jei/library/plugins/jei/tags/TagInfoRecipeCategory.java +++ b/Library/src/main/java/mezz/jei/library/plugins/jei/tags/TagInfoRecipeCategory.java @@ -3,7 +3,6 @@ import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.builder.ITooltipBuilder; import mezz.jei.api.gui.drawable.IDrawable; -import mezz.jei.api.gui.drawable.IDrawableStatic; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.gui.widgets.IScrollGridWidgetFactory; import mezz.jei.api.helpers.IGuiHelper; @@ -41,12 +40,10 @@ public class TagInfoRecipeCategory scrollGridFactory; - private final IDrawableStatic slotDrawable; public TagInfoRecipeCategory(IGuiHelper guiHelper, T recipeType, ResourceLocation registryLocation) { this.background = guiHelper.createBlankDrawable(WIDTH, HEIGHT); this.icon = guiHelper.createDrawableItemLike(Items.NAME_TAG); - this.slotDrawable = guiHelper.getSlotDrawable(); this.recipeType = recipeType; Component registryName = Component.translatableWithFallback( "gui.jei.category.registry." + ResourceLocationUtil.sanitizePath(registryLocation.getPath()), @@ -89,7 +86,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, R recipe, IFocusGroup focuse ScreenRectangle gridArea = scrollGridFactory.getArea(); builder.addSlot(RecipeIngredientRole.INPUT, gridArea.position().x() + 1, 1) .addTypedIngredients(recipe.getTypedIngredients()) - .setBackground(slotDrawable, -1, -1); + .setStandardSlotBackground(); for (ITypedIngredient stack : recipe.getTypedIngredients()) { builder.addSlotToWidget(RecipeIngredientRole.OUTPUT, scrollGridFactory) diff --git a/Library/src/main/java/mezz/jei/library/plugins/vanilla/anvil/SmithingRecipeCategory.java b/Library/src/main/java/mezz/jei/library/plugins/vanilla/anvil/SmithingRecipeCategory.java index ea61d1cef..4f7443451 100644 --- a/Library/src/main/java/mezz/jei/library/plugins/vanilla/anvil/SmithingRecipeCategory.java +++ b/Library/src/main/java/mezz/jei/library/plugins/vanilla/anvil/SmithingRecipeCategory.java @@ -34,13 +34,11 @@ public class SmithingRecipeCategory implements IRecipeCategory>, IExtendableSmithingRecipeCategory { private final IDrawable background; private final IDrawable icon; - private final IDrawable slot; private final IDrawable recipeArrow; private final Map, ISmithingCategoryExtension> extensions = new HashMap<>(); public SmithingRecipeCategory(IGuiHelper guiHelper) { background = guiHelper.createBlankDrawable(108, 28); - slot = guiHelper.getSlotDrawable(); icon = guiHelper.createDrawableItemLike(Blocks.SMITHING_TABLE); Textures textures = Internal.getTextures(); recipeArrow = textures.getRecipeArrow(); @@ -76,16 +74,16 @@ public void setRecipe(IRecipeLayoutBuilder builder, RecipeHolder } IRecipeSlotBuilder templateSlot = builder.addSlot(RecipeIngredientRole.INPUT, 1, 6) - .setBackground(slot, -1, -1); + .setStandardSlotBackground(); IRecipeSlotBuilder baseSlot = builder.addSlot(RecipeIngredientRole.INPUT, 19, 6) - .setBackground(slot, -1, -1); + .setStandardSlotBackground(); IRecipeSlotBuilder additionSlot = builder.addSlot(RecipeIngredientRole.INPUT, 37, 6) - .setBackground(slot, -1, -1); + .setStandardSlotBackground(); IRecipeSlotBuilder outputSlot = builder.addSlot(RecipeIngredientRole.OUTPUT, 91, 6) - .setBackground(slot, -1, -1); + .setStandardSlotBackground(); extension.setTemplate(recipe, templateSlot); extension.setBase(recipe, baseSlot); diff --git a/Library/src/main/java/mezz/jei/library/plugins/vanilla/brewing/BrewingRecipeCategory.java b/Library/src/main/java/mezz/jei/library/plugins/vanilla/brewing/BrewingRecipeCategory.java index 0ae72dcfe..8bd9dba02 100644 --- a/Library/src/main/java/mezz/jei/library/plugins/vanilla/brewing/BrewingRecipeCategory.java +++ b/Library/src/main/java/mezz/jei/library/plugins/vanilla/brewing/BrewingRecipeCategory.java @@ -27,7 +27,6 @@ public class BrewingRecipeCategory implements IRecipeCategory { private final IDrawable background; private final IDrawable icon; - private final IDrawable slotDrawable; private final Component localizedName; private final IDrawableAnimated arrow; private final IDrawableAnimated bubbles; @@ -49,8 +48,6 @@ public BrewingRecipeCategory(IGuiHelper guiHelper) { .buildAnimated(bubblesTickTimer, IDrawableAnimated.StartDirection.BOTTOM); blazeHeat = guiHelper.createDrawable(location, 64, 29, 18, 4); - - slotDrawable = guiHelper.getSlotDrawable(); } @Override @@ -104,7 +101,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, IJeiBrewingRecipe recipe, IF builder.addSlot(RecipeIngredientRole.OUTPUT, 81, 3) .addItemStack(recipe.getPotionOutput()) - .setBackground(slotDrawable, -1, -1); + .setStandardSlotBackground(); } @Override diff --git a/gradle.properties b/gradle.properties index 87334a8a0..9a3d862a9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -74,4 +74,4 @@ modrinthId=u6dRKJwZ jUnitVersion=5.8.2 # Version -specificationVersion=19.18.6 +specificationVersion=19.18.7