From 8cd95d65827830ff110c2b358d28d206e2ec9962 Mon Sep 17 00:00:00 2001 From: Technus Date: Thu, 24 Nov 2016 13:01:53 +0100 Subject: [PATCH] Failsafe --- .../generators/GT_MetaTileEntity_DieselGenerator.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 7d487520..af6487a0 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -1,5 +1,6 @@ package gregtech.common.tileentities.generators; +import com.dreammaster.main.MainRegistry; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -63,6 +64,15 @@ public class GT_MetaTileEntity_DieselGenerator return rValue; } + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if(aTick%100==0 && mFluid!=null && mFluid.amount>this.getCapacity()){ + MainRegistry.Logger.error("Dupe Abuse: "+aBaseMetaTileEntity.getOwnerName()+" Coords: "+aBaseMetaTileEntity.getXCoord()+" "+aBaseMetaTileEntity.getYCoord()+" "+aBaseMetaTileEntity.getZCoord(),aBaseMetaTileEntity); + aBaseMetaTileEntity.setToFire(); + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + public ITexture[] getFront(byte aColor) { return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; }