aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-28 22:21:58 +0900
committersyeyoung <cyong06@naver.com>2021-02-28 22:21:58 +0900
commitd72f7f1db99b76385073995ed0b193b7ed5361c0 (patch)
tree192db2906d5743130ecfc40f8425e5dadb2299a7 /src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java
parentd791b14ccc4b6e0c88b52daaf2975a4413f525df (diff)
downloadSkyblock-Dungeons-Guide-d72f7f1db99b76385073995ed0b193b7ed5361c0.tar.gz
Skyblock-Dungeons-Guide-d72f7f1db99b76385073995ed0b193b7ed5361c0.tar.bz2
Skyblock-Dungeons-Guide-d72f7f1db99b76385073995ed0b193b7ed5361c0.zip
iron bars
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java
index 8955a765..8e937b34 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java
@@ -77,6 +77,34 @@ public class NodeProcessorDungeonRoom extends NodeProcessor {
}
}
}
+
+ if (dir.getY() == 0 && curr.getBlock() == Blocks.iron_bars && up.getBlock() == Blocks.air &&
+ entityIn.getEntityWorld().getBlockState(new BlockPos(currentPoint.xCoord, currentPoint.yCoord, currentPoint.zCoord)).getBlock() != Blocks.iron_bars) {
+ boolean theFlag = false;
+ if (newX == 0) {
+ if (entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY, newZ)
+ .add(0,0,1)).getBlock() == Blocks.air) {
+ theFlag = true;
+ } else if (entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY, newZ)
+ .add(0,0,-1)).getBlock() == Blocks.air) {
+ theFlag = true;
+ }
+ } else if (newZ == 0) {
+ if (entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY, newZ)
+ .add(-1,0,0)).getBlock() == Blocks.air) {
+ theFlag = true;
+ } else if (entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY, newZ)
+ .add(1,0,0)).getBlock() == Blocks.air) {
+ theFlag = true;
+ }
+ }
+ if (theFlag) {
+ PathPoint pt = openPoint(newX, newY, newZ);
+ if (pt.visited) continue;
+ pathOptions[i++] = pt;
+ continue;
+ }
+ }
}
return i;
}