diff options
| author | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2021-05-03 21:53:00 -0400 |
|---|---|---|
| committer | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2021-05-03 21:53:00 -0400 |
| commit | 70785f7afa63a1fe682f6e9f3d03b72ecc24b803 (patch) | |
| tree | a61891a6711887777c3f47e5f4e75486fdbb8119 /src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder | |
| parent | cc03ece233023c57118e9acfeca8103b3bb587e1 (diff) | |
| download | Skyblock-Dungeons-Guide-70785f7afa63a1fe682f6e9f3d03b72ecc24b803.tar.gz Skyblock-Dungeons-Guide-70785f7afa63a1fe682f6e9f3d03b72ecc24b803.tar.bz2 Skyblock-Dungeons-Guide-70785f7afa63a1fe682f6e9f3d03b72ecc24b803.zip | |
IntelliJ's Code Clean Up
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder')
3 files changed, 10 insertions, 10 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 ffc9ca6d..c77e8056 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java @@ -74,7 +74,7 @@ public class DungeonRoom { } @Getter - private PathFinder pathFinder; + private final PathFinder pathFinder; public ScheduledFuture<List<BlockPos>> createEntityPathTo(IBlockAccess blockaccess, Entity entityIn, BlockPos targetPos, float dist) { return asyncPathFinder.schedule(() -> { @@ -93,16 +93,16 @@ public class DungeonRoom { private static final ScheduledExecutorService asyncPathFinder = Executors.newScheduledThreadPool(2); @Getter - private NodeProcessorDungeonRoom nodeProcessorDungeonRoom; + private final NodeProcessorDungeonRoom nodeProcessorDungeonRoom; @Getter private final Map<String, Object> roomContext = new HashMap<String, Object>(); @AllArgsConstructor @Getter - public static enum RoomState { + public enum RoomState { DISCOVERED(0), COMPLETE_WITHOUT_SECRETS(0), FINISHED(0), FAILED(-14); - private int scoreModifier; + private final int scoreModifier; } private RoomProcessor roomProcessor; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java index 19f2fd3c..e0bfe0f3 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java @@ -18,9 +18,9 @@ import java.security.NoSuchAlgorithmException; import java.util.*; public class DungeonRoomInfoRegistry { - private static List<DungeonRoomInfo> registered = new ArrayList<DungeonRoomInfo>(); - private static Map<Short, List<DungeonRoomInfo>> shapeMap = new HashMap<Short, List<DungeonRoomInfo>>(); - private static Map<UUID, DungeonRoomInfo> uuidMap = new HashMap<UUID, DungeonRoomInfo>(); + private static final List<DungeonRoomInfo> registered = new ArrayList<DungeonRoomInfo>(); + private static final Map<Short, List<DungeonRoomInfo>> shapeMap = new HashMap<Short, List<DungeonRoomInfo>>(); + private static final Map<UUID, DungeonRoomInfo> uuidMap = new HashMap<UUID, DungeonRoomInfo>(); public static void register(DungeonRoomInfo dungeonRoomInfo) { if (dungeonRoomInfo == null) throw new NullPointerException("what the fak parameter is noll?"); @@ -42,7 +42,7 @@ public class DungeonRoomInfoRegistry { public static List<DungeonRoomInfo> getByShape(Short shape) { List<DungeonRoomInfo> dungeonRoomInfos = shapeMap.get(shape); - return dungeonRoomInfos == null ? Collections.<DungeonRoomInfo>emptyList() : dungeonRoomInfos; + return dungeonRoomInfos == null ? Collections.emptyList() : dungeonRoomInfos; } public static DungeonRoomInfo getByUUID(UUID uid) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java index cf846b20..c3e3706b 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java @@ -12,7 +12,7 @@ import net.minecraft.world.World; import java.util.List; public class RoomMatcher { - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; @Getter private DungeonRoomInfo match; @@ -20,7 +20,7 @@ public class RoomMatcher { private int rotation; // how much the "found room" has to rotate clockwise to match the given dungeon room info. ! private boolean triedMatch = false; - private World w; + private final World w; public RoomMatcher(DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; |
