From aac2073e38c01bb08650f2b01a760d8c83eadfa0 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Sun, 14 Jan 2024 13:51:10 -0800 Subject: [PATCH] Fix inventory sorter voiding items in the Mechanical Sieve GUI. Closes #36 --- build.gradle | 7 +++++++ src/main/java/thedarkcolour/exdeorum/compat/ModIds.java | 2 ++ .../java/thedarkcolour/exdeorum/event/EventHandler.java | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index b18dbc5b..7180fd91 100644 --- a/build.gradle +++ b/build.gradle @@ -139,6 +139,12 @@ repositories { includeModule("maven.modrinth", "embeddium") } } + maven { + url "https://cursemaven.com" + content { + includeGroup "curse.maven" + } + } } dependencies { @@ -169,6 +175,7 @@ dependencies { // testing //implementation fg.deobf("curse.maven:allthecompressed-514045:4938351") + //implementation fg.deobf("curse.maven:inventorysorter-240633:4655091") testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2' diff --git a/src/main/java/thedarkcolour/exdeorum/compat/ModIds.java b/src/main/java/thedarkcolour/exdeorum/compat/ModIds.java index 912f9135..7b040515 100644 --- a/src/main/java/thedarkcolour/exdeorum/compat/ModIds.java +++ b/src/main/java/thedarkcolour/exdeorum/compat/ModIds.java @@ -18,6 +18,7 @@ package thedarkcolour.exdeorum.compat; +@SuppressWarnings("SpellCheckingInspection") public class ModIds { public static final String MINECRAFT = "minecraft"; public static final String THE_ONE_PROBE = "theoneprobe"; @@ -41,4 +42,5 @@ public class ModIds { public static final String PAMS_HARVESTCRAFT_CROPS = "pamhc2crops"; public static final String NUCLEARCRAFT_NEOTERIC = "nuclearcraft"; public static final String JEI = "jei"; + public static final String INVENTORY_SORTER = "inventorysorter"; } diff --git a/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java b/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java index c730d672..b702e76b 100644 --- a/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java +++ b/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java @@ -57,6 +57,7 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.loading.FMLEnvironment; import thedarkcolour.exdeorum.ExDeorum; import thedarkcolour.exdeorum.blockentity.LavaCrucibleBlockEntity; +import thedarkcolour.exdeorum.blockentity.helper.ItemHelper; import thedarkcolour.exdeorum.client.CompostColors; import thedarkcolour.exdeorum.compat.ModIds; import thedarkcolour.exdeorum.compat.top.ExDeorumTopCompat; @@ -230,6 +231,10 @@ public final class EventHandler { if (ModList.get().isLoaded(ModIds.THE_ONE_PROBE)) { InterModComms.sendTo(ModIds.THE_ONE_PROBE, "getTheOneProbe", ExDeorumTopCompat::new); } + // todo instead of doing this, figure out the real reason sorting voids items + if (ModList.get().isLoaded(ModIds.INVENTORY_SORTER)) { + InterModComms.sendTo(ModIds.INVENTORY_SORTER, "slotblacklist", ItemHelper.Slot.class::getName); + } } private static void addReloadListeners(AddReloadListenerEvent event) {