From 76270675123d54d818264778ec0750f4e0379a98 Mon Sep 17 00:00:00 2001 From: Metaphoriker Date: Thu, 19 Dec 2024 10:38:11 +0100 Subject: [PATCH] refact: move classes into engine package --- .../de/metaphoriker/pathetic/bukkit/PatheticBukkit.java | 4 ++-- .../metaphoriker/pathetic/bukkit/mapper/BukkitMapper.java | 2 +- .../pathetic/bukkit/provider/FailingBlockProvider.java | 2 +- .../pathetic/bukkit/provider/world/WorldDomain.java | 2 +- .../de/metaphoriker/pathetic/bukkit/util/ChunkUtil.java | 2 +- .../de/metaphoriker/pathetic/bukkit/util/WatchdogUtil.java | 2 +- .../src/main/java/de/metaphoriker/pathetic/engine/Node.java | 2 +- .../de/metaphoriker/pathetic/{ => engine}/Pathetic.java | 4 ++-- .../pathetic/engine/pathfinder/AStarPathfinder.java | 6 +++--- .../pathetic/engine/pathfinder/AbstractPathfinder.java | 2 +- .../de/metaphoriker/pathetic/engine/result/PathImpl.java | 2 +- .../pathetic/{ => engine}/util/ComputingCache.java | 2 +- .../pathetic/{ => engine}/util/ErrorLogger.java | 4 ++-- .../pathetic/{ => engine}/util/ExpiringHashMap.java | 2 +- .../pathetic/{ => engine}/util/GridRegionData.java | 2 +- .../de/metaphoriker/pathetic/{ => engine}/util/Tuple3.java | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) rename pathetic-engine/src/main/java/de/metaphoriker/pathetic/{ => engine}/Pathetic.java (88%) rename pathetic-engine/src/main/java/de/metaphoriker/pathetic/{ => engine}/util/ComputingCache.java (87%) rename pathetic-engine/src/main/java/de/metaphoriker/pathetic/{ => engine}/util/ErrorLogger.java (91%) rename pathetic-engine/src/main/java/de/metaphoriker/pathetic/{ => engine}/util/ExpiringHashMap.java (97%) rename pathetic-engine/src/main/java/de/metaphoriker/pathetic/{ => engine}/util/GridRegionData.java (97%) rename pathetic-engine/src/main/java/de/metaphoriker/pathetic/{ => engine}/util/Tuple3.java (92%) diff --git a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/PatheticBukkit.java b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/PatheticBukkit.java index bd6370b8..342d5bc9 100644 --- a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/PatheticBukkit.java +++ b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/PatheticBukkit.java @@ -1,9 +1,9 @@ package de.metaphoriker.pathetic.bukkit; -import de.metaphoriker.pathetic.Pathetic; +import de.metaphoriker.pathetic.engine.Pathetic; import de.metaphoriker.pathetic.bukkit.listener.ChunkInvalidateListener; import de.metaphoriker.pathetic.bukkit.util.BukkitVersionUtil; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; import org.bukkit.Bukkit; diff --git a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/mapper/BukkitMapper.java b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/mapper/BukkitMapper.java index d5a9c475..43f85306 100644 --- a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/mapper/BukkitMapper.java +++ b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/mapper/BukkitMapper.java @@ -14,7 +14,7 @@ import de.metaphoriker.pathetic.api.wrapper.PathEnvironment; import de.metaphoriker.pathetic.api.wrapper.PathPosition; import de.metaphoriker.pathetic.api.wrapper.PathVector; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; @UtilityClass public class BukkitMapper { diff --git a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/FailingBlockProvider.java b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/FailingBlockProvider.java index 64bd3807..042a9069 100644 --- a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/FailingBlockProvider.java +++ b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/FailingBlockProvider.java @@ -8,7 +8,7 @@ import de.metaphoriker.pathetic.bukkit.util.BukkitVersionUtil; import de.metaphoriker.pathetic.bukkit.util.ChunkUtil; import de.metaphoriker.pathetic.resolver.ChunkDataProviderResolver; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; import java.util.Map; import java.util.Optional; import java.util.UUID; diff --git a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/world/WorldDomain.java b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/world/WorldDomain.java index 29cb2644..28f37c84 100644 --- a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/world/WorldDomain.java +++ b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/provider/world/WorldDomain.java @@ -1,6 +1,6 @@ package de.metaphoriker.pathetic.bukkit.provider.world; -import de.metaphoriker.pathetic.util.ExpiringHashMap; +import de.metaphoriker.pathetic.engine.util.ExpiringHashMap; import java.util.Map; import java.util.Optional; import org.bukkit.ChunkSnapshot; diff --git a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/ChunkUtil.java b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/ChunkUtil.java index 080f10c6..b9a1fd9c 100644 --- a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/ChunkUtil.java +++ b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/ChunkUtil.java @@ -1,6 +1,6 @@ package de.metaphoriker.pathetic.bukkit.util; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import lombok.SneakyThrows; diff --git a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/WatchdogUtil.java b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/WatchdogUtil.java index 237ebf2b..4c258dc6 100644 --- a/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/WatchdogUtil.java +++ b/pathetic-bukkit/src/main/java/de/metaphoriker/pathetic/bukkit/util/WatchdogUtil.java @@ -1,6 +1,6 @@ package de.metaphoriker.pathetic.bukkit.util; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import lombok.experimental.UtilityClass; diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/Node.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/Node.java index 80146d76..e9cf3bb3 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/Node.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/Node.java @@ -8,7 +8,7 @@ import de.metaphoriker.pathetic.api.pathing.configuration.HeuristicWeights; import de.metaphoriker.pathetic.api.wrapper.PathPosition; import de.metaphoriker.pathetic.api.wrapper.PathVector; -import de.metaphoriker.pathetic.util.ComputingCache; +import de.metaphoriker.pathetic.engine.util.ComputingCache; @Getter @EqualsAndHashCode(onlyExplicitlyIncluded = true) diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/Pathetic.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/Pathetic.java similarity index 88% rename from pathetic-engine/src/main/java/de/metaphoriker/pathetic/Pathetic.java rename to pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/Pathetic.java index 6b20f42a..3dc6d3a4 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/Pathetic.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/Pathetic.java @@ -1,6 +1,6 @@ -package de.metaphoriker.pathetic; +package de.metaphoriker.pathetic.engine; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; import lombok.Getter; import lombok.experimental.UtilityClass; diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AStarPathfinder.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AStarPathfinder.java index cfd2fd53..d50d8891 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AStarPathfinder.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AStarPathfinder.java @@ -10,9 +10,9 @@ import de.metaphoriker.pathetic.api.wrapper.PathVector; import de.metaphoriker.pathetic.engine.Node; import de.metaphoriker.pathetic.engine.Offset; -import de.metaphoriker.pathetic.util.ExpiringHashMap; -import de.metaphoriker.pathetic.util.GridRegionData; -import de.metaphoriker.pathetic.util.Tuple3; +import de.metaphoriker.pathetic.engine.util.ExpiringHashMap; +import de.metaphoriker.pathetic.engine.util.GridRegionData; +import de.metaphoriker.pathetic.engine.util.Tuple3; import java.util.*; import org.jheaps.tree.FibonacciHeap; diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AbstractPathfinder.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AbstractPathfinder.java index 75940f63..09464dc4 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AbstractPathfinder.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/pathfinder/AbstractPathfinder.java @@ -14,7 +14,7 @@ import de.metaphoriker.pathetic.engine.Node; import de.metaphoriker.pathetic.engine.result.PathImpl; import de.metaphoriker.pathetic.engine.result.PathfinderResultImpl; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/result/PathImpl.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/result/PathImpl.java index d173da08..a403bccd 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/result/PathImpl.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/result/PathImpl.java @@ -17,7 +17,7 @@ import de.metaphoriker.pathetic.api.pathing.result.Path; import de.metaphoriker.pathetic.api.util.ParameterizedSupplier; import de.metaphoriker.pathetic.api.wrapper.PathPosition; -import de.metaphoriker.pathetic.util.ErrorLogger; +import de.metaphoriker.pathetic.engine.util.ErrorLogger; @Value public class PathImpl implements Path { diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ComputingCache.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ComputingCache.java similarity index 87% rename from pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ComputingCache.java rename to pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ComputingCache.java index 59b4c618..af7c4c5c 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ComputingCache.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ComputingCache.java @@ -1,4 +1,4 @@ -package de.metaphoriker.pathetic.util; +package de.metaphoriker.pathetic.engine.util; import java.util.function.Supplier; diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ErrorLogger.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ErrorLogger.java similarity index 91% rename from pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ErrorLogger.java rename to pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ErrorLogger.java index b4e24847..14e65ff7 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ErrorLogger.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ErrorLogger.java @@ -1,7 +1,7 @@ -package de.metaphoriker.pathetic.util; +package de.metaphoriker.pathetic.engine.util; import lombok.extern.slf4j.Slf4j; -import de.metaphoriker.pathetic.Pathetic; +import de.metaphoriker.pathetic.engine.Pathetic; @Slf4j public class ErrorLogger { diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ExpiringHashMap.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ExpiringHashMap.java similarity index 97% rename from pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ExpiringHashMap.java rename to pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ExpiringHashMap.java index 69f62c3b..488dd9fc 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/ExpiringHashMap.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/ExpiringHashMap.java @@ -1,4 +1,4 @@ -package de.metaphoriker.pathetic.util; +package de.metaphoriker.pathetic.engine.util; import java.util.concurrent.ConcurrentHashMap; import lombok.Getter; diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/GridRegionData.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/GridRegionData.java similarity index 97% rename from pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/GridRegionData.java rename to pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/GridRegionData.java index 2627d61a..1f5496f4 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/GridRegionData.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/GridRegionData.java @@ -1,4 +1,4 @@ -package de.metaphoriker.pathetic.util; +package de.metaphoriker.pathetic.engine.util; import com.google.common.hash.BloomFilter; import com.google.common.hash.Funnel; diff --git a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/Tuple3.java b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/Tuple3.java similarity index 92% rename from pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/Tuple3.java rename to pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/Tuple3.java index c1ceb0e1..711f6f87 100644 --- a/pathetic-engine/src/main/java/de/metaphoriker/pathetic/util/Tuple3.java +++ b/pathetic-engine/src/main/java/de/metaphoriker/pathetic/engine/util/Tuple3.java @@ -1,4 +1,4 @@ -package de.metaphoriker.pathetic.util; +package de.metaphoriker.pathetic.engine.util; import java.util.Objects;