fix NPE in getting bounding box. fix #22 . fix #23 .

This commit is contained in:
xsun2001 2019-02-04 16:22:01 +08:00
parent 6bac87e2c9
commit 5d0748aade
No known key found for this signature in database
GPG Key ID: 2A025270E8D5BCD4
2 changed files with 2 additions and 2 deletions

View File

@ -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.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D );
final int i = MathHelper.floor_double( (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D );
final int k = MathHelper.floor_double( this.posZ );
final Material mat = this.worldObj.getBlock( j, i, k ).getMaterial();

View File

@ -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.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D );
final int i = MathHelper.floor_double( (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D );
final int k = MathHelper.floor_double( this.posZ );
final Block blk = this.worldObj.getBlock( j, i, k );