mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-14 01:14:23 +00:00
Fix crash (#70)
This commit is contained in:
1 parent
e95d6c870c
commit
c075644243
1 file changed
+4
-2
@@ -327,7 +327,7 @@ public class TileAnimationTablet extends TileEntity implements IInventory, IMova
|
||||
position.yCoord = yCoord + 0.5f;
|
||||
position.zCoord = zCoord + 0.5f;
|
||||
if (!worldObj.isAirBlock(x, y, z)) {
|
||||
AxisAlignedBB aabb = block.getSelectedBoundingBoxFromPool(worldObj, x, y, z);
|
||||
AxisAlignedBB aabb = block.getCollisionBoundingBoxFromPool(worldObj, x, y, z);
|
||||
if (aabb != null) {
|
||||
hit = block.collisionRayTrace(worldObj, x, y, z, position, getMiddleOfAABB(aabb));
|
||||
}
|
||||
@@ -373,12 +373,14 @@ public class TileAnimationTablet extends TileEntity implements IInventory, IMova
|
||||
// Use the block beneath
|
||||
y--;
|
||||
if (!worldObj.isAirBlock(x, y, z)) {
|
||||
AxisAlignedBB aabb = block.getSelectedBoundingBoxFromPool(worldObj, x, y, z);
|
||||
AxisAlignedBB aabb = block.getCollisionBoundingBoxFromPool(worldObj, x, y, z);
|
||||
if (aabb != null) {
|
||||
Vec3 vec = getMiddleOfAABB(aabb);
|
||||
vec.yCoord = (aabb.maxY - y);
|
||||
hit = new MovingObjectPosition(x, y, z, ForgeDirection.UP.ordinal(), vec, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return hit;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user