Skip to content

Commit

Permalink
Update JEI to support new arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
Direwolf20-MC committed Sep 26, 2024
1 parent 78ba509 commit 5b7372e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ mod_description=Just some things that Direwolf20 wanted.
#Dependencies
jei_mc_version=1.21.1
# jei 1.21.1 versions: https://maven.blamejared.com/mezz/jei/jei-1.21.1-neoforge/maven-metadata.xml
jei_version=19.16.0.155
jei_version=19.18.10.218
patchouli_version=1.21-87-NEOFORGE-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.direwolf20.justdirethings.datagen.recipes.FluidDropRecipe;
import com.direwolf20.justdirethings.setup.Registration;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.ModIds;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
import mezz.jei.api.gui.builder.IRecipeSlotBuilder;
import mezz.jei.api.gui.drawable.IDrawable;
Expand All @@ -17,7 +16,6 @@
import mezz.jei.api.recipe.category.IRecipeCategory;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.block.state.BlockState;
Expand All @@ -40,7 +38,7 @@ public FluidDropRecipeCategory(IGuiHelper guiHelper) {
slot = guiHelper.getSlotDrawable();
icon = guiHelper.createDrawableItemStack(new ItemStack(Registration.PolymorphicCatalyst.get()));
localizedName = Component.translatable("justdirethings.fluiddroprecipe.title");
this.arrow = guiHelper.createDrawable(ResourceLocation.fromNamespaceAndPath(ModIds.JEI_ID, "textures/jei/gui/gui_vanilla.png"), 82, 128, 24, 17);
this.arrow = guiHelper.getRecipeArrow();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.direwolf20.justdirethings.datagen.recipes.GooSpreadRecipe;
import com.direwolf20.justdirethings.setup.Registration;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.ModIds;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
import mezz.jei.api.gui.builder.IRecipeSlotBuilder;
import mezz.jei.api.gui.drawable.IDrawable;
Expand All @@ -17,7 +16,6 @@
import mezz.jei.api.recipe.category.IRecipeCategory;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.LiquidBlock;
Expand All @@ -44,7 +42,7 @@ public GooSpreadRecipeCategory(IGuiHelper guiHelper) {
slot = guiHelper.getSlotDrawable();
icon = guiHelper.createDrawableItemStack(new ItemStack(Registration.GooBlock_Tier1.get()));
localizedName = Component.translatable("justdirethings.goospreadrecipe.title");
this.arrow = guiHelper.createDrawable(ResourceLocation.fromNamespaceAndPath(ModIds.JEI_ID, "textures/jei/gui/gui_vanilla.png"), 82, 128, 24, 17);
this.arrow = guiHelper.getRecipeArrow();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.direwolf20.justdirethings.JustDireThings;
import com.direwolf20.justdirethings.setup.Registration;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.ModIds;
import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
import mezz.jei.api.gui.drawable.IDrawable;
Expand Down Expand Up @@ -31,7 +30,7 @@ public class OreToResourceCategory implements IRecipeCategory<OreToResourceRecip
public OreToResourceCategory(IGuiHelper guiHelper) {
this.background = guiHelper.createBlankDrawable(120, 30); // Adjust size as needed
this.icon = guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK, new ItemStack(Registration.RawFerricoreOre.get()));
IDrawableStatic arrowDrawable = guiHelper.createDrawable(ResourceLocation.fromNamespaceAndPath(ModIds.JEI_ID, "textures/jei/gui/gui_vanilla.png"), 82, 128, 24, 17);
IDrawableStatic arrowDrawable = guiHelper.getRecipeArrow();
this.animatedArrow = guiHelper.createAnimatedDrawable(arrowDrawable, 40, IDrawableAnimated.StartDirection.LEFT, false); // 20 ticks duration, left-to-right animation, no looping
this.pickaxeIcon = guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK, new ItemStack(Items.IRON_PICKAXE));
}
Expand Down

0 comments on commit 5b7372e

Please sign in to comment.