diff --git a/build.gradle b/build.gradle index fc472e74..773016c0 100644 --- a/build.gradle +++ b/build.gradle @@ -25,6 +25,7 @@ minecraft { workingDirectory project.file('run') jvmArgs.add('-XX:+AllowEnhancedClassRedefinition') + jvmArgs.add('-XX:+IgnoreUnrecognizedVMOptions') property 'mixin.env.remapRefMap', 'true' property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" @@ -41,6 +42,7 @@ minecraft { workingDirectory project.file('run/server') jvmArgs.add('-XX:+AllowEnhancedClassRedefinition') + jvmArgs.add('-XX:+IgnoreUnrecognizedVMOptions') property 'forge.logging.console.level', 'debug' @@ -131,15 +133,15 @@ dependencies { // JADE OPTIONAL 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}-forge-api:${jei_version}")) + implementation(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}")) compileOnly(fg.deobf("curse.maven:reipc-521393:4837449")) // EMI OPTIONAL compileOnly(fg.deobf("dev.emi:emi-forge:${emi_version}:api")) - runtimeOnly(fg.deobf("dev.emi:emi-forge:${emi_version}")) + //runtimeOnly(fg.deobf("dev.emi:emi-forge:${emi_version}")) // KubeJS OPTIONAL implementation fg.deobf("dev.architectury:architectury-forge:${architectury_version}") implementation fg.deobf("dev.latvian.mods:rhino-forge:${rhino_version}") diff --git a/changelog.md b/changelog.md index f236e60d..286a7040 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## Ex Deorum 1.42 +- Fix JEI sieve recipe bug + ## Ex Deorum 1.41 - Add native EMI support. - Fix bug where removing all Compressed Sieve recipes would break regular Sieve recipe display in JEI. diff --git a/src/main/java/thedarkcolour/exdeorum/compat/jei/CompressedSieveCategory.java b/src/main/java/thedarkcolour/exdeorum/compat/jei/CompressedSieveCategory.java index e8db2abb..ad0628ba 100644 --- a/src/main/java/thedarkcolour/exdeorum/compat/jei/CompressedSieveCategory.java +++ b/src/main/java/thedarkcolour/exdeorum/compat/jei/CompressedSieveCategory.java @@ -27,7 +27,7 @@ import thedarkcolour.exdeorum.material.DefaultMaterials; class CompressedSieveCategory extends SieveCategory { CompressedSieveCategory(IGuiHelper helper) { - super(helper, DefaultMaterials.OAK_COMPRESSED_SIEVE, Component.translatable(TranslationKeys.COMPRESSED_SIEVE_CATEGORY_TITLE), XeiSieveRecipe.COMPRESSED_SIEVE_ROWS.intValue()); + super(helper, DefaultMaterials.OAK_COMPRESSED_SIEVE, Component.translatable(TranslationKeys.COMPRESSED_SIEVE_CATEGORY_TITLE), XeiSieveRecipe.COMPRESSED_SIEVE_ROWS); } @Override diff --git a/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java b/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java index 249c86ef..dc35a185 100644 --- a/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java +++ b/src/main/java/thedarkcolour/exdeorum/compat/jei/SieveCategory.java @@ -34,6 +34,7 @@ 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; import thedarkcolour.exdeorum.data.TranslationKeys; @@ -45,11 +46,11 @@ class SieveCategory implements IRecipeCategory { private final IDrawable row; private final IDrawable icon; private final Component title; - private final int rows; + private final MutableInt rows; // Common constructor - SieveCategory(IGuiHelper helper, ItemLike icon, Component title, int rows) { - this.background = Lazy.of(() -> helper.createBlankDrawable(XeiUtil.SIEVE_WIDTH, XeiUtil.SIEVE_ROW_START + XeiUtil.SIEVE_ROW_HEIGHT * rows)); + 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.slot = helper.getSlotDrawable(); this.row = helper.createDrawable(ExDeorumJeiPlugin.EX_DEORUM_JEI_TEXTURE, 0, 0, 162, 18); this.icon = helper.createDrawableItemStack(new ItemStack(icon)); @@ -59,7 +60,7 @@ class SieveCategory implements IRecipeCategory { // Regular sieve SieveCategory(IGuiHelper helper) { - this(helper, DefaultMaterials.OAK_SIEVE, Component.translatable(TranslationKeys.SIEVE_CATEGORY_TITLE), XeiSieveRecipe.SIEVE_ROWS.intValue()); + this(helper, DefaultMaterials.OAK_SIEVE, Component.translatable(TranslationKeys.SIEVE_CATEGORY_TITLE), XeiSieveRecipe.SIEVE_ROWS); } @Override @@ -110,7 +111,9 @@ class SieveCategory implements IRecipeCategory { this.slot.draw(graphics, 58, 0); this.slot.draw(graphics, 86, 0); - for (int i = 0; i < this.rows; i++) { + int rows = this.rows.intValue(); + + for (int i = 0; i < rows; i++) { this.row.draw(graphics, 0, 28 + i * 18); } }