diff --git a/src/api/java/baritone/api/cache/IWaypoint.java b/src/api/java/baritone/api/cache/IWaypoint.java index 4c086ba2..ff235099 100644 --- a/src/api/java/baritone/api/cache/IWaypoint.java +++ b/src/api/java/baritone/api/cache/IWaypoint.java @@ -21,8 +21,6 @@ import baritone.api.utils.BetterBlockPos; import java.util.*; -import static java.util.Arrays.asList; - /** * A marker for a position in the world. * @@ -129,7 +127,7 @@ public interface IWaypoint { Set names = new HashSet<>(); for (Tag tag : Tag.values()) { - names.addAll(asList(tag.names)); + names.addAll(Arrays.asList(tag.names)); } return names.toArray(new String[0]); diff --git a/src/api/java/baritone/api/utils/BlockOptionalMetaLookup.java b/src/api/java/baritone/api/utils/BlockOptionalMetaLookup.java index a5f7d626..705800b8 100644 --- a/src/api/java/baritone/api/utils/BlockOptionalMetaLookup.java +++ b/src/api/java/baritone/api/utils/BlockOptionalMetaLookup.java @@ -24,8 +24,6 @@ import net.minecraft.item.ItemStack; import java.util.Arrays; import java.util.List; -import static java.util.Arrays.asList; - public class BlockOptionalMetaLookup { private final BlockOptionalMeta[] boms; @@ -83,7 +81,7 @@ public class BlockOptionalMetaLookup { } public List blocks() { - return asList(boms); + return Arrays.asList(boms); } @Override diff --git a/src/api/java/baritone/api/utils/Helper.java b/src/api/java/baritone/api/utils/Helper.java index 87884cd2..8ef0d29e 100755 --- a/src/api/java/baritone/api/utils/Helper.java +++ b/src/api/java/baritone/api/utils/Helper.java @@ -25,8 +25,6 @@ import net.minecraft.util.text.TextFormatting; import java.util.Arrays; -import static java.util.Arrays.asList; - /** * @author Brady * @since 8/1/2018 @@ -75,7 +73,7 @@ public interface Helper { ITextComponent component = new TextComponentString(""); component.appendSibling(getPrefix()); component.appendSibling(new TextComponentString(" ")); - asList(components).forEach(component::appendSibling); + Arrays.asList(components).forEach(component::appendSibling); Minecraft.getMinecraft().addScheduledTask(() -> BaritoneAPI.getSettings().logger.value.accept(component)); } diff --git a/src/api/java/baritone/api/utils/command/argparser/DefaultArgParsers.java b/src/api/java/baritone/api/utils/command/argparser/DefaultArgParsers.java index 743380e7..f45f7faf 100644 --- a/src/api/java/baritone/api/utils/command/argparser/DefaultArgParsers.java +++ b/src/api/java/baritone/api/utils/command/argparser/DefaultArgParsers.java @@ -19,11 +19,10 @@ package baritone.api.utils.command.argparser; import baritone.api.utils.command.argument.CommandArgument; +import java.util.Arrays; import java.util.List; import java.util.Locale; -import static java.util.Arrays.asList; - public class DefaultArgParsers { public static class IntArgumentParser extends ArgParser implements IArgParser.Stateless { @@ -93,8 +92,8 @@ public class DefaultArgParsers { public static class BooleanArgumentParser extends ArgParser implements IArgParser.Stateless { public static final BooleanArgumentParser INSTANCE = new BooleanArgumentParser(); - public static final List TRUTHY_VALUES = asList("1", "true", "yes", "t", "y", "on", "enable"); - public static final List FALSY_VALUES = asList("0", "false", "no", "f", "n", "off", "disable"); + public static final List TRUTHY_VALUES = Arrays.asList("1", "true", "yes", "t", "y", "on", "enable"); + public static final List FALSY_VALUES = Arrays.asList("0", "false", "no", "f", "n", "off", "disable"); public BooleanArgumentParser() { super(Boolean.class); @@ -113,7 +112,7 @@ public class DefaultArgParsers { } } - public static final List> ALL = asList( + public static final List> ALL = Arrays.asList( IntArgumentParser.INSTANCE, LongArgumentParser.INSTANCE, FloatArgumentParser.INSTANCE, diff --git a/src/api/java/baritone/api/utils/command/exception/CommandUnhandledException.java b/src/api/java/baritone/api/utils/command/exception/CommandUnhandledException.java index 178fb721..b3cf1819 100644 --- a/src/api/java/baritone/api/utils/command/exception/CommandUnhandledException.java +++ b/src/api/java/baritone/api/utils/command/exception/CommandUnhandledException.java @@ -23,8 +23,6 @@ import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; -import static java.util.Arrays.asList; - public class CommandUnhandledException extends CommandErrorMessageException { public static String getStackTrace(Throwable throwable) { @@ -50,7 +48,7 @@ public class CommandUnhandledException extends CommandErrorMessageException { } public static String getFriendlierStackTrace(String stackTrace) { - List lines = asList(stackTrace.split("\n")); + List lines = Arrays.asList(stackTrace.split("\n")); for (int i = 0; i < lines.size(); i++) { String line = lines.get(i); if (line.startsWith("\tat ")) { diff --git a/src/api/java/baritone/api/utils/command/helpers/pagination/Paginator.java b/src/api/java/baritone/api/utils/command/helpers/pagination/Paginator.java index 05016d63..c143d507 100644 --- a/src/api/java/baritone/api/utils/command/helpers/pagination/Paginator.java +++ b/src/api/java/baritone/api/utils/command/helpers/pagination/Paginator.java @@ -26,11 +26,10 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; +import java.util.Arrays; import java.util.List; import java.util.function.Function; -import static java.util.Arrays.asList; - public class Paginator implements Helper { public final List entries; @@ -42,7 +41,7 @@ public class Paginator implements Helper { } public Paginator(E... entries) { - this.entries = asList(entries); + this.entries = Arrays.asList(entries); } public Paginator setPageSize(int pageSize) { @@ -143,7 +142,7 @@ public class Paginator implements Helper { } public static void paginate(ArgConsumer consumer, T[] elems, Runnable pre, Function transform, String commandPrefix) { - paginate(consumer, asList(elems), pre, transform, commandPrefix); + paginate(consumer, Arrays.asList(elems), pre, transform, commandPrefix); } public static void paginate(ArgConsumer consumer, Paginator pagi, Function transform, String commandPrefix) { @@ -155,7 +154,7 @@ public class Paginator implements Helper { } public static void paginate(ArgConsumer consumer, T[] elems, Function transform, String commandPrefix) { - paginate(consumer, asList(elems), null, transform, commandPrefix); + paginate(consumer, Arrays.asList(elems), null, transform, commandPrefix); } public static void paginate(ArgConsumer consumer, Paginator pagi, Runnable pre, Function transform) { @@ -167,7 +166,7 @@ public class Paginator implements Helper { } public static void paginate(ArgConsumer consumer, T[] elems, Runnable pre, Function transform) { - paginate(consumer, asList(elems), pre, transform, null); + paginate(consumer, Arrays.asList(elems), pre, transform, null); } public static void paginate(ArgConsumer consumer, Paginator pagi, Function transform) { @@ -179,6 +178,6 @@ public class Paginator implements Helper { } public static void paginate(ArgConsumer consumer, T[] elems, Function transform) { - paginate(consumer, asList(elems), null, transform, null); + paginate(consumer, Arrays.asList(elems), null, transform, null); } } diff --git a/src/main/java/baritone/utils/command/defaults/AxisCommand.java b/src/main/java/baritone/utils/command/defaults/AxisCommand.java index dd9d5a83..322fa696 100644 --- a/src/main/java/baritone/utils/command/defaults/AxisCommand.java +++ b/src/main/java/baritone/utils/command/defaults/AxisCommand.java @@ -24,15 +24,14 @@ import baritone.api.pathing.goals.GoalAxis; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class AxisCommand extends Command { public AxisCommand(IBaritone baritone) { - super(baritone, asList("axis", "highway")); + super(baritone, Arrays.asList("axis", "highway")); } @Override @@ -55,7 +54,7 @@ public class AxisCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The axis command sets a goal that tells Baritone to head towards the nearest axis. That is, X=0 or Z=0.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/BlacklistCommand.java b/src/main/java/baritone/utils/command/defaults/BlacklistCommand.java index aad23f21..8264a648 100644 --- a/src/main/java/baritone/utils/command/defaults/BlacklistCommand.java +++ b/src/main/java/baritone/utils/command/defaults/BlacklistCommand.java @@ -24,11 +24,10 @@ import baritone.api.utils.command.Command; import baritone.api.utils.command.exception.CommandInvalidStateException; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class BlacklistCommand extends Command { public BlacklistCommand(IBaritone baritone) { @@ -61,7 +60,7 @@ public class BlacklistCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "While, for example, mining, this command blacklists the closest block so that Baritone won't attempt to get to it.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/BuildCommand.java b/src/main/java/baritone/utils/command/defaults/BuildCommand.java index 146faf0f..09cb2437 100644 --- a/src/main/java/baritone/utils/command/defaults/BuildCommand.java +++ b/src/main/java/baritone/utils/command/defaults/BuildCommand.java @@ -28,12 +28,11 @@ import baritone.api.utils.command.helpers.arguments.ArgConsumer; import net.minecraft.client.Minecraft; import java.io.File; +import java.util.Arrays; import java.util.List; import java.util.Locale; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class BuildCommand extends Command { private static final File schematicsDir = new File(Minecraft.getMinecraft().gameDir, "schematics"); @@ -82,7 +81,7 @@ public class BuildCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Build a schematic from a file.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/CancelCommand.java b/src/main/java/baritone/utils/command/defaults/CancelCommand.java index 742e2aaf..42025c9a 100644 --- a/src/main/java/baritone/utils/command/defaults/CancelCommand.java +++ b/src/main/java/baritone/utils/command/defaults/CancelCommand.java @@ -22,15 +22,14 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class CancelCommand extends Command { public CancelCommand(IBaritone baritone) { - super(baritone, asList("cancel", "stop")); + super(baritone, Arrays.asList("cancel", "stop")); } @Override @@ -52,7 +51,7 @@ public class CancelCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The cancel command tells Baritons to stop whatever it's currently doing.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ChestsCommand.java b/src/main/java/baritone/utils/command/defaults/ChestsCommand.java index 7965745d..bde736e9 100644 --- a/src/main/java/baritone/utils/command/defaults/ChestsCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ChestsCommand.java @@ -28,13 +28,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ChestsCommand extends Command { public ChestsCommand(IBaritone baritone) { @@ -74,7 +73,7 @@ public class ChestsCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The chests command lists remembered inventories, I guess?", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ClearareaCommand.java b/src/main/java/baritone/utils/command/defaults/ClearareaCommand.java index 7a73be42..17fa2863 100644 --- a/src/main/java/baritone/utils/command/defaults/ClearareaCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ClearareaCommand.java @@ -27,11 +27,10 @@ import baritone.api.utils.command.datatypes.RelativeBlockPos; import baritone.api.utils.command.exception.CommandInvalidStateException; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ClearareaCommand extends Command { public ClearareaCommand(IBaritone baritone) { @@ -70,7 +69,7 @@ public class ClearareaCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Clear an area of all blocks.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ClickCommand.java b/src/main/java/baritone/utils/command/defaults/ClickCommand.java index 126f64f6..c09fd8b0 100644 --- a/src/main/java/baritone/utils/command/defaults/ClickCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ClickCommand.java @@ -22,11 +22,10 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ClickCommand extends Command { public ClickCommand(IBaritone baritone) { @@ -52,7 +51,7 @@ public class ClickCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Opens click dude", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ComeCommand.java b/src/main/java/baritone/utils/command/defaults/ComeCommand.java index e6b1431a..be99cf63 100644 --- a/src/main/java/baritone/utils/command/defaults/ComeCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ComeCommand.java @@ -26,11 +26,10 @@ import baritone.api.utils.command.helpers.arguments.ArgConsumer; import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ComeCommand extends Command { public ComeCommand(IBaritone baritone) { @@ -60,7 +59,7 @@ public class ComeCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The come command tells Baritone to head towards your camera.", "", "This can be useful in hacked clients where freecam doesn't move your player position.", diff --git a/src/main/java/baritone/utils/command/defaults/DefaultCommands.java b/src/main/java/baritone/utils/command/defaults/DefaultCommands.java index 611ae063..1245cef8 100644 --- a/src/main/java/baritone/utils/command/defaults/DefaultCommands.java +++ b/src/main/java/baritone/utils/command/defaults/DefaultCommands.java @@ -22,8 +22,6 @@ import baritone.api.utils.command.Command; import java.util.*; -import static java.util.Arrays.asList; - public class DefaultCommands { public static List commands(IBaritone baritone) { @@ -32,7 +30,7 @@ public class DefaultCommands { commands.addAll(Arrays.asList( new HelpCommand(baritone), new SetCommand(baritone), - new CommandAlias(baritone, asList("modified", "mod", "baritone", "modifiedsettings"), "List modified settings", "set modified"), + new CommandAlias(baritone, Arrays.asList("modified", "mod", "baritone", "modifiedsettings"), "List modified settings", "set modified"), new CommandAlias(baritone, "reset", "Reset all settings or just one", "set reset"), new GoalCommand(baritone), new PathCommand(baritone), diff --git a/src/main/java/baritone/utils/command/defaults/EmptyCommand.java b/src/main/java/baritone/utils/command/defaults/EmptyCommand.java index cc45e800..e673c0d2 100644 --- a/src/main/java/baritone/utils/command/defaults/EmptyCommand.java +++ b/src/main/java/baritone/utils/command/defaults/EmptyCommand.java @@ -22,15 +22,14 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class EmptyCommand extends Command { public EmptyCommand(IBaritone baritone) { - super(baritone, asList("name1", "name2")); + super(baritone, Arrays.asList("name1", "name2")); } @Override @@ -50,7 +49,7 @@ public class EmptyCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ExploreCommand.java b/src/main/java/baritone/utils/command/defaults/ExploreCommand.java index 9f5beb19..86f975b7 100644 --- a/src/main/java/baritone/utils/command/defaults/ExploreCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ExploreCommand.java @@ -24,11 +24,10 @@ import baritone.api.utils.command.Command; import baritone.api.utils.command.datatypes.RelativeGoalXZ; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ExploreCommand extends Command { public ExploreCommand(IBaritone baritone) { @@ -64,7 +63,7 @@ public class ExploreCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Tell Baritone to explore randomly. If you used explorefilter before this, it will be applied.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java b/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java index 64c6335e..815dc8ac 100644 --- a/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java @@ -28,11 +28,10 @@ import com.google.gson.JsonSyntaxException; import java.io.File; import java.nio.file.NoSuchFileException; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ExploreFilterCommand extends Command { public ExploreFilterCommand(IBaritone baritone) { @@ -78,7 +77,7 @@ public class ExploreFilterCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Apply an explore filter before using explore, which tells the explore process which chunks have been explored/not explored.", "", "The JSON file will follow this format: [{\"x\":0,\"z\":0},...]", diff --git a/src/main/java/baritone/utils/command/defaults/FarmCommand.java b/src/main/java/baritone/utils/command/defaults/FarmCommand.java index ee699490..62db521d 100644 --- a/src/main/java/baritone/utils/command/defaults/FarmCommand.java +++ b/src/main/java/baritone/utils/command/defaults/FarmCommand.java @@ -22,11 +22,10 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class FarmCommand extends Command { public FarmCommand(IBaritone baritone) { @@ -52,7 +51,7 @@ public class FarmCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The farm command starts farming nearby plants. It harvests mature crops and plants new ones.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/FindCommand.java b/src/main/java/baritone/utils/command/defaults/FindCommand.java index 61d03dd8..2f36ec01 100644 --- a/src/main/java/baritone/utils/command/defaults/FindCommand.java +++ b/src/main/java/baritone/utils/command/defaults/FindCommand.java @@ -26,11 +26,10 @@ import baritone.api.utils.command.helpers.arguments.ArgConsumer; import net.minecraft.block.Block; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class FindCommand extends Command { public FindCommand(IBaritone baritone) { @@ -71,7 +70,7 @@ public class FindCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/FollowCommand.java b/src/main/java/baritone/utils/command/defaults/FollowCommand.java index 5424fd14..8240be2e 100644 --- a/src/main/java/baritone/utils/command/defaults/FollowCommand.java +++ b/src/main/java/baritone/utils/command/defaults/FollowCommand.java @@ -32,15 +32,10 @@ import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Objects; +import java.util.*; import java.util.function.Predicate; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class FollowCommand extends Command { public FollowCommand(IBaritone baritone) { @@ -126,7 +121,7 @@ public class FollowCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The follow command tells Baritone to follow certain kinds of entities.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ForceCancelCommand.java b/src/main/java/baritone/utils/command/defaults/ForceCancelCommand.java index 09d2065f..6c6c740c 100644 --- a/src/main/java/baritone/utils/command/defaults/ForceCancelCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ForceCancelCommand.java @@ -23,11 +23,10 @@ import baritone.api.behavior.IPathingBehavior; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ForceCancelCommand extends Command { public ForceCancelCommand(IBaritone baritone) { @@ -55,7 +54,7 @@ public class ForceCancelCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Like cancel, but more forceful.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/GcCommand.java b/src/main/java/baritone/utils/command/defaults/GcCommand.java index 6bf1355a..a0acf98f 100644 --- a/src/main/java/baritone/utils/command/defaults/GcCommand.java +++ b/src/main/java/baritone/utils/command/defaults/GcCommand.java @@ -22,11 +22,10 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class GcCommand extends Command { public GcCommand(IBaritone baritone) { @@ -52,7 +51,7 @@ public class GcCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Calls System.gc().", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/GoalCommand.java b/src/main/java/baritone/utils/command/defaults/GoalCommand.java index c793182a..e3da6330 100644 --- a/src/main/java/baritone/utils/command/defaults/GoalCommand.java +++ b/src/main/java/baritone/utils/command/defaults/GoalCommand.java @@ -28,11 +28,10 @@ import baritone.api.utils.command.datatypes.RelativeGoal; import baritone.api.utils.command.helpers.arguments.ArgConsumer; import baritone.api.utils.command.helpers.tabcomplete.TabCompleteHelper; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class GoalCommand extends Command { public GoalCommand(IBaritone baritone) { @@ -42,7 +41,7 @@ public class GoalCommand extends Command { @Override protected void executed(String label, ArgConsumer args, Settings settings) { ICustomGoalProcess goalProcess = baritone.getCustomGoalProcess(); - if (args.has() && asList("reset", "clear", "none").contains(args.peekString())) { + if (args.has() && Arrays.asList("reset", "clear", "none").contains(args.peekString())) { args.requireMax(1); if (goalProcess.getGoal() != null) { goalProcess.setGoal(null); @@ -87,7 +86,7 @@ public class GoalCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The goal command allows you to set or clear Baritone's goal.", "", "Wherever a coordinate is expected, you can use ~ just like in regular Minecraft commands. Or, you can just use regular numbers.", diff --git a/src/main/java/baritone/utils/command/defaults/HelpCommand.java b/src/main/java/baritone/utils/command/defaults/HelpCommand.java index b41e5d28..716e72ea 100644 --- a/src/main/java/baritone/utils/command/defaults/HelpCommand.java +++ b/src/main/java/baritone/utils/command/defaults/HelpCommand.java @@ -31,18 +31,18 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; +import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import static baritone.api.utils.command.BaritoneChatControl.FORCE_COMMAND_PREFIX; import static baritone.api.utils.command.manager.CommandManager.getCommand; -import static java.util.Arrays.asList; public class HelpCommand extends Command { public HelpCommand(IBaritone baritone) { - super(baritone, asList("help", "?")); + super(baritone, Arrays.asList("help", "?")); } @Override @@ -113,7 +113,7 @@ public class HelpCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Using this command, you can view detailed help information on how to use certain commands of Baritone.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/InvertCommand.java b/src/main/java/baritone/utils/command/defaults/InvertCommand.java index e7c8ef8f..bc8e1765 100644 --- a/src/main/java/baritone/utils/command/defaults/InvertCommand.java +++ b/src/main/java/baritone/utils/command/defaults/InvertCommand.java @@ -26,11 +26,10 @@ import baritone.api.utils.command.Command; import baritone.api.utils.command.exception.CommandInvalidStateException; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class InvertCommand extends Command { public InvertCommand(IBaritone baritone) { @@ -66,7 +65,7 @@ public class InvertCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The invert command tells Baritone to head away from the current goal rather than towards it.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/MineCommand.java b/src/main/java/baritone/utils/command/defaults/MineCommand.java index 1dcc962a..d9328984 100644 --- a/src/main/java/baritone/utils/command/defaults/MineCommand.java +++ b/src/main/java/baritone/utils/command/defaults/MineCommand.java @@ -27,11 +27,10 @@ import baritone.api.utils.command.helpers.arguments.ArgConsumer; import baritone.cache.WorldScanner; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class MineCommand extends Command { public MineCommand(IBaritone baritone) { @@ -63,7 +62,7 @@ public class MineCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The mine command allows you to tell Baritone to search for and mine individual blocks.", "", "The specified blocks can be ores (which are commonly cached), or any other block.", diff --git a/src/main/java/baritone/utils/command/defaults/PathCommand.java b/src/main/java/baritone/utils/command/defaults/PathCommand.java index 5f3c06bc..45172299 100644 --- a/src/main/java/baritone/utils/command/defaults/PathCommand.java +++ b/src/main/java/baritone/utils/command/defaults/PathCommand.java @@ -29,15 +29,14 @@ import baritone.api.utils.command.helpers.arguments.ArgConsumer; import baritone.api.utils.command.helpers.tabcomplete.TabCompleteHelper; import baritone.cache.WorldScanner; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class PathCommand extends Command { public PathCommand(IBaritone baritone) { - super(baritone, asList("path", "goto")); + super(baritone, Arrays.asList("path", "goto")); } @Override @@ -82,7 +81,7 @@ public class PathCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The path command tells Baritone to head towards the current goal.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/PauseResumeCommands.java b/src/main/java/baritone/utils/command/defaults/PauseResumeCommands.java index 7e7a242c..ce221190 100644 --- a/src/main/java/baritone/utils/command/defaults/PauseResumeCommands.java +++ b/src/main/java/baritone/utils/command/defaults/PauseResumeCommands.java @@ -26,11 +26,10 @@ import baritone.api.utils.command.Command; import baritone.api.utils.command.exception.CommandInvalidStateException; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - /** * Contains the pause, resume, and paused commands. *

@@ -103,7 +102,7 @@ public class PauseResumeCommands { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The pause command tells Baritone to temporarily stop whatever it's doing.", "", "This can be used to pause pathing, building, following, whatever. A single use of the resume command will start it right back up again!", @@ -136,7 +135,7 @@ public class PauseResumeCommands { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The resume command tells Baritone to resume whatever it was doing when you last used pause.", "", "Usage:", @@ -163,7 +162,7 @@ public class PauseResumeCommands { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The paused command tells you if Baritone is currently paused by use of the pause command.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ProcCommand.java b/src/main/java/baritone/utils/command/defaults/ProcCommand.java index 33a29362..d5d5b156 100644 --- a/src/main/java/baritone/utils/command/defaults/ProcCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ProcCommand.java @@ -26,11 +26,10 @@ import baritone.api.utils.command.Command; import baritone.api.utils.command.exception.CommandInvalidStateException; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ProcCommand extends Command { public ProcCommand(IBaritone baritone) { @@ -74,7 +73,7 @@ public class ProcCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The proc command provides miscellaneous information about the process currently controlling Baritone.", "", "You are not expected to understand this if you aren't familiar with how Baritone works.", diff --git a/src/main/java/baritone/utils/command/defaults/ReloadAllCommand.java b/src/main/java/baritone/utils/command/defaults/ReloadAllCommand.java index e2528394..37640fbd 100644 --- a/src/main/java/baritone/utils/command/defaults/ReloadAllCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ReloadAllCommand.java @@ -22,11 +22,10 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ReloadAllCommand extends Command { public ReloadAllCommand(IBaritone baritone) { @@ -52,7 +51,7 @@ public class ReloadAllCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The reloadall command reloads Baritone's world cache.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/RenderCommand.java b/src/main/java/baritone/utils/command/defaults/RenderCommand.java index cc07f477..494104ec 100644 --- a/src/main/java/baritone/utils/command/defaults/RenderCommand.java +++ b/src/main/java/baritone/utils/command/defaults/RenderCommand.java @@ -23,11 +23,10 @@ import baritone.api.utils.BetterBlockPos; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class RenderCommand extends Command { public RenderCommand(IBaritone baritone) { @@ -62,7 +61,7 @@ public class RenderCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The render command fixes glitched chunk rendering without having to reload all of them.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/RepackCommand.java b/src/main/java/baritone/utils/command/defaults/RepackCommand.java index 0415ca7a..1c5a79f7 100644 --- a/src/main/java/baritone/utils/command/defaults/RepackCommand.java +++ b/src/main/java/baritone/utils/command/defaults/RepackCommand.java @@ -23,15 +23,14 @@ import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; import baritone.cache.WorldScanner; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class RepackCommand extends Command { public RepackCommand(IBaritone baritone) { - super(baritone, asList("repack", "rescan")); + super(baritone, Arrays.asList("repack", "rescan")); } @Override @@ -52,7 +51,7 @@ public class RepackCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Repack chunks around you. This basically re-caches them.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/SaveAllCommand.java b/src/main/java/baritone/utils/command/defaults/SaveAllCommand.java index 2da1824d..92601467 100644 --- a/src/main/java/baritone/utils/command/defaults/SaveAllCommand.java +++ b/src/main/java/baritone/utils/command/defaults/SaveAllCommand.java @@ -22,11 +22,10 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class SaveAllCommand extends Command { public SaveAllCommand(IBaritone baritone) { @@ -52,7 +51,7 @@ public class SaveAllCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The saveall command saves Baritone's world cache.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/SchematicaCommand.java b/src/main/java/baritone/utils/command/defaults/SchematicaCommand.java index e54a6e79..18e51738 100644 --- a/src/main/java/baritone/utils/command/defaults/SchematicaCommand.java +++ b/src/main/java/baritone/utils/command/defaults/SchematicaCommand.java @@ -22,11 +22,10 @@ import baritone.api.Settings; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class SchematicaCommand extends Command { public SchematicaCommand(IBaritone baritone) { @@ -51,7 +50,7 @@ public class SchematicaCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Builds the schematica currently open in Schematica.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/SelCommand.java b/src/main/java/baritone/utils/command/defaults/SelCommand.java index 296b6e61..25c3ffd8 100644 --- a/src/main/java/baritone/utils/command/defaults/SelCommand.java +++ b/src/main/java/baritone/utils/command/defaults/SelCommand.java @@ -44,22 +44,18 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.Vec3i; import java.awt.*; -import java.util.ArrayList; -import java.util.HashSet; +import java.util.*; import java.util.List; -import java.util.Set; import java.util.function.Function; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class SelCommand extends Command { private ISelectionManager manager = baritone.getSelectionManager(); private BetterBlockPos pos1 = null; public SelCommand(IBaritone baritone) { - super(baritone, asList("sel", "selection", "s")); + super(baritone, Arrays.asList("sel", "selection", "s")); baritone.getGameEventHandler().registerEventListener(new AbstractGameEventListener() { @Override public void onRenderPass(RenderEvent event) { @@ -236,7 +232,7 @@ public class SelCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The sel command allows you to manipulate Baritone's selections, similarly to WorldEdit.", "", "Using these selections, you can clear areas, fill them with blocks, or something else.", @@ -296,7 +292,7 @@ public class SelCommand extends Command { public static String[] getAllNames() { Set names = new HashSet<>(); for (Action action : Action.values()) { - names.addAll(asList(action.names)); + names.addAll(Arrays.asList(action.names)); } return names.toArray(new String[0]); } @@ -332,7 +328,7 @@ public class SelCommand extends Command { public static String[] getAllNames() { Set names = new HashSet<>(); for (TransformTarget target : TransformTarget.values()) { - names.addAll(asList(target.names)); + names.addAll(Arrays.asList(target.names)); } return names.toArray(new String[0]); } diff --git a/src/main/java/baritone/utils/command/defaults/SetCommand.java b/src/main/java/baritone/utils/command/defaults/SetCommand.java index 4c93f77a..dbcfbae0 100644 --- a/src/main/java/baritone/utils/command/defaults/SetCommand.java +++ b/src/main/java/baritone/utils/command/defaults/SetCommand.java @@ -31,6 +31,7 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; +import java.util.Arrays; import java.util.List; import java.util.Locale; import java.util.stream.Collectors; @@ -39,25 +40,23 @@ import java.util.stream.Stream; import static baritone.api.utils.SettingsUtil.settingTypeToString; import static baritone.api.utils.SettingsUtil.settingValueToString; import static baritone.api.utils.command.BaritoneChatControl.FORCE_COMMAND_PREFIX; -import static java.util.Arrays.asList; -import static java.util.stream.Stream.of; public class SetCommand extends Command { public SetCommand(IBaritone baritone) { - super(baritone, asList("set", "setting", "settings")); + super(baritone, Arrays.asList("set", "setting", "settings")); } @Override protected void executed(String label, ArgConsumer args, Settings settings) { String arg = args.has() ? args.getString().toLowerCase(Locale.US) : "list"; - if (asList("s", "save").contains(arg)) { + if (Arrays.asList("s", "save").contains(arg)) { SettingsUtil.save(settings); logDirect("Settings saved"); return; } - boolean viewModified = asList("m", "mod", "modified").contains(arg); - boolean viewAll = asList("all", "l", "list").contains(arg); + boolean viewModified = Arrays.asList("m", "mod", "modified").contains(arg); + boolean viewAll = Arrays.asList("all", "l", "list").contains(arg); boolean paginate = viewModified || viewAll; if (paginate) { String search = args.has() && args.peekAsOrNull(Integer.class) == null ? args.getString() : ""; @@ -188,7 +187,7 @@ public class SetCommand extends Command { protected Stream tabCompleted(String label, ArgConsumer args, Settings settings) { if (args.has()) { String arg = args.getString(); - if (args.hasExactlyOne() && !asList("s", "save").contains(args.peekString().toLowerCase(Locale.US))) { + if (args.hasExactlyOne() && !Arrays.asList("s", "save").contains(args.peekString().toLowerCase(Locale.US))) { if (arg.equalsIgnoreCase("reset")) { return new TabCompleteHelper() .addModifiedSettings() @@ -206,9 +205,9 @@ public class SetCommand extends Command { if (setting.getType() == Boolean.class) { TabCompleteHelper helper = new TabCompleteHelper(); if ((Boolean) setting.value) { - helper.append(of("true", "false")); + helper.append(Stream.of("true", "false")); } else { - helper.append(of("false", "true")); + helper.append(Stream.of("false", "true")); } return helper.filterPrefix(args.getString()).stream(); } else { @@ -234,7 +233,7 @@ public class SetCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Using the set command, you can manage all of Baritone's settings. Almost every aspect is controlled by these settings - go wild!", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/ThisWayCommand.java b/src/main/java/baritone/utils/command/defaults/ThisWayCommand.java index 27cefcc9..80c3d69b 100644 --- a/src/main/java/baritone/utils/command/defaults/ThisWayCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ThisWayCommand.java @@ -23,15 +23,14 @@ import baritone.api.pathing.goals.GoalXZ; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class ThisWayCommand extends Command { public ThisWayCommand(IBaritone baritone) { - super(baritone, asList("thisway", "forward")); + super(baritone, Arrays.asList("thisway", "forward")); } @Override @@ -58,7 +57,7 @@ public class ThisWayCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "Creates a GoalXZ some amount of blocks in the direction you're currently looking", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/TunnelCommand.java b/src/main/java/baritone/utils/command/defaults/TunnelCommand.java index c7da7f85..d89c996a 100644 --- a/src/main/java/baritone/utils/command/defaults/TunnelCommand.java +++ b/src/main/java/baritone/utils/command/defaults/TunnelCommand.java @@ -24,11 +24,10 @@ import baritone.api.pathing.goals.GoalStrictDirection; import baritone.api.utils.command.Command; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class TunnelCommand extends Command { public TunnelCommand(IBaritone baritone) { @@ -58,7 +57,7 @@ public class TunnelCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The tunnel command sets a goal that tells Baritone to mine completely straight in the direction that you're facing.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/VersionCommand.java b/src/main/java/baritone/utils/command/defaults/VersionCommand.java index ef07b688..6e8812a4 100644 --- a/src/main/java/baritone/utils/command/defaults/VersionCommand.java +++ b/src/main/java/baritone/utils/command/defaults/VersionCommand.java @@ -23,11 +23,10 @@ import baritone.api.utils.command.Command; import baritone.api.utils.command.exception.CommandInvalidStateException; import baritone.api.utils.command.helpers.arguments.ArgConsumer; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; -import static java.util.Arrays.asList; - public class VersionCommand extends Command { public VersionCommand(IBaritone baritone) { @@ -57,7 +56,7 @@ public class VersionCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The version command prints the version of Baritone you're currently running.", "", "Usage:", diff --git a/src/main/java/baritone/utils/command/defaults/WaypointsCommand.java b/src/main/java/baritone/utils/command/defaults/WaypointsCommand.java index 97618390..863c9754 100644 --- a/src/main/java/baritone/utils/command/defaults/WaypointsCommand.java +++ b/src/main/java/baritone/utils/command/defaults/WaypointsCommand.java @@ -38,21 +38,17 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Stream; import static baritone.api.utils.command.BaritoneChatControl.FORCE_COMMAND_PREFIX; -import static java.util.Arrays.asList; public class WaypointsCommand extends Command { public WaypointsCommand(IBaritone baritone) { - super(baritone, asList("waypoints", "waypoint", "wp")); + super(baritone, Arrays.asList("waypoints", "waypoint", "wp")); } @Override @@ -279,7 +275,7 @@ public class WaypointsCommand extends Command { @Override public List getLongDesc() { - return asList( + return Arrays.asList( "The waypoint command allows you to manage Baritone's waypoints.", "", "Waypoints can be used to mark positions for later. Waypoints are each given a tag and an optional name.", @@ -324,7 +320,7 @@ public class WaypointsCommand extends Command { public static String[] getAllNames() { Set names = new HashSet<>(); for (Action action : Action.values()) { - names.addAll(asList(action.names)); + names.addAll(Arrays.asList(action.names)); } return names.toArray(new String[0]); }