diff options
author | syeyoung <cyong06@naver.com> | 2021-02-12 15:14:12 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-12 15:14:12 +0900 |
commit | b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb (patch) | |
tree | 1336677c7e35bf63ba1b6ebeb1eafa8b7aadda37 /src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java | |
parent | 92c8d9cec9fcc3a53ad95ff0212d77bf87becab7 (diff) | |
download | Skyblock-Dungeons-Guide-b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb.tar.gz Skyblock-Dungeons-Guide-b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb.tar.bz2 Skyblock-Dungeons-Guide-b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb.zip |
works pretty great
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java index e31b0f84..b625e869 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java @@ -31,11 +31,21 @@ public class NodeProcessorDungeonRoom extends NodeProcessor { (int)z - dungeonRoom.getMin().getZ()); } + private static final EnumFacing[] values2 = new EnumFacing[6]; + static { + values2[0] = EnumFacing.DOWN; + values2[1] = EnumFacing.NORTH; + values2[2] = EnumFacing.SOUTH; + values2[3] = EnumFacing.EAST; + values2[4] = EnumFacing.WEST; + values2[5] = EnumFacing.UP; + } + @Override public int findPathOptions(PathPoint[] pathOptions, Entity entityIn, PathPoint currentPoint, PathPoint targetPoint, float maxDistance) { int i = 0; - for (EnumFacing ef:EnumFacing.VALUES) { + for (EnumFacing ef:values2) { Vec3i dir = ef.getDirectionVec(); int newX = currentPoint.xCoord + dir.getX(); int newY = currentPoint.yCoord + dir.getY(); |