diff --git a/src/main/java/gregtech/api/util/Mods.java b/src/main/java/gregtech/api/util/Mods.java index c022672f095..971a238b796 100644 --- a/src/main/java/gregtech/api/util/Mods.java +++ b/src/main/java/gregtech/api/util/Mods.java @@ -54,6 +54,7 @@ public enum Mods { InventoryTweaks(Names.INVENTORY_TWEAKS), JourneyMap(Names.JOURNEY_MAP), JustEnoughItems(Names.JUST_ENOUGH_ITEMS), + LittleTiles(Names.LITTLE_TILES), MagicBees(Names.MAGIC_BEES), Nothirium(Names.NOTHIRIUM), NuclearCraft(Names.NUCLEAR_CRAFT, versionExcludes("2o")), @@ -122,6 +123,7 @@ public static class Names { public static final String INVENTORY_TWEAKS = "inventorytweaks"; public static final String JOURNEY_MAP = "journeymap"; public static final String JUST_ENOUGH_ITEMS = "jei"; + public static final String LITTLE_TILES = "littletiles"; public static final String MAGIC_BEES = "magicbees"; public static final String NOTHIRIUM = "nothirium"; public static final String NUCLEAR_CRAFT = "nuclearcraft"; diff --git a/src/main/java/gregtech/asm/GregTechTransformer.java b/src/main/java/gregtech/asm/GregTechTransformer.java index 2cd28a24be8..98654ce5eeb 100644 --- a/src/main/java/gregtech/asm/GregTechTransformer.java +++ b/src/main/java/gregtech/asm/GregTechTransformer.java @@ -1,14 +1,6 @@ package gregtech.asm; -import gregtech.api.util.Mods; -import gregtech.asm.util.ObfMapping; -import gregtech.asm.util.TargetClassVisitor; -import gregtech.asm.visitors.EnchantmentCanApplyVisitor; -import gregtech.asm.visitors.JEIVisitor; -import gregtech.asm.visitors.LittleTilesVisitor; - import net.minecraft.launchwrapper.IClassTransformer; -import net.minecraft.launchwrapper.Launch; import org.objectweb.asm.Opcodes; diff --git a/src/main/java/gregtech/mixins/GregTechLateMixinLoadingPlugin.java b/src/main/java/gregtech/mixins/GregTechLateMixinLoadingPlugin.java index b11dd572998..ed2052e3664 100644 --- a/src/main/java/gregtech/mixins/GregTechLateMixinLoadingPlugin.java +++ b/src/main/java/gregtech/mixins/GregTechLateMixinLoadingPlugin.java @@ -1,8 +1,6 @@ package gregtech.mixins; -import gregtech.api.GTValues; - -import net.minecraftforge.fml.common.Loader; +import gregtech.api.util.Mods; import zone.rong.mixinbooter.ILateMixinLoader; @@ -27,10 +25,10 @@ public List getMixinConfigs() { @Override public boolean shouldMixinConfigQueue(String mixinConfig) { return switch (mixinConfig) { - case "mixins.gregtech.theoneprobe.json" -> Loader.isModLoaded(GTValues.MODID_TOP); - case "mixins.gregtech.jei.json" -> Loader.isModLoaded(GTValues.MODID_JEI); - case "mixin.gregtech.ctm.json" -> Loader.isModLoaded(GTValues.MODID_CTM); - case "mixins.gregtech.littletiles.json" -> Loader.isModLoaded(GTValues.MODID_LITTLETILES); + case "mixins.gregtech.theoneprobe.json" -> Mods.TheOneProbe.isModLoaded(); + case "mixins.gregtech.jei.json" -> Mods.JustEnoughItems.isModLoaded(); + case "mixin.gregtech.ctm.json" -> Mods.CTM.isModLoaded(); + case "mixins.gregtech.littletiles.json" -> Mods.LittleTiles.isModLoaded(); default -> true; }; } diff --git a/src/main/java/gregtech/mixins/minecraft/RenderItemMixin.java b/src/main/java/gregtech/mixins/minecraft/RenderItemMixin.java index 6efc191b408..5bbea635153 100644 --- a/src/main/java/gregtech/mixins/minecraft/RenderItemMixin.java +++ b/src/main/java/gregtech/mixins/minecraft/RenderItemMixin.java @@ -1,12 +1,11 @@ package gregtech.mixins.minecraft; -import gregtech.api.GTValues; +import gregtech.api.util.Mods; import gregtech.asm.hooks.RenderItemHooks; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.RenderItem; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.Loader; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -32,7 +31,7 @@ private void renderItemOverlayIntoGUIInject(FontRenderer fr, ItemStack stack, in ordinal = 0)) public void showDurabilityBarMixin(FontRenderer fr, ItemStack stack, int xPosition, int yPosition, String text, CallbackInfo ci) { - if (!Loader.isModLoaded(GTValues.MODID_ECORE)) { + if (!Mods.EnderCore.isModLoaded()) { RenderItemHooks.renderElectricBar(stack, xPosition, yPosition); } }