Whoops, that should be a max. Also add debug
This commit is contained in:
parent
07ea1bc9c7
commit
7fc74fddff
@ -7,6 +7,7 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -132,7 +133,7 @@ public class BuildData
|
||||
topRight.setX(Math.max(CornerA.getX(), CornerB.getX()));
|
||||
|
||||
bottomLeft.setZ(Math.min(CornerA.getZ(), CornerB.getZ()));
|
||||
topRight.setZ(Math.min(CornerA.getZ(), CornerB.getZ()));
|
||||
topRight.setZ(Math.max(CornerA.getZ(), CornerB.getZ()));
|
||||
|
||||
CornerBottomLeft = bottomLeft;
|
||||
CornerTopRight = topRight;
|
||||
@ -259,6 +260,10 @@ public class BuildData
|
||||
|
||||
public boolean inBuildArea(Vector vec)
|
||||
{
|
||||
Bukkit.broadcastMessage("Checking if vector " + vec + " is inside build area for " + Player.getName());
|
||||
Bukkit.broadcastMessage("Bottom left corner: " + CornerBottomLeft.toString());
|
||||
Bukkit.broadcastMessage("Top right corner: " + CornerTopRight.toString());
|
||||
|
||||
if (vec.getBlockX() <= CornerBottomLeft.getBlockX())
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user