diff options
Diffstat (limited to 'src/main/java/gregtech/common/GT_Pollution.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Pollution.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 175ea6ac85..6669bf861a 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -62,6 +62,7 @@ public class GT_Pollution { private int operationsPerTick=0;//how much chunks should be processed in each cycle private static final short cycleLen=1200; private final World aWorld; + public static int mPlayerPollution; public GT_Pollution(World world){ aWorld=world; @@ -260,6 +261,13 @@ public class GT_Pollution { if(dataMap==null || dataMap.get(ch.getChunkCoordIntPair())==null) return 0; return dataMap.get(ch.getChunkCoordIntPair())[GTPOLLUTION]; } + + public static int getPollution(ChunkCoordIntPair aCh, int aDim){ + if(!GT_Mod.gregtechproxy.mPollution)return 0; + HashMap<ChunkCoordIntPair,int[]> dataMap=dimensionWiseChunkData.get(aDim); + if(dataMap==null || dataMap.get(aCh)==null) return 0; + return dataMap.get(aCh)[GTPOLLUTION]; + } //Add compatibility with old code @Deprecated /*Don't use it... too weird way of passing position*/ |