Don't spam chat when a different type of vector is given to the Selector.

Dieser Commit ist enthalten in:
wizjany 2013-05-16 02:02:09 -04:00
Ursprung 94dbfa3b85
Commit ca06489e11
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -80,7 +80,7 @@ public class CuboidRegionSelector implements RegionSelector, CUIRegion {
}
public boolean selectPrimary(Vector pos) {
if (pos.equals(pos1)) {
if (pos1 != null && (pos.compareTo(pos1) == 0)) {
return false;
}
@ -90,7 +90,7 @@ public class CuboidRegionSelector implements RegionSelector, CUIRegion {
}
public boolean selectSecondary(Vector pos) {
if (pos.equals(pos2)) {
if (pos2 != null && (pos.compareTo(pos2)) == 0) {
return false;
}

Datei anzeigen

@ -90,7 +90,7 @@ public class CylinderRegionSelector implements RegionSelector, CUIRegion {
}
public boolean selectPrimary(Vector pos) {
if (!region.getCenter().equals(new Vector(0, 0, 0)) && pos.equals(region.getCenter())) {
if (!region.getCenter().equals(new Vector(0, 0, 0)) && pos.compareTo(region.getCenter()) == 0) {
return false;
}
@ -103,7 +103,7 @@ public class CylinderRegionSelector implements RegionSelector, CUIRegion {
public boolean selectSecondary(Vector pos) {
Vector center = region.getCenter();
if (center.equals(new Vector(0, 0, 0))) {
if ((center.compareTo(new Vector(0, 0, 0))) == 0) {
return true;
}

Datei anzeigen

@ -58,7 +58,7 @@ public class ExtendingCuboidRegionSelector extends CuboidRegionSelector {
@Override
public boolean selectPrimary(Vector pos) {
if (pos.equals(pos1) && pos.equals(pos2)) {
if (pos1 != null && pos2 != null && pos.compareTo(pos1) == 0 && pos.compareTo(pos2) == 0) {
return false;
}