aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-09-10 23:16:40 +0200
committerTechnus <daniel112092@gmail.com>2017-09-10 23:16:40 +0200
commitf563258fae72445117f31e9ed1846ef7a3a145c4 (patch)
tree6bd226bcc8648cdb7fe13a6cb4ec0debfc28784a /src
parent7cb186b020333669958c36bcfb16dd8d0e6a5443 (diff)
downloadGT5-Unofficial-f563258fae72445117f31e9ed1846ef7a3a145c4.tar.gz
GT5-Unofficial-f563258fae72445117f31e9ed1846ef7a3a145c4.tar.bz2
GT5-Unofficial-f563258fae72445117f31e9ed1846ef7a3a145c4.zip
MAke it less explodey just in case
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java
index de40e3f5e8..89b8f84253 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java
@@ -202,6 +202,15 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
}
//RATHER LEAVE ALONE Section
+ protected boolean EM_areChunksAroundLoaded(){
+ if(isValidMetaTileEntity(this) && getBaseMetaTileEntity().isServerSide()){
+ IGregTechTileEntity base=getBaseMetaTileEntity();
+ final int x=base.getXCoord();
+ final int y=base.getYCoord();
+ final int z=base.getZCoord();
+ return base.getWorld().checkChunksExist(x-48,y-48,z-48,x+48,y+48,z+48);
+ }else return false;
+ }
public GT_MetaTileEntity_MultiblockBase_EM(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -464,7 +473,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
mMachine = checkMachine(aBaseMetaTileEntity, mInventory[1]);
if (!mMachine) {
- if ((ePowerPass && getEUVar() > V[3]) || (eDismantleBoom && mMaxProgresstime > 0))
+ if ((ePowerPass && getEUVar() > V[3]) || (eDismantleBoom && mMaxProgresstime > 0 && EM_areChunksAroundLoaded()))
explodeMultiblock();
if (outputEM != null)
for (cElementalInstanceStackMap tree : outputEM)
@@ -1084,7 +1093,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches)
hatch.getBaseMetaTileEntity().setActive(false);
}
- if ((ePowerPass && getEUVar()>V[3]) || (eDismantleBoom && mMaxProgresstime > 0)) explodeMultiblock();
+ if ((ePowerPass && getEUVar()>V[3]) || (eDismantleBoom && mMaxProgresstime > 0 && EM_areChunksAroundLoaded())) explodeMultiblock();
if (outputEM != null)
for (cElementalInstanceStackMap output : outputEM)
if (output.hasStacks()) explodeMultiblock();