Fixed stupid bug letting the closest gate method fail.
This commit is contained in:
parent
9ce65ed26d
commit
02262880da
@ -25,6 +25,7 @@ public class GateUtil
|
|||||||
if (tempDist < minmalDist)
|
if (tempDist < minmalDist)
|
||||||
{
|
{
|
||||||
gate = g;
|
gate = g;
|
||||||
|
minmalDist = tempDist;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -41,8 +42,6 @@ public class GateUtil
|
|||||||
|
|
||||||
// players are sometime stuck into the ground
|
// players are sometime stuck into the ground
|
||||||
Location locationUp = location.getBlock().getRelative(BlockFace.UP).getLocation();
|
Location locationUp = location.getBlock().getRelative(BlockFace.UP).getLocation();
|
||||||
|
|
||||||
System.out.println("player location: " + location);
|
|
||||||
|
|
||||||
for (Gate g : Gate.getAll())
|
for (Gate g : Gate.getAll())
|
||||||
{
|
{
|
||||||
@ -65,8 +64,6 @@ public class GateUtil
|
|||||||
|
|
||||||
if (LocationUtil.locationsAreAtSamePositions(l, location) || LocationUtil.locationsAreAtSamePositions(l, locationUp))
|
if (LocationUtil.locationsAreAtSamePositions(l, location) || LocationUtil.locationsAreAtSamePositions(l, locationUp))
|
||||||
{
|
{
|
||||||
System.out.println("gate location: " + l);
|
|
||||||
|
|
||||||
// Check if the gate is still valid
|
// Check if the gate is still valid
|
||||||
try {
|
try {
|
||||||
g.validate();
|
g.validate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user