diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon')
3 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java index 76f22f30..8e7fd7e7 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java @@ -33,9 +33,9 @@ public class OffsetPoint implements Cloneable, Serializable { for (int i = 0; i < dungeonRoom.getRoomMatcher().getRotation(); i++) { vector2d = VectorUtils.rotateClockwise(vector2d); if (i % 2 == 0) { - vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks().length - 1; // + Z + vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks()[0].length - 1; // + Z } else { - vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks()[0].length - 1; // + X + vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks().length - 1; // + X } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java index cdfc7c37..443e8bbd 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java @@ -28,9 +28,7 @@ public class DungeonDoor implements DungeonMechanic, RouteBlocker { @Override public Set<Action> getAction(String state, DungeonRoom dungeonRoom) { if (!("open".equalsIgnoreCase(state) || "closed".equalsIgnoreCase(state))) throw new IllegalArgumentException(state+" is not valid state for door"); - if (!isBlocking(dungeonRoom)) { - return Collections.emptySet(); - } + if (state.equalsIgnoreCase(getCurrentState(dungeonRoom))) return Collections.emptySet(); Set<Action> base; Set<Action> preRequisites = base = new HashSet<Action>(); { 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 bf480833..cf846b20 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java @@ -5,6 +5,7 @@ import kr.syeyoung.dungeonsguide.utils.ArrayUtils; import kr.syeyoung.dungeonsguide.utils.ShortUtils; import lombok.Getter; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; @@ -107,7 +108,7 @@ public class RoomMatcher { } Block b = dungeonRoom.getRelativeBlockAt(x,0,z); - if (b == null) { + if (b == null || b == Blocks.chest || b == Blocks.trapped_chest) { data[z][x] = -1; } else { data[z][x] = Block.getIdFromBlock(b); |