From 2f9efae4570ccf3e0051de7fdb982566911c4f8f Mon Sep 17 00:00:00 2001 From: Brady Date: Fri, 11 Oct 2019 18:15:14 -0500 Subject: [PATCH] Refactors to improve consistency --- src/api/java/baritone/api/process/IBuilderProcess.java | 2 +- src/api/java/baritone/api/schematic/AbstractSchematic.java | 2 -- src/api/java/baritone/api/schematic/CompositeSchematic.java | 1 - .../java/baritone/api/schematic/CompositeSchematicEntry.java | 2 -- src/api/java/baritone/api/{utils => schematic}/ISchematic.java | 2 +- src/api/java/baritone/api/schematic/MaskSchematic.java | 1 - src/api/java/baritone/api/schematic/ReplaceSchematic.java | 1 - src/api/java/baritone/api/schematic/ShellSchematic.java | 1 - src/api/java/baritone/api/schematic/WallsSchematic.java | 1 - src/api/java/baritone/api/utils/BlockOptionalMeta.java | 2 +- src/api/java/baritone/api/{ => utils}/accessor/IItemStack.java | 2 +- src/launch/java/baritone/launch/mixins/MixinGuiScreen.java | 2 +- src/launch/java/baritone/launch/mixins/MixinItemStack.java | 2 +- src/main/java/baritone/command/BaritoneChatControl.java | 2 +- src/main/java/baritone/command/defaults/SelCommand.java | 2 +- src/main/java/baritone/process/BuilderProcess.java | 1 + .../api => main/java/baritone/utils}/accessor/IGuiScreen.java | 2 +- src/main/java/baritone/utils/schematic/FillSchematic.java | 2 +- src/main/java/baritone/utils/schematic/Schematic.java | 2 +- .../baritone/utils/schematic/schematica/SchematicAdapter.java | 2 +- .../baritone/utils/schematic/schematica/SchematicaHelper.java | 2 +- 21 files changed, 14 insertions(+), 22 deletions(-) rename src/api/java/baritone/api/{utils => schematic}/ISchematic.java (99%) rename src/api/java/baritone/api/{ => utils}/accessor/IItemStack.java (95%) rename src/{api/java/baritone/api => main/java/baritone/utils}/accessor/IGuiScreen.java (95%) diff --git a/src/api/java/baritone/api/process/IBuilderProcess.java b/src/api/java/baritone/api/process/IBuilderProcess.java index c48c2a04..9063b990 100644 --- a/src/api/java/baritone/api/process/IBuilderProcess.java +++ b/src/api/java/baritone/api/process/IBuilderProcess.java @@ -17,7 +17,7 @@ package baritone.api.process; -import baritone.api.utils.ISchematic; +import baritone.api.schematic.ISchematic; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.util.math.BlockPos; diff --git a/src/api/java/baritone/api/schematic/AbstractSchematic.java b/src/api/java/baritone/api/schematic/AbstractSchematic.java index 7a24e803..3cd14747 100644 --- a/src/api/java/baritone/api/schematic/AbstractSchematic.java +++ b/src/api/java/baritone/api/schematic/AbstractSchematic.java @@ -17,8 +17,6 @@ package baritone.api.schematic; -import baritone.api.utils.ISchematic; - public abstract class AbstractSchematic implements ISchematic { protected int x; diff --git a/src/api/java/baritone/api/schematic/CompositeSchematic.java b/src/api/java/baritone/api/schematic/CompositeSchematic.java index 21df29b4..2f119de1 100644 --- a/src/api/java/baritone/api/schematic/CompositeSchematic.java +++ b/src/api/java/baritone/api/schematic/CompositeSchematic.java @@ -17,7 +17,6 @@ package baritone.api.schematic; -import baritone.api.utils.ISchematic; import net.minecraft.block.state.IBlockState; import java.util.ArrayList; diff --git a/src/api/java/baritone/api/schematic/CompositeSchematicEntry.java b/src/api/java/baritone/api/schematic/CompositeSchematicEntry.java index a26f356b..10260542 100644 --- a/src/api/java/baritone/api/schematic/CompositeSchematicEntry.java +++ b/src/api/java/baritone/api/schematic/CompositeSchematicEntry.java @@ -17,8 +17,6 @@ package baritone.api.schematic; -import baritone.api.utils.ISchematic; - public class CompositeSchematicEntry { public final ISchematic schematic; diff --git a/src/api/java/baritone/api/utils/ISchematic.java b/src/api/java/baritone/api/schematic/ISchematic.java similarity index 99% rename from src/api/java/baritone/api/utils/ISchematic.java rename to src/api/java/baritone/api/schematic/ISchematic.java index 2adcbdd5..88cfc899 100644 --- a/src/api/java/baritone/api/utils/ISchematic.java +++ b/src/api/java/baritone/api/schematic/ISchematic.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.api.utils; +package baritone.api.schematic; import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; diff --git a/src/api/java/baritone/api/schematic/MaskSchematic.java b/src/api/java/baritone/api/schematic/MaskSchematic.java index fa9b8126..229f58d5 100644 --- a/src/api/java/baritone/api/schematic/MaskSchematic.java +++ b/src/api/java/baritone/api/schematic/MaskSchematic.java @@ -17,7 +17,6 @@ package baritone.api.schematic; -import baritone.api.utils.ISchematic; import net.minecraft.block.state.IBlockState; import java.util.List; diff --git a/src/api/java/baritone/api/schematic/ReplaceSchematic.java b/src/api/java/baritone/api/schematic/ReplaceSchematic.java index 988cfd7f..f064435e 100644 --- a/src/api/java/baritone/api/schematic/ReplaceSchematic.java +++ b/src/api/java/baritone/api/schematic/ReplaceSchematic.java @@ -18,7 +18,6 @@ package baritone.api.schematic; import baritone.api.utils.BlockOptionalMetaLookup; -import baritone.api.utils.ISchematic; import net.minecraft.block.state.IBlockState; public class ReplaceSchematic extends MaskSchematic { diff --git a/src/api/java/baritone/api/schematic/ShellSchematic.java b/src/api/java/baritone/api/schematic/ShellSchematic.java index 4ead61b6..275a4926 100644 --- a/src/api/java/baritone/api/schematic/ShellSchematic.java +++ b/src/api/java/baritone/api/schematic/ShellSchematic.java @@ -17,7 +17,6 @@ package baritone.api.schematic; -import baritone.api.utils.ISchematic; import net.minecraft.block.state.IBlockState; public class ShellSchematic extends MaskSchematic { diff --git a/src/api/java/baritone/api/schematic/WallsSchematic.java b/src/api/java/baritone/api/schematic/WallsSchematic.java index e05de1e7..6e1cfa5f 100644 --- a/src/api/java/baritone/api/schematic/WallsSchematic.java +++ b/src/api/java/baritone/api/schematic/WallsSchematic.java @@ -17,7 +17,6 @@ package baritone.api.schematic; -import baritone.api.utils.ISchematic; import net.minecraft.block.state.IBlockState; public class WallsSchematic extends MaskSchematic { diff --git a/src/api/java/baritone/api/utils/BlockOptionalMeta.java b/src/api/java/baritone/api/utils/BlockOptionalMeta.java index c65b6d3d..3ab76dd2 100644 --- a/src/api/java/baritone/api/utils/BlockOptionalMeta.java +++ b/src/api/java/baritone/api/utils/BlockOptionalMeta.java @@ -17,7 +17,7 @@ package baritone.api.utils; -import baritone.api.accessor.IItemStack; +import baritone.api.utils.accessor.IItemStack; import com.google.common.collect.ImmutableSet; import net.minecraft.block.*; import net.minecraft.block.properties.IProperty; diff --git a/src/api/java/baritone/api/accessor/IItemStack.java b/src/api/java/baritone/api/utils/accessor/IItemStack.java similarity index 95% rename from src/api/java/baritone/api/accessor/IItemStack.java rename to src/api/java/baritone/api/utils/accessor/IItemStack.java index 480c713f..22902779 100644 --- a/src/api/java/baritone/api/accessor/IItemStack.java +++ b/src/api/java/baritone/api/utils/accessor/IItemStack.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.api.accessor; +package baritone.api.utils.accessor; public interface IItemStack { diff --git a/src/launch/java/baritone/launch/mixins/MixinGuiScreen.java b/src/launch/java/baritone/launch/mixins/MixinGuiScreen.java index 9f91beaa..39f78fd3 100644 --- a/src/launch/java/baritone/launch/mixins/MixinGuiScreen.java +++ b/src/launch/java/baritone/launch/mixins/MixinGuiScreen.java @@ -17,7 +17,7 @@ package baritone.launch.mixins; -import baritone.api.accessor.IGuiScreen; +import baritone.utils.accessor.IGuiScreen; import net.minecraft.client.gui.GuiScreen; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Invoker; diff --git a/src/launch/java/baritone/launch/mixins/MixinItemStack.java b/src/launch/java/baritone/launch/mixins/MixinItemStack.java index 2ad4c187..32535977 100644 --- a/src/launch/java/baritone/launch/mixins/MixinItemStack.java +++ b/src/launch/java/baritone/launch/mixins/MixinItemStack.java @@ -17,7 +17,7 @@ package baritone.launch.mixins; -import baritone.api.accessor.IItemStack; +import baritone.api.utils.accessor.IItemStack; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Final; diff --git a/src/main/java/baritone/command/BaritoneChatControl.java b/src/main/java/baritone/command/BaritoneChatControl.java index c41c682c..15f15abe 100644 --- a/src/main/java/baritone/command/BaritoneChatControl.java +++ b/src/main/java/baritone/command/BaritoneChatControl.java @@ -20,7 +20,7 @@ package baritone.command; import baritone.api.BaritoneAPI; import baritone.api.IBaritone; import baritone.api.Settings; -import baritone.api.accessor.IGuiScreen; +import baritone.utils.accessor.IGuiScreen; import baritone.api.event.events.ChatEvent; import baritone.api.event.events.TabCompleteEvent; import baritone.api.event.listener.AbstractGameEventListener; diff --git a/src/main/java/baritone/command/defaults/SelCommand.java b/src/main/java/baritone/command/defaults/SelCommand.java index 97cae9a6..6f242f0b 100644 --- a/src/main/java/baritone/command/defaults/SelCommand.java +++ b/src/main/java/baritone/command/defaults/SelCommand.java @@ -27,7 +27,7 @@ import baritone.api.selection.ISelectionManager; import baritone.api.utils.BetterBlockPos; import baritone.api.utils.BlockOptionalMeta; import baritone.api.utils.BlockOptionalMetaLookup; -import baritone.api.utils.ISchematic; +import baritone.api.schematic.ISchematic; import baritone.api.command.Command; import baritone.api.command.datatypes.ForBlockOptionalMeta; import baritone.api.command.datatypes.ForEnumFacing; diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 687e6c98..4300ce53 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -25,6 +25,7 @@ import baritone.api.pathing.goals.GoalGetToBlock; import baritone.api.process.IBuilderProcess; import baritone.api.process.PathingCommand; import baritone.api.process.PathingCommandType; +import baritone.api.schematic.ISchematic; import baritone.api.utils.*; import baritone.api.utils.input.Input; import baritone.pathing.movement.CalculationContext; diff --git a/src/api/java/baritone/api/accessor/IGuiScreen.java b/src/main/java/baritone/utils/accessor/IGuiScreen.java similarity index 95% rename from src/api/java/baritone/api/accessor/IGuiScreen.java rename to src/main/java/baritone/utils/accessor/IGuiScreen.java index ba01e275..beb5df31 100644 --- a/src/api/java/baritone/api/accessor/IGuiScreen.java +++ b/src/main/java/baritone/utils/accessor/IGuiScreen.java @@ -15,7 +15,7 @@ * along with Baritone. If not, see . */ -package baritone.api.accessor; +package baritone.utils.accessor; import java.net.URI; diff --git a/src/main/java/baritone/utils/schematic/FillSchematic.java b/src/main/java/baritone/utils/schematic/FillSchematic.java index 3216f59f..2e67b121 100644 --- a/src/main/java/baritone/utils/schematic/FillSchematic.java +++ b/src/main/java/baritone/utils/schematic/FillSchematic.java @@ -17,7 +17,7 @@ package baritone.utils.schematic; -import baritone.api.utils.ISchematic; +import baritone.api.schematic.ISchematic; import net.minecraft.block.state.IBlockState; import java.util.List; diff --git a/src/main/java/baritone/utils/schematic/Schematic.java b/src/main/java/baritone/utils/schematic/Schematic.java index 47461e60..1169578a 100644 --- a/src/main/java/baritone/utils/schematic/Schematic.java +++ b/src/main/java/baritone/utils/schematic/Schematic.java @@ -17,7 +17,7 @@ package baritone.utils.schematic; -import baritone.api.utils.ISchematic; +import baritone.api.schematic.ISchematic; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/main/java/baritone/utils/schematic/schematica/SchematicAdapter.java b/src/main/java/baritone/utils/schematic/schematica/SchematicAdapter.java index 38279031..cd1e789f 100644 --- a/src/main/java/baritone/utils/schematic/schematica/SchematicAdapter.java +++ b/src/main/java/baritone/utils/schematic/schematica/SchematicAdapter.java @@ -17,7 +17,7 @@ package baritone.utils.schematic.schematica; -import baritone.api.utils.ISchematic; +import baritone.api.schematic.ISchematic; import com.github.lunatrius.schematica.client.world.SchematicWorld; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/baritone/utils/schematic/schematica/SchematicaHelper.java b/src/main/java/baritone/utils/schematic/schematica/SchematicaHelper.java index bacf1e9d..85b3967f 100644 --- a/src/main/java/baritone/utils/schematic/schematica/SchematicaHelper.java +++ b/src/main/java/baritone/utils/schematic/schematica/SchematicaHelper.java @@ -17,7 +17,7 @@ package baritone.utils.schematic.schematica; -import baritone.api.utils.ISchematic; +import baritone.api.schematic.ISchematic; import com.github.lunatrius.schematica.Schematica; import com.github.lunatrius.schematica.proxy.ClientProxy; import net.minecraft.util.Tuple;