From 35ed0f6821170034372c0154ce62e820c02b1b69 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 11 Sep 2018 10:28:03 -0700 Subject: [PATCH] refactor chunk to cache --- .../baritone/behavior/impl/LocationTrackingBehavior.java | 4 ++-- src/main/java/baritone/behavior/impl/MineBehavior.java | 8 ++++---- src/main/java/baritone/{chunk => cache}/CachedChunk.java | 2 +- src/main/java/baritone/{chunk => cache}/CachedRegion.java | 2 +- src/main/java/baritone/{chunk => cache}/CachedWorld.java | 2 +- src/main/java/baritone/{chunk => cache}/ChunkPacker.java | 2 +- src/main/java/baritone/{chunk => cache}/Waypoint.java | 2 +- src/main/java/baritone/{chunk => cache}/Waypoints.java | 2 +- src/main/java/baritone/{chunk => cache}/WorldData.java | 2 +- .../java/baritone/{chunk => cache}/WorldProvider.java | 2 +- src/main/java/baritone/{chunk => cache}/WorldScanner.java | 2 +- src/main/java/baritone/event/GameEventHandler.java | 2 +- src/main/java/baritone/pathing/calc/AStarPathFinder.java | 4 ++-- src/main/java/baritone/utils/BlockStateInterface.java | 6 +++--- src/main/java/baritone/utils/ExampleBaritoneControl.java | 6 +++--- .../java/baritone/{chunk => cache}/CachedRegionTest.java | 2 +- 16 files changed, 25 insertions(+), 25 deletions(-) rename src/main/java/baritone/{chunk => cache}/CachedChunk.java (99%) rename src/main/java/baritone/{chunk => cache}/CachedRegion.java (99%) rename src/main/java/baritone/{chunk => cache}/CachedWorld.java (99%) rename src/main/java/baritone/{chunk => cache}/ChunkPacker.java (99%) rename src/main/java/baritone/{chunk => cache}/Waypoint.java (99%) rename src/main/java/baritone/{chunk => cache}/Waypoints.java (99%) rename src/main/java/baritone/{chunk => cache}/WorldData.java (98%) rename src/main/java/baritone/{chunk => cache}/WorldProvider.java (99%) rename src/main/java/baritone/{chunk => cache}/WorldScanner.java (99%) rename src/test/java/baritone/{chunk => cache}/CachedRegionTest.java (98%) diff --git a/src/main/java/baritone/behavior/impl/LocationTrackingBehavior.java b/src/main/java/baritone/behavior/impl/LocationTrackingBehavior.java index ba075dd3..47dfcd7c 100644 --- a/src/main/java/baritone/behavior/impl/LocationTrackingBehavior.java +++ b/src/main/java/baritone/behavior/impl/LocationTrackingBehavior.java @@ -18,8 +18,8 @@ package baritone.behavior.impl; import baritone.behavior.Behavior; -import baritone.chunk.Waypoint; -import baritone.chunk.WorldProvider; +import baritone.cache.Waypoint; +import baritone.cache.WorldProvider; import baritone.api.event.events.BlockInteractEvent; import baritone.utils.BlockStateInterface; import net.minecraft.block.BlockBed; diff --git a/src/main/java/baritone/behavior/impl/MineBehavior.java b/src/main/java/baritone/behavior/impl/MineBehavior.java index 0b4b3b2a..ab68783e 100644 --- a/src/main/java/baritone/behavior/impl/MineBehavior.java +++ b/src/main/java/baritone/behavior/impl/MineBehavior.java @@ -19,10 +19,10 @@ package baritone.behavior.impl; import baritone.api.event.events.PathEvent; import baritone.behavior.Behavior; -import baritone.chunk.CachedChunk; -import baritone.chunk.ChunkPacker; -import baritone.chunk.WorldProvider; -import baritone.chunk.WorldScanner; +import baritone.cache.CachedChunk; +import baritone.cache.ChunkPacker; +import baritone.cache.WorldProvider; +import baritone.cache.WorldScanner; import baritone.pathing.goals.Goal; import baritone.pathing.goals.GoalComposite; import baritone.pathing.goals.GoalTwoBlocks; diff --git a/src/main/java/baritone/chunk/CachedChunk.java b/src/main/java/baritone/cache/CachedChunk.java similarity index 99% rename from src/main/java/baritone/chunk/CachedChunk.java rename to src/main/java/baritone/cache/CachedChunk.java index 56f7662a..fbab3161 100644 --- a/src/main/java/baritone/chunk/CachedChunk.java +++ b/src/main/java/baritone/cache/CachedChunk.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import baritone.utils.pathing.IBlockTypeAccess; import baritone.utils.pathing.PathingBlockType; diff --git a/src/main/java/baritone/chunk/CachedRegion.java b/src/main/java/baritone/cache/CachedRegion.java similarity index 99% rename from src/main/java/baritone/chunk/CachedRegion.java rename to src/main/java/baritone/cache/CachedRegion.java index ee305527..1e5e8ea5 100644 --- a/src/main/java/baritone/chunk/CachedRegion.java +++ b/src/main/java/baritone/cache/CachedRegion.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import baritone.utils.pathing.IBlockTypeAccess; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/baritone/chunk/CachedWorld.java b/src/main/java/baritone/cache/CachedWorld.java similarity index 99% rename from src/main/java/baritone/chunk/CachedWorld.java rename to src/main/java/baritone/cache/CachedWorld.java index de6ebd5f..d56882b4 100644 --- a/src/main/java/baritone/chunk/CachedWorld.java +++ b/src/main/java/baritone/cache/CachedWorld.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import baritone.Baritone; import baritone.utils.pathing.IBlockTypeAccess; diff --git a/src/main/java/baritone/chunk/ChunkPacker.java b/src/main/java/baritone/cache/ChunkPacker.java similarity index 99% rename from src/main/java/baritone/chunk/ChunkPacker.java rename to src/main/java/baritone/cache/ChunkPacker.java index 583dddc0..7167df34 100644 --- a/src/main/java/baritone/chunk/ChunkPacker.java +++ b/src/main/java/baritone/cache/ChunkPacker.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import baritone.pathing.movement.MovementHelper; import baritone.utils.Helper; diff --git a/src/main/java/baritone/chunk/Waypoint.java b/src/main/java/baritone/cache/Waypoint.java similarity index 99% rename from src/main/java/baritone/chunk/Waypoint.java rename to src/main/java/baritone/cache/Waypoint.java index 8b290d56..7cd5ace3 100644 --- a/src/main/java/baritone/chunk/Waypoint.java +++ b/src/main/java/baritone/cache/Waypoint.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import com.google.common.collect.ImmutableList; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/baritone/chunk/Waypoints.java b/src/main/java/baritone/cache/Waypoints.java similarity index 99% rename from src/main/java/baritone/chunk/Waypoints.java rename to src/main/java/baritone/cache/Waypoints.java index ec587fea..82cf893f 100644 --- a/src/main/java/baritone/chunk/Waypoints.java +++ b/src/main/java/baritone/cache/Waypoints.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/baritone/chunk/WorldData.java b/src/main/java/baritone/cache/WorldData.java similarity index 98% rename from src/main/java/baritone/chunk/WorldData.java rename to src/main/java/baritone/cache/WorldData.java index 3cd7b737..a7d0b72a 100644 --- a/src/main/java/baritone/chunk/WorldData.java +++ b/src/main/java/baritone/cache/WorldData.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import java.nio.file.Path; diff --git a/src/main/java/baritone/chunk/WorldProvider.java b/src/main/java/baritone/cache/WorldProvider.java similarity index 99% rename from src/main/java/baritone/chunk/WorldProvider.java rename to src/main/java/baritone/cache/WorldProvider.java index 007f037d..0275301d 100644 --- a/src/main/java/baritone/chunk/WorldProvider.java +++ b/src/main/java/baritone/cache/WorldProvider.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import baritone.Baritone; import baritone.utils.Helper; diff --git a/src/main/java/baritone/chunk/WorldScanner.java b/src/main/java/baritone/cache/WorldScanner.java similarity index 99% rename from src/main/java/baritone/chunk/WorldScanner.java rename to src/main/java/baritone/cache/WorldScanner.java index 47d377b1..2b1ebe23 100644 --- a/src/main/java/baritone/chunk/WorldScanner.java +++ b/src/main/java/baritone/cache/WorldScanner.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import baritone.utils.Helper; import net.minecraft.block.Block; diff --git a/src/main/java/baritone/event/GameEventHandler.java b/src/main/java/baritone/event/GameEventHandler.java index e6dba1ec..c681bc29 100644 --- a/src/main/java/baritone/event/GameEventHandler.java +++ b/src/main/java/baritone/event/GameEventHandler.java @@ -21,7 +21,7 @@ import baritone.Baritone; import baritone.api.event.events.*; import baritone.api.event.events.type.EventState; import baritone.api.event.listener.IGameEventListener; -import baritone.chunk.WorldProvider; +import baritone.cache.WorldProvider; import baritone.utils.BlockStateInterface; import baritone.utils.Helper; import baritone.utils.InputOverrideHandler; diff --git a/src/main/java/baritone/pathing/calc/AStarPathFinder.java b/src/main/java/baritone/pathing/calc/AStarPathFinder.java index bf553e18..674d5b64 100644 --- a/src/main/java/baritone/pathing/calc/AStarPathFinder.java +++ b/src/main/java/baritone/pathing/calc/AStarPathFinder.java @@ -18,8 +18,8 @@ package baritone.pathing.calc; import baritone.Baritone; -import baritone.chunk.CachedWorld; -import baritone.chunk.WorldProvider; +import baritone.cache.CachedWorld; +import baritone.cache.WorldProvider; import baritone.pathing.calc.openset.BinaryHeapOpenSet; import baritone.pathing.goals.Goal; import baritone.pathing.movement.ActionCosts; diff --git a/src/main/java/baritone/utils/BlockStateInterface.java b/src/main/java/baritone/utils/BlockStateInterface.java index 9a7c7028..1ccd5ac6 100644 --- a/src/main/java/baritone/utils/BlockStateInterface.java +++ b/src/main/java/baritone/utils/BlockStateInterface.java @@ -18,9 +18,9 @@ package baritone.utils; import baritone.Baritone; -import baritone.chunk.CachedRegion; -import baritone.chunk.WorldData; -import baritone.chunk.WorldProvider; +import baritone.cache.CachedRegion; +import baritone.cache.WorldData; +import baritone.cache.WorldProvider; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/baritone/utils/ExampleBaritoneControl.java b/src/main/java/baritone/utils/ExampleBaritoneControl.java index c3eb40aa..b12db109 100644 --- a/src/main/java/baritone/utils/ExampleBaritoneControl.java +++ b/src/main/java/baritone/utils/ExampleBaritoneControl.java @@ -24,9 +24,9 @@ import baritone.behavior.Behavior; import baritone.behavior.impl.FollowBehavior; import baritone.behavior.impl.MineBehavior; import baritone.behavior.impl.PathingBehavior; -import baritone.chunk.ChunkPacker; -import baritone.chunk.Waypoint; -import baritone.chunk.WorldProvider; +import baritone.cache.ChunkPacker; +import baritone.cache.Waypoint; +import baritone.cache.WorldProvider; import baritone.pathing.calc.AStarPathFinder; import baritone.pathing.calc.AbstractNodeCostSearch; import baritone.pathing.goals.*; diff --git a/src/test/java/baritone/chunk/CachedRegionTest.java b/src/test/java/baritone/cache/CachedRegionTest.java similarity index 98% rename from src/test/java/baritone/chunk/CachedRegionTest.java rename to src/test/java/baritone/cache/CachedRegionTest.java index 8350390c..dc595e2e 100644 --- a/src/test/java/baritone/chunk/CachedRegionTest.java +++ b/src/test/java/baritone/cache/CachedRegionTest.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.chunk; +package baritone.cache; import org.junit.Test;