From 8700a79ca644462eea0dbbc875569dd09d489790 Mon Sep 17 00:00:00 2001 From: yueh Date: Sat, 17 Dec 2016 23:04:35 +0100 Subject: [PATCH] Fixes #2684: Avoid transforming charged quartz when dead. --- src/main/java/appeng/entity/EntityChargedQuartz.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/entity/EntityChargedQuartz.java b/src/main/java/appeng/entity/EntityChargedQuartz.java index ccd95cbda..a2dbc291b 100644 --- a/src/main/java/appeng/entity/EntityChargedQuartz.java +++ b/src/main/java/appeng/entity/EntityChargedQuartz.java @@ -64,7 +64,7 @@ public final class EntityChargedQuartz extends AEBaseEntityItem { super.onUpdate(); - if( !AEConfig.instance().isFeatureEnabled( AEFeature.IN_WORLD_FLUIX ) ) + if( this.isDead || !AEConfig.instance().isFeatureEnabled( AEFeature.IN_WORLD_FLUIX ) ) { return; } @@ -74,14 +74,16 @@ public final class EntityChargedQuartz extends AEBaseEntityItem CommonHelper.proxy.spawnEffect( EffectType.Lightning, this.worldObj, this.posX, this.posY, this.posZ, null ); this.delay = 0; } + this.delay++; final int j = MathHelper.floor_double( this.posX ); - final int i = MathHelper.floor_double( (this.getEntityBoundingBox().minY + this.getEntityBoundingBox().maxY) / 2.0D ); + final int i = MathHelper.floor_double( ( this.getEntityBoundingBox().minY + this.getEntityBoundingBox().maxY ) / 2.0D ); final int k = MathHelper.floor_double( this.posZ ); IBlockState state = this.worldObj.getBlockState( new BlockPos( j, i, k ) ); final Material mat = state.getBlock().getMaterial( state ); + if( Platform.isServer() && mat.isLiquid() ) { this.transformTime++;