diff --git a/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/AccessibleGuiMachine.java b/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/AccessibleGuiMachine.java deleted file mode 100644 index 06272899..00000000 --- a/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/AccessibleGuiMachine.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.nomiceu.nomilabs.integration.deepmobevolution; - -import java.awt.*; - -public interface AccessibleGuiMachine { - - Rectangle getRedstoneButtonRect(); -} diff --git a/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/DMEJEIExclusion.java b/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/DMEJEIExclusion.java deleted file mode 100644 index 7bbd47b2..00000000 --- a/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/DMEJEIExclusion.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.nomiceu.nomilabs.integration.deepmobevolution; - -import static mustapelto.deepmoblearning.DMLConstants.Gui.TrialKeystone.*; - -import java.awt.*; -import java.util.List; - -import org.jetbrains.annotations.NotNull; - -import com.google.common.collect.ImmutableList; - -import mezz.jei.api.gui.IAdvancedGuiHandler; -import mustapelto.deepmoblearning.client.gui.GuiMachine; -import mustapelto.deepmoblearning.client.gui.GuiTrialKeystone; - -public class DMEJEIExclusion { - - public static class MachineGuiExclusion implements IAdvancedGuiHandler { - - @Override - @NotNull - public Class getGuiContainerClass() { - return GuiMachine.class; - } - - @Override - public List getGuiExtraAreas(@NotNull GuiMachine gui) { - return ((JEIExcluded) gui).getGuiExclusionAreas(); - } - } - - public static class TrialGuiExclusion implements IAdvancedGuiHandler { - - @Override - @NotNull - public Class getGuiContainerClass() { - return GuiTrialKeystone.class; - } - - @Override - public List getGuiExtraAreas(GuiTrialKeystone gui) { - return ImmutableList.of( - new Rectangle( - gui.guiLeft + TRIAL_KEY_SLOT.LEFT, - gui.guiTop + TRIAL_KEY_SLOT.TOP, - TRIAL_KEY_SLOT.WIDTH, - TRIAL_KEY_SLOT.HEIGHT)); - } - } -} diff --git a/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/JEIExcluded.java b/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/JEIExcluded.java deleted file mode 100644 index 64602a43..00000000 --- a/src/main/java/com/nomiceu/nomilabs/integration/deepmobevolution/JEIExcluded.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.nomiceu.nomilabs.integration.deepmobevolution; - -import java.awt.*; -import java.util.List; - -public interface JEIExcluded { - - List getGuiExclusionAreas(); -} diff --git a/src/main/java/com/nomiceu/nomilabs/integration/jei/JEIPlugin.java b/src/main/java/com/nomiceu/nomilabs/integration/jei/JEIPlugin.java index 493e54c8..06890fba 100644 --- a/src/main/java/com/nomiceu/nomilabs/integration/jei/JEIPlugin.java +++ b/src/main/java/com/nomiceu/nomilabs/integration/jei/JEIPlugin.java @@ -11,7 +11,6 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.registry.ForgeRegistries; import org.apache.commons.lang3.tuple.Pair; @@ -23,9 +22,7 @@ import com.google.common.collect.HashBasedTable; import com.google.common.collect.ImmutableList; import com.google.common.collect.Table; -import com.nomiceu.nomilabs.LabsValues; import com.nomiceu.nomilabs.groovy.PartialRecipe; -import com.nomiceu.nomilabs.integration.deepmobevolution.DMEJEIExclusion; import com.nomiceu.nomilabs.item.registry.LabsItems; import com.nomiceu.nomilabs.util.ItemTagMeta; @@ -62,14 +59,7 @@ public class JEIPlugin implements IModPlugin { private static IIngredientRegistry itemRegistry; @Override - public void register(@NotNull IModRegistry registry) { - /* DME Custom JEI Exclusion Handler (Impl DME#39) */ - if (Loader.isModLoaded(LabsValues.DME_MODID)) { - registry.addAdvancedGuiHandlers( - new DMEJEIExclusion.MachineGuiExclusion(), - new DMEJEIExclusion.TrialGuiExclusion()); - } - + public void register(IModRegistry registry) { var jeiHelpers = registry.getJeiHelpers(); itemRegistry = registry.getIngredientRegistry(); diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/deepmoblearning/GuiMachineMixin.java b/src/main/java/com/nomiceu/nomilabs/mixin/deepmoblearning/GuiMachineMixin.java deleted file mode 100644 index 49f3ba46..00000000 --- a/src/main/java/com/nomiceu/nomilabs/mixin/deepmoblearning/GuiMachineMixin.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.nomiceu.nomilabs.mixin.deepmoblearning; - -import java.awt.*; -import java.util.List; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; - -import com.google.common.collect.ImmutableList; -import com.nomiceu.nomilabs.integration.deepmobevolution.AccessibleGuiMachine; -import com.nomiceu.nomilabs.integration.deepmobevolution.JEIExcluded; - -import mustapelto.deepmoblearning.client.gui.GuiMachine; -import mustapelto.deepmoblearning.client.gui.buttons.ButtonRedstoneMode; - -/** - * Adds JEI Exclusion Areas to Gui Machine. - */ -@Mixin(value = GuiMachine.class, remap = false) -public class GuiMachineMixin implements JEIExcluded, AccessibleGuiMachine { - - @Shadow - private ButtonRedstoneMode redstoneModeButton; - - @Override - public List getGuiExclusionAreas() { - return ImmutableList.of( - getRedstoneButtonRect()); - } - - @Override - public Rectangle getRedstoneButtonRect() { - return new Rectangle( - redstoneModeButton.x, - redstoneModeButton.y, - redstoneModeButton.width, - redstoneModeButton.height); - } -} diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/deepmoblearning/GuiSimulationChamberMixin.java b/src/main/java/com/nomiceu/nomilabs/mixin/deepmoblearning/GuiSimulationChamberMixin.java deleted file mode 100644 index ff2f049d..00000000 --- a/src/main/java/com/nomiceu/nomilabs/mixin/deepmoblearning/GuiSimulationChamberMixin.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.nomiceu.nomilabs.mixin.deepmoblearning; - -import static mustapelto.deepmoblearning.DMLConstants.Gui.SimulationChamber.DATA_MODEL_SLOT; - -import java.awt.*; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -import org.spongepowered.asm.mixin.Mixin; - -import com.google.common.collect.ImmutableList; -import com.nomiceu.nomilabs.integration.deepmobevolution.AccessibleGuiMachine; -import com.nomiceu.nomilabs.integration.deepmobevolution.JEIExcluded; - -import mustapelto.deepmoblearning.client.gui.GuiMachine; -import mustapelto.deepmoblearning.client.gui.GuiSimulationChamber; -import mustapelto.deepmoblearning.common.tiles.TileEntityMachine; -import mustapelto.deepmoblearning.common.util.Point; - -/** - * Adds JEI Exclusion Areas to Gui Simulation Chamber. - */ -@Mixin(value = GuiSimulationChamber.class, remap = false) -public abstract class GuiSimulationChamberMixin extends GuiMachine implements JEIExcluded { - - /** - * Default Ignored Constructor - */ - private GuiSimulationChamberMixin(TileEntityMachine tileEntity, EntityPlayer player, World world, int width, - int height, Point redstoneModeButtonLocation) { - super(tileEntity, player, world, width, height, redstoneModeButtonLocation); - } - - @Override - public List getGuiExclusionAreas() { - return ImmutableList.of( - ((AccessibleGuiMachine) this).getRedstoneButtonRect(), - new Rectangle( - guiLeft + DATA_MODEL_SLOT.LEFT, - guiTop + DATA_MODEL_SLOT.TOP, - DATA_MODEL_SLOT.WIDTH, - DATA_MODEL_SLOT.HEIGHT)); - } -} diff --git a/src/main/resources/mixins.nomilabs.deepmoblearning.json b/src/main/resources/mixins.nomilabs.deepmoblearning.json index f5b772b2..c2da9af1 100644 --- a/src/main/resources/mixins.nomilabs.deepmoblearning.json +++ b/src/main/resources/mixins.nomilabs.deepmoblearning.json @@ -7,9 +7,6 @@ "mixins": [ "DataModelHelperAccessor" ], - "client": [ - "GuiMachineMixin", - "GuiSimulationChamberMixin" - ], + "client": [], "server": [] }