From d050451bce40c9a4c0f9f78117bb5215592bc950 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Tue, 1 Nov 2016 08:03:59 +0800 Subject: [PATCH] Fixes #2547: Crystal growing and forming fluix crystals was not possible on top of an annihilation plane (or any block with a not-quite-full bounding box), because the crystals thought they were not in water. Fixed by using the center of the crystal bounding box to determine water-status, instead of the bottom center. (cherry picked from commit 2b02dc19c07c10b1a790465115be738d10923746) --- src/main/java/appeng/entity/EntityChargedQuartz.java | 2 +- src/main/java/appeng/entity/EntityGrowingCrystal.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/entity/EntityChargedQuartz.java b/src/main/java/appeng/entity/EntityChargedQuartz.java index 58afcc44..37f93811 100644 --- a/src/main/java/appeng/entity/EntityChargedQuartz.java +++ b/src/main/java/appeng/entity/EntityChargedQuartz.java @@ -74,7 +74,7 @@ public final class EntityChargedQuartz extends AEBaseEntityItem this.delay++; final int j = MathHelper.floor_double( this.posX ); - final int i = MathHelper.floor_double( this.posY ); + final int i = MathHelper.floor_double( (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D ); final int k = MathHelper.floor_double( this.posZ ); final Material mat = this.worldObj.getBlock( j, i, k ).getMaterial(); diff --git a/src/main/java/appeng/entity/EntityGrowingCrystal.java b/src/main/java/appeng/entity/EntityGrowingCrystal.java index 6fe79e91..666157bc 100644 --- a/src/main/java/appeng/entity/EntityGrowingCrystal.java +++ b/src/main/java/appeng/entity/EntityGrowingCrystal.java @@ -72,7 +72,7 @@ public final class EntityGrowingCrystal extends EntityItem if( gc instanceof IGrowableCrystal ) // if it changes this just stops being an issue... { final int j = MathHelper.floor_double( this.posX ); - final int i = MathHelper.floor_double( this.posY ); + final int i = MathHelper.floor_double( (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D ); final int k = MathHelper.floor_double( this.posZ ); final Block blk = this.worldObj.getBlock( j, i, k );