a long overdue reformat of every file
This commit is contained in:
parent
a9f497981f
commit
835fb3471f
@ -20,13 +20,13 @@ package baritone.api;
|
||||
import baritone.api.behavior.ILookBehavior;
|
||||
import baritone.api.behavior.IPathingBehavior;
|
||||
import baritone.api.cache.IWorldProvider;
|
||||
import baritone.api.command.manager.ICommandManager;
|
||||
import baritone.api.event.listener.IEventBus;
|
||||
import baritone.api.pathing.calc.IPathingControlManager;
|
||||
import baritone.api.process.*;
|
||||
import baritone.api.selection.ISelectionManager;
|
||||
import baritone.api.utils.IInputOverrideHandler;
|
||||
import baritone.api.utils.IPlayerContext;
|
||||
import baritone.api.command.manager.ICommandManager;
|
||||
|
||||
/**
|
||||
* @author Brady
|
||||
|
@ -88,7 +88,7 @@ public interface IWorldScanner {
|
||||
* Queues the chunks in a square formation around the specified player, using the specified
|
||||
* range, which represents 1/2 the square's dimensions, where the player is in the center.
|
||||
*
|
||||
* @param ctx The player, describing the origin
|
||||
* @param ctx The player, describing the origin
|
||||
* @param range The range to repack
|
||||
* @return The amount of chunks successfully queued for repacking
|
||||
*/
|
||||
|
@ -34,9 +34,8 @@ import java.util.stream.Stream;
|
||||
* So basically, you should use it because it provides a small amount of boilerplate,
|
||||
* but you're not forced to use it.
|
||||
*
|
||||
* @see ICommand
|
||||
*
|
||||
* @author LoganDark
|
||||
* @see ICommand
|
||||
*/
|
||||
public abstract class Command implements ICommand {
|
||||
|
||||
|
@ -46,8 +46,8 @@ public interface IArgParserManager {
|
||||
/**
|
||||
* Attempt to parse the specified argument with a stateless {@link IArgParser} that outputs the specified class.
|
||||
*
|
||||
* @param type The type to try and parse the argument into.
|
||||
* @param arg The argument to parse.
|
||||
* @param type The type to try and parse the argument into.
|
||||
* @param arg The argument to parse.
|
||||
* @return An instance of the specified class.
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
*/
|
||||
|
@ -18,8 +18,6 @@
|
||||
package baritone.api.command.argument;
|
||||
|
||||
import baritone.api.command.ICommand;
|
||||
import baritone.api.command.exception.CommandTooManyArgumentsException;
|
||||
import baritone.api.utils.Helper;
|
||||
import baritone.api.command.argparser.IArgParser;
|
||||
import baritone.api.command.datatypes.IDatatype;
|
||||
import baritone.api.command.datatypes.IDatatypeFor;
|
||||
@ -27,6 +25,8 @@ import baritone.api.command.datatypes.IDatatypePost;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.exception.CommandNotEnoughArgumentsException;
|
||||
import baritone.api.command.exception.CommandTooManyArgumentsException;
|
||||
import baritone.api.utils.Helper;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.Deque;
|
||||
@ -223,7 +223,7 @@ public interface IArgConsumer {
|
||||
* @param type The type to peek as
|
||||
* @param index The index to peek
|
||||
* @return An instance of the specified type
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
* @see IArgParser
|
||||
* @see #peekAs(Class)
|
||||
* @see #peekAsOrDefault(Class, Object, int)
|
||||
@ -240,7 +240,7 @@ public interface IArgConsumer {
|
||||
*
|
||||
* @param type The type to peek as
|
||||
* @return An instance of the specified type
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
* @see IArgParser
|
||||
* @see #peekAs(Class, int)
|
||||
* @see #peekAsOrDefault(Class, Object)
|
||||
@ -458,7 +458,7 @@ public interface IArgConsumer {
|
||||
*
|
||||
* @param type The type to peek as
|
||||
* @return An instance of the specified type
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
* @see IArgParser
|
||||
* @see #get()
|
||||
* @see #getAsOrDefault(Class, Object)
|
||||
|
@ -87,7 +87,7 @@ public interface ICommandArgument {
|
||||
*
|
||||
* @param type The class to parse this argument into
|
||||
* @return An instance of the specified type
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
* @throws CommandInvalidTypeException If the parsing failed
|
||||
*/
|
||||
<T, S> T getAs(Class<T> type, Class<S> stateType, S state) throws CommandInvalidTypeException;
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@ -34,7 +34,7 @@ public enum EntityClassById implements IDatatypeFor<Class<? extends Entity>> {
|
||||
Class<? extends Entity> entity;
|
||||
try {
|
||||
entity = EntityList.REGISTRY.getObject(id);
|
||||
} catch(NoSuchFieldError e) {
|
||||
} catch (NoSuchFieldError e) {
|
||||
// Forge removes EntityList.REGISTRY field and provides the getClass method as a replacement
|
||||
// See https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/patches/minecraft/net/minecraft/entity/EntityList.java.patch
|
||||
try {
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.utils.BlockOptionalMeta;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.utils.BlockOptionalMeta;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.Locale;
|
||||
|
@ -20,8 +20,8 @@ package baritone.api.command.datatypes;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.cache.IWaypoint;
|
||||
import baritone.api.cache.IWaypointCollection;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -24,9 +24,8 @@ import baritone.api.command.argument.IArgConsumer;
|
||||
* Provides an {@link IDatatype} with contextual information so
|
||||
* that it can perform the desired operation on the target level.
|
||||
*
|
||||
* @see IDatatype
|
||||
*
|
||||
* @author Brady
|
||||
* @see IDatatype
|
||||
* @since 9/26/2019
|
||||
*/
|
||||
public interface IDatatypeContext {
|
||||
|
@ -34,11 +34,10 @@ public interface IDatatypeFor<T> extends IDatatype {
|
||||
* if the expected input does not conform to a parseable value. As far as a {@link CommandException} being
|
||||
* thrown is concerned, see the note below for specifics.
|
||||
*
|
||||
* @see IDatatypeContext
|
||||
*
|
||||
* @param ctx The context
|
||||
* @return The parsed data-type
|
||||
* @throws CommandException If there was an issue parsing using another type or arguments could not be polled.
|
||||
* @see IDatatypeContext
|
||||
*/
|
||||
T get(IDatatypeContext ctx) throws CommandException;
|
||||
}
|
||||
|
@ -18,8 +18,8 @@
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -18,8 +18,8 @@
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
@ -18,16 +18,13 @@
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.pathing.goals.GoalBlock;
|
||||
import baritone.api.pathing.goals.GoalXZ;
|
||||
import baritone.api.pathing.goals.GoalYLevel;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public enum RelativeGoal implements IDatatypePost<Goal, BetterBlockPos> {
|
||||
|
@ -18,9 +18,9 @@
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.pathing.goals.GoalBlock;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
@ -18,9 +18,9 @@
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.pathing.goals.GoalXZ;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
@ -18,9 +18,9 @@
|
||||
package baritone.api.command.datatypes;
|
||||
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.pathing.goals.GoalYLevel;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
@ -38,7 +38,7 @@ public class CommandUnhandledException extends RuntimeException implements IComm
|
||||
@Override
|
||||
public void handle(ICommand command, List<ICommandArgument> args) {
|
||||
HELPER.logDirect("An unhandled exception occurred. " +
|
||||
"The error is in your game's log, please report this at https://github.com/cabaletta/baritone/issues",
|
||||
"The error is in your game's log, please report this at https://github.com/cabaletta/baritone/issues",
|
||||
TextFormatting.RED);
|
||||
|
||||
this.printStackTrace();
|
||||
|
@ -38,8 +38,8 @@ import static baritone.api.utils.Helper.HELPER;
|
||||
public interface ICommandException {
|
||||
|
||||
/**
|
||||
* @see Exception#getMessage()
|
||||
* @return The exception details
|
||||
* @see Exception#getMessage()
|
||||
*/
|
||||
String getMessage();
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
package baritone.api.command.helpers;
|
||||
|
||||
import baritone.api.utils.Helper;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.utils.Helper;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
@ -19,10 +19,10 @@ package baritone.api.command.helpers;
|
||||
|
||||
import baritone.api.BaritoneAPI;
|
||||
import baritone.api.Settings;
|
||||
import baritone.api.event.events.TabCompleteEvent;
|
||||
import baritone.api.utils.SettingsUtil;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.manager.ICommandManager;
|
||||
import baritone.api.event.events.TabCompleteEvent;
|
||||
import baritone.api.utils.SettingsUtil;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.Comparator;
|
||||
@ -236,7 +236,6 @@ public class TabCompleteHelper {
|
||||
* Appends every command in the specified {@link ICommandManager} to this {@link TabCompleteHelper}
|
||||
*
|
||||
* @param manager A command manager
|
||||
*
|
||||
* @return This {@link TabCompleteHelper}
|
||||
*/
|
||||
public TabCompleteHelper addCommands(ICommandManager manager) {
|
||||
|
@ -18,7 +18,6 @@
|
||||
package baritone.api.event.events;
|
||||
|
||||
import baritone.api.event.events.type.Cancellable;
|
||||
import baritone.api.event.events.type.Overrideable;
|
||||
|
||||
/**
|
||||
* @author LoganDark
|
||||
|
@ -22,10 +22,9 @@ import net.minecraft.block.state.IBlockState;
|
||||
/**
|
||||
* A static schematic is capable of providing the desired state at a given position without
|
||||
* additional context. Schematics of this type are expected to have non-varying contents.
|
||||
*
|
||||
* @see #getDirect(int, int, int)
|
||||
*
|
||||
* @author Brady
|
||||
* @see #getDirect(int, int, int)
|
||||
* @since 12/24/2019
|
||||
*/
|
||||
public interface IStaticSchematic extends ISchematic {
|
||||
|
@ -234,11 +234,10 @@ public final class BlockOptionalMeta {
|
||||
/**
|
||||
* Evaluate the target meta value for the specified state. The target meta value is
|
||||
* most often that which is influenced by the variant/color property of the block state.
|
||||
*
|
||||
* @see #normalize(IBlockState)
|
||||
*
|
||||
*
|
||||
* @param state The state to check
|
||||
* @return The target meta of the state
|
||||
* @see #normalize(IBlockState)
|
||||
*/
|
||||
public static int stateMeta(IBlockState state) {
|
||||
return state.getBlock().getMetaFromState(normalize(state));
|
||||
|
@ -67,7 +67,7 @@ public interface Helper {
|
||||
/**
|
||||
* Send a message to display as a toast popup
|
||||
*
|
||||
* @param title The title to display in the popup
|
||||
* @param title The title to display in the popup
|
||||
* @param message The message to display in the popup
|
||||
*/
|
||||
default void logToast(ITextComponent title, ITextComponent message) {
|
||||
@ -77,7 +77,7 @@ public interface Helper {
|
||||
/**
|
||||
* Send a message to display as a toast popup
|
||||
*
|
||||
* @param title The title to display in the popup
|
||||
* @param title The title to display in the popup
|
||||
* @param message The message to display in the popup
|
||||
*/
|
||||
default void logToast(String title, String message) {
|
||||
@ -144,8 +144,8 @@ public interface Helper {
|
||||
* Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a
|
||||
* direct response to a chat command)
|
||||
*
|
||||
* @param message The message to display in chat
|
||||
* @param color The color to print that message in
|
||||
* @param message The message to display in chat
|
||||
* @param color The color to print that message in
|
||||
* @param logAsToast Whether to log as a toast notification
|
||||
*/
|
||||
default void logDirect(String message, TextFormatting color, boolean logAsToast) {
|
||||
@ -171,7 +171,7 @@ public interface Helper {
|
||||
* Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a
|
||||
* direct response to a chat command)
|
||||
*
|
||||
* @param message The message to display in chat
|
||||
* @param message The message to display in chat
|
||||
* @param logAsToast Whether to log as a toast notification
|
||||
*/
|
||||
default void logDirect(String message, boolean logAsToast) {
|
||||
|
@ -20,7 +20,6 @@ package baritone.api.utils;
|
||||
import baritone.api.cache.IWorldData;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
@ -25,11 +25,11 @@ import baritone.api.utils.Helper;
|
||||
import baritone.api.utils.IPlayerContext;
|
||||
import baritone.behavior.*;
|
||||
import baritone.cache.WorldProvider;
|
||||
import baritone.command.manager.CommandManager;
|
||||
import baritone.event.GameEventHandler;
|
||||
import baritone.process.*;
|
||||
import baritone.selection.SelectionManager;
|
||||
import baritone.utils.*;
|
||||
import baritone.command.manager.CommandManager;
|
||||
import baritone.utils.player.PrimaryPlayerContext;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
|
@ -22,9 +22,9 @@ import baritone.api.IBaritoneProvider;
|
||||
import baritone.api.cache.IWorldScanner;
|
||||
import baritone.api.command.ICommandSystem;
|
||||
import baritone.api.schematic.ISchematicSystem;
|
||||
import baritone.command.ExampleBaritoneControl;
|
||||
import baritone.cache.WorldScanner;
|
||||
import baritone.command.CommandSystem;
|
||||
import baritone.command.ExampleBaritoneControl;
|
||||
import baritone.utils.schematic.SchematicSystem;
|
||||
|
||||
import java.util.Collections;
|
||||
|
@ -18,4 +18,4 @@
|
||||
package baritone;
|
||||
|
||||
// Annotation for classes and class members that should not be renamed by proguard
|
||||
public @interface KeepName { }
|
||||
public @interface KeepName {}
|
||||
|
@ -18,8 +18,8 @@
|
||||
package baritone.command;
|
||||
|
||||
import baritone.api.command.ICommandSystem;
|
||||
import baritone.command.argparser.ArgParserManager;
|
||||
import baritone.api.command.argparser.IArgParserManager;
|
||||
import baritone.command.argparser.ArgParserManager;
|
||||
|
||||
/**
|
||||
* @author Brady
|
||||
|
@ -20,20 +20,20 @@ package baritone.command;
|
||||
import baritone.api.BaritoneAPI;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.Settings;
|
||||
import baritone.utils.accessor.IGuiScreen;
|
||||
import baritone.api.command.argument.ICommandArgument;
|
||||
import baritone.api.command.exception.CommandNotEnoughArgumentsException;
|
||||
import baritone.api.command.exception.CommandNotFoundException;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.manager.ICommandManager;
|
||||
import baritone.api.event.events.ChatEvent;
|
||||
import baritone.api.event.events.TabCompleteEvent;
|
||||
import baritone.api.event.listener.AbstractGameEventListener;
|
||||
import baritone.api.utils.Helper;
|
||||
import baritone.api.utils.SettingsUtil;
|
||||
import baritone.api.command.argument.ICommandArgument;
|
||||
import baritone.api.command.exception.CommandNotEnoughArgumentsException;
|
||||
import baritone.api.command.exception.CommandNotFoundException;
|
||||
import baritone.command.argument.ArgConsumer;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.manager.ICommandManager;
|
||||
import baritone.command.argument.CommandArguments;
|
||||
import baritone.command.manager.CommandManager;
|
||||
import baritone.utils.accessor.IGuiScreen;
|
||||
import net.minecraft.util.Tuple;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
@ -18,6 +18,7 @@
|
||||
package baritone.command.argument;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.argument.ICommandArgument;
|
||||
import baritone.api.command.datatypes.IDatatype;
|
||||
import baritone.api.command.datatypes.IDatatypeContext;
|
||||
@ -27,7 +28,6 @@ import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.exception.CommandNotEnoughArgumentsException;
|
||||
import baritone.api.command.exception.CommandTooManyArgumentsException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.manager.ICommandManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
package baritone.command.argument;
|
||||
|
||||
import baritone.command.argparser.ArgParserManager;
|
||||
import baritone.api.command.argument.ICommandArgument;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.command.argparser.ArgParserManager;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
@ -48,9 +48,9 @@ public final class CommandArguments {
|
||||
int lastEnd = -1;
|
||||
while (argMatcher.find()) {
|
||||
args.add(new CommandArgument(
|
||||
args.size(),
|
||||
argMatcher.group(),
|
||||
string.substring(argMatcher.start())
|
||||
args.size(),
|
||||
argMatcher.group(),
|
||||
string.substring(argMatcher.start())
|
||||
));
|
||||
lastEnd = argMatcher.end();
|
||||
}
|
||||
|
@ -18,11 +18,11 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.pathing.goals.GoalAxis;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -18,11 +18,11 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.process.IGetToBlockProcess;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.process.IGetToBlockProcess;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,11 +19,11 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.cache.IRememberedInventory;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
@ -19,8 +19,8 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -18,11 +18,11 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.pathing.goals.GoalBlock;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.pathing.goals.GoalBlock;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
@ -18,11 +18,11 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.pathing.goals.GoalXZ;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.RelativeGoalXZ;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.pathing.goals.GoalXZ;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,11 +19,11 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.RelativeFile;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -20,21 +20,16 @@ package baritone.command.defaults;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.cache.IWaypoint;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.ForWaypoints;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.helpers.Paginator;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.pathing.goals.GoalBlock;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static baritone.api.command.IBaritoneChatControl.FORCE_COMMAND_PREFIX;
|
||||
|
||||
public class FarmCommand extends Command {
|
||||
|
||||
public FarmCommand(IBaritone baritone) {
|
||||
@ -51,7 +46,7 @@ public class FarmCommand extends Command {
|
||||
range = args.getAs(Integer.class);
|
||||
}
|
||||
//waypoint
|
||||
if (args.has(1)){
|
||||
if (args.has(1)) {
|
||||
IWaypoint[] waypoints = args.getDatatypeFor(ForWaypoints.INSTANCE);
|
||||
IWaypoint waypoint = null;
|
||||
switch (waypoints.length) {
|
||||
|
@ -18,11 +18,11 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.BlockById;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -20,11 +20,11 @@ package baritone.command.defaults;
|
||||
import baritone.KeepName;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.EntityClassById;
|
||||
import baritone.api.command.datatypes.IDatatypeFor;
|
||||
import baritone.api.command.datatypes.NearbyPlayer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
|
@ -20,8 +20,8 @@ package baritone.command.defaults;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.behavior.IPathingBehavior;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,8 +19,8 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -18,15 +18,15 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.process.ICustomGoalProcess;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.RelativeCoordinate;
|
||||
import baritone.api.command.datatypes.RelativeGoal;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.process.ICustomGoalProcess;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,12 +19,12 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.BlockById;
|
||||
import baritone.api.command.datatypes.ForBlockOptionalMeta;
|
||||
import baritone.api.command.datatypes.RelativeCoordinate;
|
||||
import baritone.api.command.datatypes.RelativeGoal;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.utils.BlockOptionalMeta;
|
||||
|
@ -20,9 +20,9 @@ package baritone.command.defaults;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.ICommand;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandNotFoundException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.helpers.Paginator;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
@ -18,13 +18,13 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.pathing.goals.GoalInverted;
|
||||
import baritone.api.process.ICustomGoalProcess;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -18,12 +18,12 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.utils.BlockOptionalMeta;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.BlockById;
|
||||
import baritone.api.command.datatypes.ForBlockOptionalMeta;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.utils.BlockOptionalMeta;
|
||||
import baritone.cache.WorldScanner;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -19,8 +19,8 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.process.ICustomGoalProcess;
|
||||
import baritone.cache.WorldScanner;
|
||||
|
||||
|
@ -18,13 +18,13 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.pathing.calc.IPathingControlManager;
|
||||
import baritone.api.process.IBaritoneProcess;
|
||||
import baritone.api.process.PathingCommand;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,8 +19,8 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -18,10 +18,10 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,8 +19,8 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.cache.WorldScanner;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -19,8 +19,8 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,8 +19,8 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -19,6 +19,15 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.Baritone;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.ForBlockOptionalMeta;
|
||||
import baritone.api.command.datatypes.ForEnumFacing;
|
||||
import baritone.api.command.datatypes.RelativeBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.event.events.RenderEvent;
|
||||
import baritone.api.event.listener.AbstractGameEventListener;
|
||||
import baritone.api.schematic.*;
|
||||
@ -27,16 +36,6 @@ import baritone.api.selection.ISelectionManager;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.utils.BlockOptionalMeta;
|
||||
import baritone.api.utils.BlockOptionalMetaLookup;
|
||||
import baritone.api.schematic.ISchematic;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.datatypes.ForBlockOptionalMeta;
|
||||
import baritone.api.command.datatypes.ForEnumFacing;
|
||||
import baritone.api.command.datatypes.RelativeBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.utils.IRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -20,13 +20,13 @@ package baritone.command.defaults;
|
||||
import baritone.Baritone;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.Settings;
|
||||
import baritone.api.utils.SettingsUtil;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.helpers.Paginator;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.utils.SettingsUtil;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
@ -39,9 +39,9 @@ import java.util.Locale;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static baritone.api.command.IBaritoneChatControl.FORCE_COMMAND_PREFIX;
|
||||
import static baritone.api.utils.SettingsUtil.settingTypeToString;
|
||||
import static baritone.api.utils.SettingsUtil.settingValueToString;
|
||||
import static baritone.api.command.IBaritoneChatControl.FORCE_COMMAND_PREFIX;
|
||||
|
||||
public class SetCommand extends Command {
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.pathing.goals.GoalXZ;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.pathing.goals.GoalXZ;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -77,7 +77,7 @@ public class TunnelCommand extends Command {
|
||||
default:
|
||||
throw new IllegalStateException("Unexpected value: " + enumFacing);
|
||||
}
|
||||
logDirect(String.format("Creating a tunnel %s block(s) high, %s block(s) wide, and %s block(s) deep", height+1, width+1, depth));
|
||||
logDirect(String.format("Creating a tunnel %s block(s) high, %s block(s) wide, and %s block(s) deep", height + 1, width + 1, depth));
|
||||
baritone.getBuilderProcess().clearArea(corner1, corner2);
|
||||
}
|
||||
} else {
|
||||
|
@ -19,9 +19,9 @@ package baritone.command.defaults;
|
||||
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -20,18 +20,18 @@ package baritone.command.defaults;
|
||||
import baritone.api.IBaritone;
|
||||
import baritone.api.cache.IWaypoint;
|
||||
import baritone.api.cache.Waypoint;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.pathing.goals.GoalBlock;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.command.Command;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.datatypes.ForWaypoints;
|
||||
import baritone.api.command.datatypes.RelativeBlockPos;
|
||||
import baritone.api.command.exception.CommandException;
|
||||
import baritone.api.command.exception.CommandInvalidStateException;
|
||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
||||
import baritone.api.command.argument.IArgConsumer;
|
||||
import baritone.api.command.helpers.Paginator;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.pathing.goals.GoalBlock;
|
||||
import baritone.api.utils.BetterBlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
@ -23,10 +23,10 @@ import baritone.api.command.ICommand;
|
||||
import baritone.api.command.argument.ICommandArgument;
|
||||
import baritone.api.command.exception.CommandUnhandledException;
|
||||
import baritone.api.command.exception.ICommandException;
|
||||
import baritone.command.argument.ArgConsumer;
|
||||
import baritone.api.command.helpers.TabCompleteHelper;
|
||||
import baritone.api.command.manager.ICommandManager;
|
||||
import baritone.api.command.registry.Registry;
|
||||
import baritone.command.argument.ArgConsumer;
|
||||
import baritone.command.argument.CommandArguments;
|
||||
import baritone.command.defaults.DefaultCommands;
|
||||
import net.minecraft.util.Tuple;
|
||||
|
@ -25,8 +25,8 @@ import baritone.api.utils.BetterBlockPos;
|
||||
import baritone.api.utils.Helper;
|
||||
import baritone.api.utils.PathCalculationResult;
|
||||
import baritone.pathing.movement.CalculationContext;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
import baritone.utils.NotificationHelper;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
@ -562,6 +562,7 @@ public interface MovementHelper extends ActionCosts, Helper {
|
||||
enum PlaceResult {
|
||||
READY_TO_PLACE, ATTEMPTING, NO_OPTION;
|
||||
}
|
||||
|
||||
static boolean isTransparent(Block b) {
|
||||
|
||||
return b == Blocks.AIR ||
|
||||
|
@ -67,24 +67,24 @@ public class MovementDiagonal extends Movement {
|
||||
double y = player.posY - 1;
|
||||
double z = player.posZ;
|
||||
//standard
|
||||
if (ctx.playerFeet().equals(src)){
|
||||
if (ctx.playerFeet().equals(src)) {
|
||||
return true;
|
||||
}
|
||||
//both corners are walkable
|
||||
if (MovementHelper.canWalkOn(ctx, new BlockPos(src.x, src.y - 1, dest.z))
|
||||
&& MovementHelper.canWalkOn(ctx, new BlockPos(dest.x, src.y - 1, src.z))){
|
||||
return true;
|
||||
&& MovementHelper.canWalkOn(ctx, new BlockPos(dest.x, src.y - 1, src.z))) {
|
||||
return true;
|
||||
}
|
||||
//we are in a likely unwalkable corner, check for a supporting block
|
||||
if (ctx.playerFeet().equals(new BetterBlockPos(src.x, src.y, dest.z))
|
||||
|| ctx.playerFeet().equals(new BetterBlockPos(dest.x, src.y, src.z))){
|
||||
return (MovementHelper.canWalkOn(ctx, new BetterBlockPos(x + offset, y, z + offset))
|
||||
|| MovementHelper.canWalkOn(ctx, new BetterBlockPos(x + offset, y, z - offset))
|
||||
|| MovementHelper.canWalkOn(ctx, new BetterBlockPos(x - offset, y, z + offset))
|
||||
|| MovementHelper.canWalkOn(ctx, new BetterBlockPos(x - offset, y, z - offset)));
|
||||
|| ctx.playerFeet().equals(new BetterBlockPos(dest.x, src.y, src.z))) {
|
||||
return (MovementHelper.canWalkOn(ctx, new BetterBlockPos(x + offset, y, z + offset))
|
||||
|| MovementHelper.canWalkOn(ctx, new BetterBlockPos(x + offset, y, z - offset))
|
||||
|| MovementHelper.canWalkOn(ctx, new BetterBlockPos(x - offset, y, z + offset))
|
||||
|| MovementHelper.canWalkOn(ctx, new BetterBlockPos(x - offset, y, z - offset)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double calculateCost(CalculationContext context) {
|
||||
|
@ -637,14 +637,14 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
if (logMissing && !missing.isEmpty()) {
|
||||
logDirect("Missing materials for at least:");
|
||||
logDirect(missing.entrySet().stream()
|
||||
.map(e -> String.format("%sx %s", e.getValue(), e.getKey()))
|
||||
.collect(Collectors.joining("\n")));
|
||||
.map(e -> String.format("%sx %s", e.getValue(), e.getKey()))
|
||||
.collect(Collectors.joining("\n")));
|
||||
}
|
||||
if (logMissing && !flowingLiquids.isEmpty()) {
|
||||
logDirect("Unreplaceable liquids at at least:");
|
||||
logDirect(flowingLiquids.stream()
|
||||
.map(p -> String.format("%s %s %s", p.x, p.y, p.z))
|
||||
.collect(Collectors.joining("\n")));
|
||||
.map(p -> String.format("%s %s %s", p.x, p.y, p.z))
|
||||
.collect(Collectors.joining("\n")));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ public enum DefaultSchematicFormats implements ISchematicFormat {
|
||||
* The MCEdit schematic specification. Commonly denoted by the ".schematic" file extension.
|
||||
*/
|
||||
MCEDIT("schematic") {
|
||||
|
||||
@Override
|
||||
public IStaticSchematic parse(InputStream input) throws IOException {
|
||||
return new MCEditSchematic(CompressedStreamTools.readCompressed(input));
|
||||
@ -54,7 +53,6 @@ public enum DefaultSchematicFormats implements ISchematicFormat {
|
||||
* @see <a href="https://github.com/SpongePowered/Schematic-Specification">Sponge Schematic Specification</a>
|
||||
*/
|
||||
SPONGE("schem") {
|
||||
|
||||
@Override
|
||||
public IStaticSchematic parse(InputStream input) throws IOException {
|
||||
NBTTagCompound nbt = CompressedStreamTools.readCompressed(input);
|
||||
|
Loading…
Reference in New Issue
Block a user