aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/mixin/Mixin.java
diff options
context:
space:
mode:
authorAlexdoru <57050655+Alexdoru@users.noreply.github.com>2024-10-21 21:21:33 +0200
committerGitHub <noreply@github.com>2024-10-21 19:21:33 +0000
commit901cb0d294b0c4f114bb247fbd7d6f97e7484f3c (patch)
treefd4900d59f98ec34c9119c2003f79f7467abddf0 /src/main/java/gregtech/mixin/Mixin.java
parente741976ea6a6fa5dbcb45813fd1e2ca368331ba5 (diff)
downloadGT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.tar.gz
GT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.tar.bz2
GT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.zip
Import pollution mixins from hodgepodge (#3395)
Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/mixin/Mixin.java')
-rw-r--r--src/main/java/gregtech/mixin/Mixin.java69
1 files changed, 68 insertions, 1 deletions
diff --git a/src/main/java/gregtech/mixin/Mixin.java b/src/main/java/gregtech/mixin/Mixin.java
index b9ba1db098..001477b5d1 100644
--- a/src/main/java/gregtech/mixin/Mixin.java
+++ b/src/main/java/gregtech/mixin/Mixin.java
@@ -14,6 +14,7 @@ import org.apache.logging.log4j.Logger;
import bartworks.common.configs.Configuration;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
+import gregtech.common.pollution.PollutionConfig;
public enum Mixin {
@@ -64,7 +65,73 @@ public enum Mixin {
.addTargetedMod(TargetedMod.IC2)
.setApplyIf(() -> true)
.setPhase(Phase.LATE)
- .setSide(Side.BOTH));
+ .setSide(Side.BOTH)),
+ IC2_HAZMAT(new Builder("Hazmat").setPhase(Phase.LATE)
+ .setSide(Side.BOTH)
+ .addMixinClasses("ic2.MixinIc2Hazmat")
+ .setApplyIf(() -> true)
+ .addTargetedMod(TargetedMod.IC2)
+ .addExcludedMod(TargetedMod.GT6)),
+
+ // Pollution
+ POLLUTION_RENDER_BLOCKS(new Builder("Changes colors of certain blocks based on pollution levels")
+ .addMixinClasses("minecraft.pollution.MixinRenderBlocks_PollutionWithoutOptifine")
+ .addTargetedMod(TargetedMod.VANILLA)
+ .addExcludedMod(TargetedMod.OPTIFINE)
+ .setSide(Side.CLIENT)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.pollutionBlockRecolor)
+ .setPhase(Phase.EARLY)),
+ POLLUTION_RENDER_BLOCKS_OPTIFINE(new Builder("Changes colors of certain blocks based on pollution levels")
+ .addMixinClasses("minecraft.pollution.MixinRenderBlocks_PollutionWithOptifine")
+ .addTargetedMod(TargetedMod.VANILLA)
+ .addTargetedMod(TargetedMod.OPTIFINE)
+ .addExcludedMod(TargetedMod.ANGELICA)
+ .setSide(Side.CLIENT)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.pollutionBlockRecolor)
+ .setPhase(Phase.EARLY)),
+ POLLUTION_RENDER_BLOCKS_BOP(new Builder("Changes colors of certain blocks based on pollution levels")
+ .addMixinClasses("biomesoplenty.MixinFoliageRendererPollution")
+ .addTargetedMod(TargetedMod.BOP)
+ .setSide(Side.CLIENT)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.pollutionBlockRecolor)
+ .setPhase(Phase.LATE)),
+ POLLUTION_MINECRAFT_FURNACE(new Builder("Minecraft Furnace Pollutes").setPhase(Phase.EARLY)
+ .addMixinClasses("minecraft.pollution.MixinTileEntityFurnacePollution")
+ .setSide(Side.BOTH)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.furnacesPollute)
+ .addTargetedMod(TargetedMod.VANILLA)),
+ POLLUTION_MINECRAFT_EXPLOSION(new Builder("Minecraft explosions pollute").setPhase(Phase.EARLY)
+ .addMixinClasses("minecraft.pollution.MixinExplosionPollution")
+ .setSide(Side.BOTH)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.explosionPollutionAmount != 0F)
+ .addTargetedMod(TargetedMod.VANILLA)),
+ POLLUTION_IC2_IRON_FURNACE(
+ new Builder("Ic2 Iron Furnace Pollutes").addMixinClasses("ic2.MixinIC2IronFurnacePollution")
+ .setPhase(Phase.LATE)
+ .setSide(Side.BOTH)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.furnacesPollute)
+ .addTargetedMod(TargetedMod.IC2)),
+ POLLUTION_THAUMCRAFT_ALCHEMICAL_FURNACE(new Builder("Thaumcraft Alchemical Construct Pollutes")
+ .addMixinClasses("thaumcraft.MixinThaumcraftAlchemyFurnacePollution")
+ .setPhase(Phase.LATE)
+ .setSide(Side.BOTH)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.furnacesPollute)
+ .addTargetedMod(TargetedMod.THAUMCRAFT)),
+ POLLUTION_RAILCRAFT(new Builder("Make Railcraft Pollute")
+ .addMixinClasses(
+ "railcraft.MixinRailcraftBoilerPollution",
+ "railcraft.MixinRailcraftCokeOvenPollution",
+ "railcraft.MixinRailcraftTunnelBorePollution")
+ .setPhase(Phase.LATE)
+ .setSide(Side.BOTH)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.railcraftPollutes)
+ .addTargetedMod(TargetedMod.RAILCRAFT)),
+ POLLUTION_ROCKET(
+ new Builder("Make Rockets Pollute").addMixinClasses("galacticraftcore.MixinGalacticraftRocketPollution")
+ .setPhase(Phase.LATE)
+ .setSide(Side.BOTH)
+ .setApplyIf(() -> PollutionConfig.pollution && PollutionConfig.rocketsPollute)
+ .addTargetedMod(TargetedMod.GALACTICRAFT_CORE));
public static final Logger LOGGER = LogManager.getLogger("GregTech-Mixin");