From 740c141be9abb13b7b54389a408b082570945153 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 27 Feb 2021 00:55:04 +0900 Subject: massive refactor --- .../dungeonsguide/roomprocessor/GeneralRoomProcessor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java index b0b98310..ed5dfc87 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java @@ -57,7 +57,7 @@ public class GeneralRoomProcessor implements RoomProcessor { path.onTick(); if (FeatureRegistry.SECRET_AUTO_BROWSE_NEXT.isEnabled() && path.getCurrentAction() instanceof ActionComplete) { if (!path.getState().equals("found")) return; - if (!(dungeonRoom.getDungeonRoomInfo().getMechanics().get(path.getMechanic()) instanceof DungeonSecret)) return; + if (!(dungeonRoom.getMechanics().get(path.getMechanic()) instanceof DungeonSecret)) return; searchForNextTarget(); } } @@ -69,7 +69,7 @@ public class GeneralRoomProcessor implements RoomProcessor { double lowestCost = 99999999999999.0; Map.Entry lowestWeightMechanic = null; - for (Map.Entry mech: dungeonRoom.getDungeonRoomInfo().getMechanics().entrySet()) { + for (Map.Entry mech: dungeonRoom.getMechanics().entrySet()) { if (!(mech.getValue() instanceof DungeonSecret)) continue; if (visited.contains(mech.getKey())) continue; if (((DungeonSecret) mech.getValue()).getSecretStatus(getDungeonRoom()) != DungeonSecret.SecretStatus.FOUND) { @@ -78,8 +78,8 @@ public class GeneralRoomProcessor implements RoomProcessor { ((DungeonSecret) mech.getValue()).getPreRequisite().size() == 0) { cost += -100000000; } - if (mech.getValue().getRepresentingPoint() == null) continue; - BlockPos blockpos = mech.getValue().getRepresentingPoint().getBlockPos(getDungeonRoom()); + if (mech.getValue().getRepresentingPoint(getDungeonRoom()) == null) continue; + BlockPos blockpos = mech.getValue().getRepresentingPoint(getDungeonRoom()).getBlockPos(getDungeonRoom()); cost += blockpos.distanceSq(pos); cost += ((DungeonSecret) mech.getValue()).getPreRequisite().size() * 100; @@ -118,7 +118,7 @@ public class GeneralRoomProcessor implements RoomProcessor { @Override public void drawWorld(float partialTicks) { if (FeatureRegistry.DEBUG.isEnabled() && (EditingContext.getEditingContext() != null && EditingContext.getEditingContext().getCurrent() instanceof GuiDungeonRoomEdit)) { - for (Map.Entry value : dungeonRoom.getDungeonRoomInfo().getMechanics().entrySet()) { + for (Map.Entry value : dungeonRoom.getMechanics().entrySet()) { if (value.getValue() == null) continue;; value.getValue().highlight(new Color(0,255,255,50), value.getKey(), dungeonRoom, partialTicks); } -- cgit