From 33cc03728961c2ed075c1bed544f020831b013d2 Mon Sep 17 00:00:00 2001 From: PanSzelescik Date: Sun, 18 Feb 2024 18:14:51 +0100 Subject: [PATCH] JEI fixes --- .../common/recipes/jei/ColorizeJEICategory.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/pl/panszelescik/colorize/common/recipes/jei/ColorizeJEICategory.java b/common/src/main/java/pl/panszelescik/colorize/common/recipes/jei/ColorizeJEICategory.java index c614433..a905cf1 100644 --- a/common/src/main/java/pl/panszelescik/colorize/common/recipes/jei/ColorizeJEICategory.java +++ b/common/src/main/java/pl/panszelescik/colorize/common/recipes/jei/ColorizeJEICategory.java @@ -15,6 +15,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import org.jetbrains.annotations.NotNull; import pl.panszelescik.colorize.common.recipes.ColorizeRecipe; public class ColorizeJEICategory implements IRecipeCategory { @@ -25,7 +26,7 @@ public class ColorizeJEICategory implements IRecipeCategory { private static final Component SNEAKING = Component.translatable("gui.colorize.jei.sneaking").withStyle(ChatFormatting.ITALIC).withStyle(ChatFormatting.GRAY); private static final Component CONSUME = Component.translatable("gui.colorize.jei.consume").withStyle(ChatFormatting.ITALIC).withStyle(ChatFormatting.GRAY); - private static final String TEXTURE_GUI_PATH = "textures/gui/"; + private static final String TEXTURE_GUI_PATH = "textures/jei/gui/"; private static final String TEXTURE_GUI_VANILLA = TEXTURE_GUI_PATH + "gui_vanilla.png"; private static final ResourceLocation RECIPE_GUI_VANILLA = new ResourceLocation(ModIds.JEI_ID, TEXTURE_GUI_VANILLA); @@ -39,22 +40,22 @@ public ColorizeJEICategory(IGuiHelper guiHelper) { } @Override - public RecipeType getRecipeType() { + public @NotNull RecipeType getRecipeType() { return RECIPE_TYPE; } @Override - public Component getTitle() { + public @NotNull Component getTitle() { return TITLE; } @Override - public IDrawable getBackground() { + public @NotNull IDrawable getBackground() { return this.background; } @Override - public IDrawable getIcon() { + public @NotNull IDrawable getIcon() { return this.icon; } @@ -77,12 +78,12 @@ public void setRecipe(IRecipeLayoutBuilder builder, ColorizeRecipe recipe, IFocu .addIngredients(recipe.validBlocks()) .addTooltipCallback(callback); - builder.addSlot(RecipeIngredientRole.INPUT, 50, 1) + builder.addSlot(RecipeIngredientRole.INPUT, 37, 1) .setSlotName("item") .addIngredients(recipe.item()) .addTooltipCallback(callback2); - builder.addSlot(RecipeIngredientRole.OUTPUT, 108, 1) + builder.addSlot(RecipeIngredientRole.OUTPUT, 91, 1) .setSlotName("output") .addItemStack(recipe.result()) .addTooltipCallback(callback);