From bb507052d573c2754289a0de58de88fc72eade3a Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Sat, 28 Nov 2020 15:37:36 +0900 Subject: puzzle solvers and bug fixes --- .../syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java | 5 +++-- .../roomprocessor/waterpuzzle/nodes/WaterNodeStart.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java index 7894af26..a2da9b23 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java @@ -255,8 +255,9 @@ public class WaterBoard { int data= pos.getData(waterPuzzle.getDungeonRoom()); node = new WaterNodeEnd(id+":"+data, front.getBlockPos(waterPuzzle.getDungeonRoom()),x,y); waterNodeEndMap.put(id+":"+data, (WaterNodeEnd) node); - } else if (y == 3) { - waterNodeStart = (WaterNodeStart) (node = new WaterNodeStart(front.getBlockPos(waterPuzzle.getDungeonRoom()),x,y)); + } else if (y == 1) { + waterNodeStart = (WaterNodeStart) (node = new WaterNodeStart(front.getBlockPos(waterPuzzle.getDungeonRoom()), + frontId != 0 ^ validSwitches.get("mainStream").getCurrentState(),x,y)); } else { node = new WaterNodeAir(front.getBlockPos(waterPuzzle.getDungeonRoom()),x,y); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/nodes/WaterNodeStart.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/nodes/WaterNodeStart.java index 7c7d8e91..8ea7ca6c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/nodes/WaterNodeStart.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/nodes/WaterNodeStart.java @@ -13,7 +13,8 @@ import net.minecraft.world.World; @AllArgsConstructor public class WaterNodeStart implements WaterNode { - BlockPos blockPos; + private BlockPos blockPos; + private boolean isReversed; @Override public boolean canWaterGoThrough() { @@ -22,7 +23,7 @@ public class WaterNodeStart implements WaterNode { @Override public WaterCondition getCondition() { - return new WaterCondition("mainStream", true); + return new WaterCondition("mainStream", !isReversed); } @Override -- cgit