aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-12 01:43:20 +0900
committersyeyoung <cyong06@naver.com>2021-02-12 01:43:20 +0900
commit92c8d9cec9fcc3a53ad95ff0212d77bf87becab7 (patch)
tree269ec202ecc2426ff0d6d73fab95af1fea57042a /src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder
parent89c82ad1fea9fd0a8e32a5e818c6c01856cdd660 (diff)
downloadSkyblock-Dungeons-Guide-92c8d9cec9fcc3a53ad95ff0212d77bf87becab7.tar.gz
Skyblock-Dungeons-Guide-92c8d9cec9fcc3a53ad95ff0212d77bf87becab7.tar.bz2
Skyblock-Dungeons-Guide-92c8d9cec9fcc3a53ad95ff0212d77bf87becab7.zip
pathfinder go brrrr
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java
index 6b0322ee..3c262856 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java
@@ -5,6 +5,7 @@ import kr.syeyoung.dungeonsguide.dungeon.DungeonContext;
import kr.syeyoung.dungeonsguide.dungeon.MapProcessor;
import kr.syeyoung.dungeonsguide.dungeon.data.DungeonRoomInfo;
import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonDoor;
+import kr.syeyoung.dungeonsguide.pathfinding.NodeProcessorDungeonRoom;
import kr.syeyoung.dungeonsguide.roomprocessor.ProcessorFactory;
import kr.syeyoung.dungeonsguide.roomprocessor.RoomProcessor;
import kr.syeyoung.dungeonsguide.roomprocessor.RoomProcessorGenerator;
@@ -12,6 +13,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.block.Block;
+import net.minecraft.pathfinding.PathFinder;
import net.minecraft.util.BlockPos;
import javax.vecmath.Vector2d;
@@ -43,6 +45,11 @@ public class DungeonRoom {
@Setter
private RoomState currentState = RoomState.DISCOVERED;
+ @Getter
+ private PathFinder pathFinder;
+ @Getter
+ private NodeProcessorDungeonRoom nodeProcessorDungeonRoom;
+
@AllArgsConstructor
@Getter
public static enum RoomState {
@@ -71,6 +78,8 @@ public class DungeonRoom {
buildDoors();
buildRoom();
updateRoomProcessor();
+ nodeProcessorDungeonRoom = new NodeProcessorDungeonRoom(this);
+ pathFinder = new PathFinder(nodeProcessorDungeonRoom);
}
private static final Set<Vector2d> directions = Sets.newHashSet(new Vector2d(0,16), new Vector2d(0, -16), new Vector2d(16, 0), new Vector2d(-16 , 0));