From 2d5c40ef8f77287547f437fdcf493f5040494414 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 26 Oct 2016 00:57:33 +0200 Subject: [PATCH] some bugfixes --- src/main/java/gregtech/api/enums/OrePrefixes.java | 1 + .../implementations/GT_MetaTileEntity_Hatch_Muffler.java | 7 +++++-- .../java/gregtech/common/blocks/GT_Block_Reinforced.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index f6eef136..cd51e306 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -460,6 +460,7 @@ public enum OrePrefixes { toolHeadChainsaw.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); toolHeadWrench.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); toolHeadBuzzSaw.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); + turbineBlade.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); rotor.mCondition = new ICondition.Nor(SubTag.CRYSTAL, SubTag.STONE, SubTag.BOUNCY); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 6d0fdc46..319b549d 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -60,8 +60,11 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } public boolean polluteEnvironment() { - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(1000)); - return (mTier > 1 && getBaseMetaTileEntity().getRandomNumber(mTier) != 0) || getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing()); + if(getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())){ + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); + return true; + } + return false; } public int calculatePollutionReduction(int aPollution){ diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index fa5e8162..f73fba77 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -238,7 +238,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) { - if(world.getBlockMetadata(x, y, z)==5){ + if(!world.isRemote && world.getBlockMetadata(x, y, z)==5){ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x, y, z, explosion.getExplosivePlacedBy()); entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); world.spawnEntityInWorld(entitytntprimed);}