Fixed heal/damage regions being shifted by half a block towards northeast.

This commit is contained in:
TomyLobo 2011-08-15 10:00:49 +02:00
parent 5acd3a7f6c
commit e2fc6a3ff0

View File

@ -98,12 +98,12 @@ public void setMaximumPoint(BlockVector pt) {
*/
@Override
public boolean contains(Vector pt) {
int x = pt.getBlockX();
int y = pt.getBlockY();
int z = pt.getBlockZ();
return x >= min.getBlockX() && x <= max.getBlockX()
&& y >= min.getBlockY() && y <= max.getBlockY()
&& z >= min.getBlockZ() && z <= max.getBlockZ();
final double x = pt.getX();
final double y = pt.getY();
final double z = pt.getZ();
return x >= min.getBlockX() && x < max.getBlockX()+1
&& y >= min.getBlockY() && y < max.getBlockY()+1
&& z >= min.getBlockZ() && z < max.getBlockZ()+1;
}