From 0a375ac94867a17d10f0b30d52d9d7f4c921f698 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 7 Jun 2017 19:00:15 +0200 Subject: [PATCH] experimental worldgen change fix --- .../gregtech/common/GT_Worldgenerator.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 36c5ddf2..229544ba 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -77,15 +77,15 @@ public class GT_Worldgenerator this.mBiome = aBiome; } - public boolean surroundingChunksLoaded(){ - if(!mWorld.checkChunksExist(mX-16, 100, mZ-16, mX-16, 100, mZ-16)) return false; - if(!mWorld.checkChunksExist(mX, 100, mZ-16, mX , 100, mZ-16)) return false; - if(!mWorld.checkChunksExist(mX+16, 100, mZ-16, mX+16, 100, mZ-16)) return false; - if(!mWorld.checkChunksExist(mX+16, 100, mZ , mX+16, 100, mZ )) return false; - if(!mWorld.checkChunksExist(mX+16, 100, mZ+16, mX+16, 100, mZ+16)) return false; - if(!mWorld.checkChunksExist(mX , 100, mZ+16, mX , 100, mZ+16)) return false; - if(!mWorld.checkChunksExist(mX-16, 100, mZ+16, mX-16, 100, mZ+16)) return false; - if(!mWorld.checkChunksExist(mX-16, 100, mZ , mX-16, 100, mZ )) return false; + public boolean surroundingChunksLoaded(int aX, int aZ){ + if(!mWorld.checkChunksExist(aX-16, 100, aZ-16, aX-16, 100, aZ-16)) return false; + if(!mWorld.checkChunksExist(aX, 100, aZ-16, aX , 100, aZ-16)) return false; + if(!mWorld.checkChunksExist(aX+16, 100, aZ-16, aX+16, 100, aZ-16)) return false; + if(!mWorld.checkChunksExist(aX+16, 100, aZ , aX+16, 100, aZ )) return false; + if(!mWorld.checkChunksExist(aX+16, 100, aZ+16, aX+16, 100, aZ+16)) return false; + if(!mWorld.checkChunksExist(aX , 100, aZ+16, aX , 100, aZ+16)) return false; + if(!mWorld.checkChunksExist(aX-16, 100, aZ+16, aX-16, 100, aZ+16)) return false; + if(!mWorld.checkChunksExist(aX-16, 100, aZ , aX-16, 100, aZ )) return false; return true; } @@ -96,7 +96,7 @@ public class GT_Worldgenerator if((this.mX / 16 - 1) % 3 == 2) sX = mX + 16; if((this.mZ / 16 - 1) % 3 == 1) sZ = mZ - 16; if((this.mZ / 16 - 1) % 3 == 2) sZ = mZ + 16; - if (((sX / 16 - 1) % 3 == 0) && ((sZ / 16 - 1) % 3 == 0) && surroundingChunksLoaded()) { + if (((sX / 16 - 1) % 3 == 0) && ((sZ / 16 - 1) % 3 == 0) && surroundingChunksLoaded(sX,sZ)) { ChunkCoordIntPair tPair = new ChunkCoordIntPair(sX, sZ); if(!mGenerated.contains(tPair)){ mGenerated.add(tPair);