aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-15 20:29:58 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-15 20:29:58 +0000
commitb69f9b956c139fc1d6fd8ef787203da63695a82c (patch)
tree37ba991311f329d83b2292008b8649e8b69a3ed7 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic
parent27b13101ab9042eacad45f5867c8cfee23cffbe0 (diff)
downloadGT5-Unofficial-b69f9b956c139fc1d6fd8ef787203da63695a82c.tar.gz
GT5-Unofficial-b69f9b956c139fc1d6fd8ef787203da63695a82c.tar.bz2
GT5-Unofficial-b69f9b956c139fc1d6fd8ef787203da63695a82c.zip
% Adjusted documentation of MTE info within Transformer.
$ Added more ASM to fix GT. MetaTileEntities can now be set in an invalid way without crashing the server/client. They now just invalidate and log to GT_LOG. $ Fixed a few NPE's thrown during startup by machines checking/creating invalid BlockPos.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
index 25c14a68e7..f2e3b3c3c0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
@@ -17,7 +17,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
-
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.EntityUtils;
@@ -457,7 +456,7 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
}
}
- public BlockPos getTileEntityPosition(){
+ public BlockPos getTileEntityPosition(){
return new BlockPos(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld());
}
@@ -533,10 +532,7 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
@Override
public void onServerStart() {
mWirelessChargingMap.clear();
- mLocalChargingMap.clear();
- if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){
- mHasBeenMapped = true;
- }
+ mLocalChargingMap.clear();
super.onServerStart();
}
@@ -552,4 +548,12 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
super.doExplosion(aExplosionPower);
}
+ @Override
+ public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){
+ mHasBeenMapped = true;
+ }
+ super.onPreTick(aBaseMetaTileEntity, aTick);
+ }
+
} \ No newline at end of file