diff --git a/build.gradle b/build.gradle index 7ef5f1d8..a95d6eef 100644 --- a/build.gradle +++ b/build.gradle @@ -134,7 +134,8 @@ dependencies { implementation(fg.deobf("curse.maven:jade-324717:4986594")) // JEI OPTIONAL compileOnly(fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")) - implementation(fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")) + compileOnly(fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")) + runtimeOnly(fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")) // REI OPTIONAL compileOnly(fg.deobf("me.shedaniel:RoughlyEnoughItems-forge:${rei_version}")) compileOnly(fg.deobf("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}")) diff --git a/gradle.properties b/gradle.properties index af7d1169..8340eb7f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ mc_version=1.20.1 forge_version=47.3.10 parchment_mappings=1.20.1-2023.06.26 -jei_version=15.10.0.36 +jei_version=15.20.0.104 rei_version=12.0.684 emi_version=1.1.10+1.20.1 cloth_config_version=11.1.118 diff --git a/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java b/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java index dc35a185..d254e678 100644 --- a/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java +++ b/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java @@ -33,7 +33,6 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.storage.loot.providers.number.NumberProvider; -import net.minecraftforge.common.util.Lazy; import org.apache.commons.lang3.mutable.MutableInt; import thedarkcolour.exdeorum.compat.XeiSieveRecipe; import thedarkcolour.exdeorum.compat.XeiUtil; @@ -41,7 +40,7 @@ import thedarkcolour.exdeorum.data.TranslationKeys; import thedarkcolour.exdeorum.material.DefaultMaterials; class SieveCategory implements IRecipeCategory { - private final Lazy background; + private final IDrawable background; private final IDrawable slot; private final IDrawable row; private final IDrawable icon; @@ -50,7 +49,7 @@ class SieveCategory implements IRecipeCategory { // Common constructor SieveCategory(IGuiHelper helper, ItemLike icon, Component title, MutableInt rows) { - this.background = Lazy.of(() -> helper.createBlankDrawable(XeiUtil.SIEVE_WIDTH, XeiUtil.SIEVE_ROW_START + XeiUtil.SIEVE_ROW_HEIGHT * rows.intValue())); + this.background = new Background(); this.slot = helper.getSlotDrawable(); this.row = helper.createDrawable(ExDeorumJeiPlugin.EX_DEORUM_JEI_TEXTURE, 0, 0, 162, 18); this.icon = helper.createDrawableItemStack(new ItemStack(icon)); @@ -75,7 +74,7 @@ class SieveCategory implements IRecipeCategory { @Override public IDrawable getBackground() { - return this.background.get(); + return this.background; } @Override @@ -117,4 +116,20 @@ class SieveCategory implements IRecipeCategory { this.row.draw(graphics, 0, 28 + i * 18); } } + + private class Background implements IDrawable { + @Override + public int getWidth() { + return XeiUtil.SIEVE_WIDTH; + } + + @Override + public int getHeight() { + return XeiUtil.SIEVE_ROW_START + XeiUtil.SIEVE_ROW_HEIGHT * SieveCategory.this.rows.intValue(); + } + + @Override + public void draw(GuiGraphics guiGraphics, int i, int i1) { + } + } }