Merge pull request #3046 from Hubry/spreader-binding

Fix spreader binding always aiming for 0,0,0
This commit is contained in:
Vincent Lee authored and GitHub committed 2019-12-08 15:34:49 -06:00
commit 86cce0d8bc
1 file changed
+1 -1
@@ -671,7 +671,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
Vector3 blockVec = new Vector3(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
VoxelShape shape = player.world.getBlockState(pos).getShape(player.world, pos);
AxisAlignedBB axis = shape.isEmpty() ? new AxisAlignedBB(pos) : shape.getBoundingBox();
AxisAlignedBB axis = shape.isEmpty() ? new AxisAlignedBB(pos) : shape.getBoundingBox().offset(pos);
if(!blockVec.isInside(axis))
blockVec = new Vector3(axis.minX + (axis.maxX - axis.minX) / 2, axis.minY + (axis.maxY - axis.minY) / 2, axis.minZ + (axis.maxZ - axis.minZ) / 2);