aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
index b31193c7..c64d15f1 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
@@ -49,14 +49,18 @@ public class RoomMatcher {
for (int i = 0; i < rotation; i++)
res = ArrayUtils.rotateCounterClockwise(res);
+ System.out.println("Trying to match "+dungeonRoomInfo.getUuid().toString()+" / "+dungeonRoomInfo.getName()+"... at rotation "+rotation);
+
int y = dungeonRoom.getMin().getY();
for (int z = 0; z < res.length; z ++) {
for (int x = 0; x < res[0].length; x++) {
- int data = res[y][x];
+ int data = res[z][x];
if (data == -1) continue;
Block b = dungeonRoom.getRelativeBlockAt(x,y,z);
- if (b == null) return false;
- if (Block.getIdFromBlock(b) != data) return false;
+ if (b == null || Block.getIdFromBlock(b) != data) {
+ System.out.println("Match failed at offset X"+x+" / Z"+z+". expected "+data+" but found "+b +" ("+Block.getIdFromBlock(b)+")");
+ return false;
+ }
}
}
return true;