diff options
Diffstat (limited to 'src/main/java/gregtech/common/render/GT_PollutionRenderer.java')
-rw-r--r-- | src/main/java/gregtech/common/render/GT_PollutionRenderer.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java index 4353786a7b..5128af1c36 100644 --- a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java +++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java @@ -6,6 +6,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.GT_Mod; import gregtech.common.entities.GT_EntityFXPollution; import gregtech.common.misc.GT_ClientPollutionMap; import net.minecraft.block.Block; @@ -100,6 +101,10 @@ public class GT_PollutionRenderer { return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, foliageColor); } + public static int getKnownPollution(int x, int z) { + return pollutionMap.getPollution(x, z); + } + @SubscribeEvent(priority = EventPriority.LOW) public void manipulateColor(EntityViewRenderEvent.FogColors event) { if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) @@ -122,6 +127,8 @@ public class GT_PollutionRenderer { @SubscribeEvent(priority = EventPriority.LOWEST) public void renderGTPollutionFog(EntityViewRenderEvent.RenderFogEvent event) { + if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return; + if ((!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) || (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO)) return; @@ -138,6 +145,8 @@ public class GT_PollutionRenderer { @SubscribeEvent(priority = EventPriority.LOWEST) public void renderGTPollutionFog(EntityViewRenderEvent.FogDensity event) { + if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return; + if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) return; @@ -194,6 +203,7 @@ public class GT_PollutionRenderer { // Adding dirt particles in the air @SubscribeEvent(priority = EventPriority.HIGHEST) public void onClientTick(TickEvent.ClientTickEvent event) { + if (!GT_Mod.gregtechproxy.mRenderDirtParticles) return; Minecraft mc = Minecraft.getMinecraft(); if (mc == null) return; |