Skip to content

Commit

Permalink
JEI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PanSzelescik committed Feb 18, 2024
1 parent aa68e52 commit 33cc037
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ColorizeRecipe> {
Expand All @@ -25,7 +26,7 @@ public class ColorizeJEICategory implements IRecipeCategory<ColorizeRecipe> {
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);

Expand All @@ -39,22 +40,22 @@ public ColorizeJEICategory(IGuiHelper guiHelper) {
}

@Override
public RecipeType<ColorizeRecipe> getRecipeType() {
public @NotNull RecipeType<ColorizeRecipe> 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;
}

Expand All @@ -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);
Expand Down

0 comments on commit 33cc037

Please sign in to comment.