From c54dcdba2418442cdf07387551823ad38e1066d1 Mon Sep 17 00:00:00 2001 From: Logan Darklock Date: Fri, 6 Sep 2019 17:41:27 -0700 Subject: [PATCH] "stAnDaRd" ConTinuATion InDEnT --- .../utils/command/BaritoneChatControl.java | 26 +++++------ .../baritone/api/utils/command/Command.java | 4 +- .../command/argparser/ArgParserManager.java | 24 +++++----- .../command/argparser/DefaultArgParsers.java | 10 ++--- .../command/argument/CommandArgument.java | 12 ++--- .../utils/command/datatypes/BlockById.java | 16 +++---- .../command/datatypes/EntityClassById.java | 16 +++---- .../command/datatypes/ForEnumFacing.java | 14 +++--- .../utils/command/datatypes/ForWaypoints.java | 36 +++++++-------- .../command/datatypes/PlayerByUsername.java | 26 +++++------ .../command/datatypes/RelativeBlockPos.java | 6 +-- .../utils/command/datatypes/RelativeFile.java | 14 +++--- .../utils/command/datatypes/RelativeGoal.java | 12 ++--- .../command/datatypes/RelativeGoalBlock.java | 12 ++--- .../command/datatypes/RelativeGoalXZ.java | 8 ++-- .../CommandInvalidArgumentException.java | 6 +-- .../exception/CommandUnhandledException.java | 6 +-- .../command/execution/CommandExecution.java | 6 +-- .../command/helpers/pagination/Paginator.java | 44 +++++++++---------- .../tabcomplete/TabCompleteHelper.java | 38 ++++++++-------- .../utils/command/manager/CommandManager.java | 6 +-- .../api/utils/command/registry/Registry.java | 6 +-- .../java/baritone/utils/PathRenderer.java | 24 +++++----- 23 files changed, 186 insertions(+), 186 deletions(-) diff --git a/src/api/java/baritone/api/utils/command/BaritoneChatControl.java b/src/api/java/baritone/api/utils/command/BaritoneChatControl.java index df7bab65..23bbd4a7 100644 --- a/src/api/java/baritone/api/utils/command/BaritoneChatControl.java +++ b/src/api/java/baritone/api/utils/command/BaritoneChatControl.java @@ -88,15 +88,15 @@ public class BaritoneChatControl implements Helper, AbstractGameEventListener { ITextComponent component = new TextComponentString(String.format("> %s", toDisplay)); component.getStyle() - .setColor(TextFormatting.WHITE) - .setHoverEvent(new HoverEvent( - HoverEvent.Action.SHOW_TEXT, - new TextComponentString("Click to rerun command") - )) - .setClickEvent(new ClickEvent( - ClickEvent.Action.RUN_COMMAND, - FORCE_COMMAND_PREFIX + msg - )); + .setColor(TextFormatting.WHITE) + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, + new TextComponentString("Click to rerun command") + )) + .setClickEvent(new ClickEvent( + ClickEvent.Action.RUN_COMMAND, + FORCE_COMMAND_PREFIX + msg + )); logDirect(component); } @@ -195,10 +195,10 @@ public class BaritoneChatControl implements Helper, AbstractGameEventListener { if (argc.hasAtMost(2)) { if (argc.hasExactly(1)) { return new TabCompleteHelper() - .addCommands() - .addSettings() - .filterPrefix(argc.getString()) - .stream(); + .addCommands() + .addSettings() + .filterPrefix(argc.getString()) + .stream(); } Settings.Setting setting = settings.byLowerName.get(argc.getString().toLowerCase(Locale.US)); diff --git a/src/api/java/baritone/api/utils/command/Command.java b/src/api/java/baritone/api/utils/command/Command.java index 410a34a9..bb00c8a7 100644 --- a/src/api/java/baritone/api/utils/command/Command.java +++ b/src/api/java/baritone/api/utils/command/Command.java @@ -51,8 +51,8 @@ public abstract class Command implements Helper, AbstractGameEventListener { */ protected Command(List names) { this.names = names.stream() - .map(s -> s.toLowerCase(Locale.US)) - .collect(Collectors.toList()); + .map(s -> s.toLowerCase(Locale.US)) + .collect(Collectors.toList()); baritone.getGameEventHandler().registerEventListener(this); } diff --git a/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java b/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java index c96418a4..7237ea07 100644 --- a/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java +++ b/src/api/java/baritone/api/utils/command/argparser/ArgParserManager.java @@ -38,11 +38,11 @@ public class ArgParserManager { public static ArgParser.Stateless getParserStateless(Class klass) { //noinspection unchecked return REGISTRY.descendingStream() - .filter(ArgParser.Stateless.class::isInstance) - .map(ArgParser.Stateless.class::cast) - .filter(parser -> parser.getKlass().isAssignableFrom(klass)) - .findFirst() - .orElse(null); + .filter(ArgParser.Stateless.class::isInstance) + .map(ArgParser.Stateless.class::cast) + .filter(parser -> parser.getKlass().isAssignableFrom(klass)) + .findFirst() + .orElse(null); } /** @@ -52,13 +52,13 @@ public class ArgParserManager { public static ArgParser.Stated getParserStated(Class klass, Class stateKlass) { //noinspection unchecked return REGISTRY.descendingStream() - .filter(ArgParser.Stated.class::isInstance) - .map(ArgParser.Stated.class::cast) - .filter(parser -> parser.getKlass().isAssignableFrom(klass)) - .filter(parser -> parser.getStateKlass().isAssignableFrom(stateKlass)) - .map(ArgParser.Stated.class::cast) - .findFirst() - .orElse(null); + .filter(ArgParser.Stated.class::isInstance) + .map(ArgParser.Stated.class::cast) + .filter(parser -> parser.getKlass().isAssignableFrom(klass)) + .filter(parser -> parser.getStateKlass().isAssignableFrom(stateKlass)) + .map(ArgParser.Stated.class::cast) + .findFirst() + .orElse(null); } /** 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 2f51bbad..7518e459 100644 --- a/src/api/java/baritone/api/utils/command/argparser/DefaultArgParsers.java +++ b/src/api/java/baritone/api/utils/command/argparser/DefaultArgParsers.java @@ -114,10 +114,10 @@ public class DefaultArgParsers { } public static final List> ALL = asList( - IntArgumentParser.INSTANCE, - LongArgumentParser.INSTANCE, - FloatArgumentParser.INSTANCE, - DoubleArgumentParser.INSTANCE, - BooleanArgumentParser.INSTANCE + IntArgumentParser.INSTANCE, + LongArgumentParser.INSTANCE, + FloatArgumentParser.INSTANCE, + DoubleArgumentParser.INSTANCE, + BooleanArgumentParser.INSTANCE ); } diff --git a/src/api/java/baritone/api/utils/command/argument/CommandArgument.java b/src/api/java/baritone/api/utils/command/argument/CommandArgument.java index e793b8b5..49d8f477 100644 --- a/src/api/java/baritone/api/utils/command/argument/CommandArgument.java +++ b/src/api/java/baritone/api/utils/command/argument/CommandArgument.java @@ -67,9 +67,9 @@ public class CommandArgument { */ public > E getEnum(Class enumClass) { return Arrays.stream(enumClass.getEnumConstants()) - .filter(e -> e.name().equalsIgnoreCase(value)) - .findFirst() - .orElseThrow(() -> new CommandInvalidTypeException(this, enumClass.getSimpleName())); + .filter(e -> e.name().equalsIgnoreCase(value)) + .findFirst() + .orElseThrow(() -> new CommandInvalidTypeException(this, enumClass.getSimpleName())); } /** @@ -145,9 +145,9 @@ public class CommandArgument { 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(); diff --git a/src/api/java/baritone/api/utils/command/datatypes/BlockById.java b/src/api/java/baritone/api/utils/command/datatypes/BlockById.java index 617ccb57..e8d1589c 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/BlockById.java +++ b/src/api/java/baritone/api/utils/command/datatypes/BlockById.java @@ -48,13 +48,13 @@ public class BlockById implements IDatatypeFor { @Override public Stream tabComplete(ArgConsumer consumer) { return new TabCompleteHelper() - .append( - Block.REGISTRY.getKeys() - .stream() - .map(Object::toString) - ) - .filterPrefixNamespaced(consumer.getString()) - .sortAlphabetically() - .stream(); + .append( + Block.REGISTRY.getKeys() + .stream() + .map(Object::toString) + ) + .filterPrefixNamespaced(consumer.getString()) + .sortAlphabetically() + .stream(); } } diff --git a/src/api/java/baritone/api/utils/command/datatypes/EntityClassById.java b/src/api/java/baritone/api/utils/command/datatypes/EntityClassById.java index 09cdbb92..fd053584 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/EntityClassById.java +++ b/src/api/java/baritone/api/utils/command/datatypes/EntityClassById.java @@ -50,13 +50,13 @@ public class EntityClassById implements IDatatypeFor> { @Override public Stream tabComplete(ArgConsumer consumer) { return new TabCompleteHelper() - .append( - EntityList.getEntityNameList() - .stream() - .map(Object::toString) - ) - .filterPrefixNamespaced(consumer.getString()) - .sortAlphabetically() - .stream(); + .append( + EntityList.getEntityNameList() + .stream() + .map(Object::toString) + ) + .filterPrefixNamespaced(consumer.getString()) + .sortAlphabetically() + .stream(); } } diff --git a/src/api/java/baritone/api/utils/command/datatypes/ForEnumFacing.java b/src/api/java/baritone/api/utils/command/datatypes/ForEnumFacing.java index 2dbadd9d..f91eea0a 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/ForEnumFacing.java +++ b/src/api/java/baritone/api/utils/command/datatypes/ForEnumFacing.java @@ -44,12 +44,12 @@ public class ForEnumFacing implements IDatatypeFor { @Override public Stream tabComplete(ArgConsumer consumer) { return new TabCompleteHelper() - .append( - Arrays.stream(EnumFacing.values()) - .map(EnumFacing::getName) - .map(String::toLowerCase) - ) - .filterPrefix(consumer.getString()) - .stream(); + .append( + Arrays.stream(EnumFacing.values()) + .map(EnumFacing::getName) + .map(String::toLowerCase) + ) + .filterPrefix(consumer.getString()) + .stream(); } } diff --git a/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java b/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java index 3cb27a50..c6720b1c 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java +++ b/src/api/java/baritone/api/utils/command/datatypes/ForWaypoints.java @@ -51,43 +51,43 @@ public class ForWaypoints implements IDatatypeFor { @Override public Stream tabComplete(ArgConsumer consumer) { return new TabCompleteHelper() - .append(getWaypointNames()) - .sortAlphabetically() - .prepend(IWaypoint.Tag.getAllNames()) - .filterPrefix(consumer.getString()) - .stream(); + .append(getWaypointNames()) + .sortAlphabetically() + .prepend(IWaypoint.Tag.getAllNames()) + .filterPrefix(consumer.getString()) + .stream(); } public static IWaypointCollection waypoints() { return BaritoneAPI.getProvider() - .getPrimaryBaritone() - .getWorldProvider() - .getCurrentWorld() - .getWaypoints(); + .getPrimaryBaritone() + .getWorldProvider() + .getCurrentWorld() + .getWaypoints(); } public static IWaypoint[] getWaypoints() { return waypoints().getAllWaypoints().stream() - .sorted(Comparator.comparingLong(IWaypoint::getCreationTimestamp).reversed()) - .toArray(IWaypoint[]::new); + .sorted(Comparator.comparingLong(IWaypoint::getCreationTimestamp).reversed()) + .toArray(IWaypoint[]::new); } public static String[] getWaypointNames() { return Arrays.stream(getWaypoints()) - .map(IWaypoint::getName) - .filter(name -> !name.equals("")) - .toArray(String[]::new); + .map(IWaypoint::getName) + .filter(name -> !name.equals("")) + .toArray(String[]::new); } public static IWaypoint[] getWaypointsByTag(IWaypoint.Tag tag) { return waypoints().getByTag(tag).stream() - .sorted(Comparator.comparingLong(IWaypoint::getCreationTimestamp).reversed()) - .toArray(IWaypoint[]::new); + .sorted(Comparator.comparingLong(IWaypoint::getCreationTimestamp).reversed()) + .toArray(IWaypoint[]::new); } public static IWaypoint[] getWaypointsByName(String name) { return Arrays.stream(getWaypoints()) - .filter(waypoint -> waypoint.getName().equalsIgnoreCase(name)) - .toArray(IWaypoint[]::new); + .filter(waypoint -> waypoint.getName().equalsIgnoreCase(name)) + .toArray(IWaypoint[]::new); } } diff --git a/src/api/java/baritone/api/utils/command/datatypes/PlayerByUsername.java b/src/api/java/baritone/api/utils/command/datatypes/PlayerByUsername.java index 6ef22b93..376f6b63 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/PlayerByUsername.java +++ b/src/api/java/baritone/api/utils/command/datatypes/PlayerByUsername.java @@ -29,7 +29,7 @@ import static java.util.Objects.isNull; public class PlayerByUsername implements IDatatypeFor { private final List players = - BaritoneAPI.getProvider().getPrimaryBaritone().getPlayerContext().world().playerEntities; + BaritoneAPI.getProvider().getPrimaryBaritone().getPlayerContext().world().playerEntities; public final EntityPlayer player; public PlayerByUsername() { @@ -40,10 +40,10 @@ public class PlayerByUsername implements IDatatypeFor { String username = consumer.getString(); player = players - .stream() - .filter(s -> s.getName().equalsIgnoreCase(username)) - .findFirst() - .orElse(null); + .stream() + .filter(s -> s.getName().equalsIgnoreCase(username)) + .findFirst() + .orElse(null); if (isNull(player)) { throw new IllegalArgumentException("no player found by that username"); @@ -58,13 +58,13 @@ public class PlayerByUsername implements IDatatypeFor { @Override public Stream tabComplete(ArgConsumer consumer) { return new TabCompleteHelper() - .append( - players - .stream() - .map(EntityPlayer::getName) - ) - .filterPrefix(consumer.getString()) - .sortAlphabetically() - .stream(); + .append( + players + .stream() + .map(EntityPlayer::getName) + ) + .filterPrefix(consumer.getString()) + .sortAlphabetically() + .stream(); } } diff --git a/src/api/java/baritone/api/utils/command/datatypes/RelativeBlockPos.java b/src/api/java/baritone/api/utils/command/datatypes/RelativeBlockPos.java index ab728ede..f8b778df 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/RelativeBlockPos.java +++ b/src/api/java/baritone/api/utils/command/datatypes/RelativeBlockPos.java @@ -44,9 +44,9 @@ public class RelativeBlockPos implements IDatatypePost { File currentFile = currentPath.isAbsolute() ? currentPath.toFile() : new File(base, currentPathStringThing); return Arrays.stream(Objects.requireNonNull(SHUT_THE_FUCK_UP_IOEXCEPTION_NOBODY_LIKES_YOU( - useParent - ? currentFile.getParentFile() - : currentFile + useParent + ? currentFile.getParentFile() + : currentFile ).listFiles())) - .map(f -> (currentPath.isAbsolute() ? f : basePath.relativize(f.toPath()).toString()) + - (f.isDirectory() ? File.separator : "")) - .filter(s -> s.toLowerCase(Locale.US).startsWith(currentPathStringThing.toLowerCase(Locale.US))) - .filter(s -> !s.contains(" ")); + .map(f -> (currentPath.isAbsolute() ? f : basePath.relativize(f.toPath()).toString()) + + (f.isDirectory() ? File.separator : "")) + .filter(s -> s.toLowerCase(Locale.US).startsWith(currentPathStringThing.toLowerCase(Locale.US))) + .filter(s -> !s.contains(" ")); } @Override diff --git a/src/api/java/baritone/api/utils/command/datatypes/RelativeGoal.java b/src/api/java/baritone/api/utils/command/datatypes/RelativeGoal.java index a0f94cee..4b4170a9 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/RelativeGoal.java +++ b/src/api/java/baritone/api/utils/command/datatypes/RelativeGoal.java @@ -56,18 +56,18 @@ public class RelativeGoal implements IDatatypePost { return new GoalBlock(origin); case 1: return new GoalYLevel( - coords[0].applyFloor(origin.y) + coords[0].applyFloor(origin.y) ); case 2: return new GoalXZ( - coords[0].applyFloor(origin.x), - coords[1].applyFloor(origin.z) + coords[0].applyFloor(origin.x), + coords[1].applyFloor(origin.z) ); case 3: return new GoalBlock( - coords[0].applyFloor(origin.x), - coords[1].applyFloor(origin.y), - coords[2].applyFloor(origin.z) + coords[0].applyFloor(origin.x), + coords[1].applyFloor(origin.y), + coords[2].applyFloor(origin.z) ); default: throw new IllegalStateException("Unexpected coords size: " + coords.length); diff --git a/src/api/java/baritone/api/utils/command/datatypes/RelativeGoalBlock.java b/src/api/java/baritone/api/utils/command/datatypes/RelativeGoalBlock.java index a4dc75bd..ff332493 100644 --- a/src/api/java/baritone/api/utils/command/datatypes/RelativeGoalBlock.java +++ b/src/api/java/baritone/api/utils/command/datatypes/RelativeGoalBlock.java @@ -32,18 +32,18 @@ public class RelativeGoalBlock implements IDatatypePost { public RelativeGoalXZ(ArgConsumer consumer) { coords = new RelativeCoordinate[]{ - consumer.getDatatype(RelativeCoordinate.class), - consumer.getDatatype(RelativeCoordinate.class) + consumer.getDatatype(RelativeCoordinate.class), + consumer.getDatatype(RelativeCoordinate.class) }; } @Override public GoalXZ apply(BetterBlockPos origin) { return new GoalXZ( - coords[0].applyFloor(origin.x), - coords[1].applyFloor(origin.z) + coords[0].applyFloor(origin.x), + coords[1].applyFloor(origin.z) ); } diff --git a/src/api/java/baritone/api/utils/command/exception/CommandInvalidArgumentException.java b/src/api/java/baritone/api/utils/command/exception/CommandInvalidArgumentException.java index 342cf336..76d63979 100644 --- a/src/api/java/baritone/api/utils/command/exception/CommandInvalidArgumentException.java +++ b/src/api/java/baritone/api/utils/command/exception/CommandInvalidArgumentException.java @@ -24,9 +24,9 @@ public abstract class CommandInvalidArgumentException extends CommandErrorMessag protected CommandInvalidArgumentException(CommandArgument arg, String reason) { super(String.format( - "Error at argument #%s: %s", - arg.index == -1 ? "" : Integer.toString(arg.index + 1), - reason + "Error at argument #%s: %s", + arg.index == -1 ? "" : Integer.toString(arg.index + 1), + reason )); this.arg = arg; 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 9de56284..9c1f2f35 100644 --- a/src/api/java/baritone/api/utils/command/exception/CommandUnhandledException.java +++ b/src/api/java/baritone/api/utils/command/exception/CommandUnhandledException.java @@ -34,7 +34,7 @@ public class CommandUnhandledException extends CommandErrorMessageException { public static String getBaritoneStackTrace(String stackTrace) { List lines = Arrays.stream(stackTrace.split("\n")) - .collect(Collectors.toList()); + .collect(Collectors.toList()); int lastBaritoneLine = 0; for (int i = 0; i < lines.size(); i++) { @@ -76,8 +76,8 @@ public class CommandUnhandledException extends CommandErrorMessageException { public CommandUnhandledException(Throwable cause) { super(String.format( - "An unhandled exception has occurred:\n\n%s", - getFriendlierStackTrace(cause) + "An unhandled exception has occurred:\n\n%s", + getFriendlierStackTrace(cause) )); } } diff --git a/src/api/java/baritone/api/utils/command/execution/CommandExecution.java b/src/api/java/baritone/api/utils/command/execution/CommandExecution.java index 2999666a..1563405e 100644 --- a/src/api/java/baritone/api/utils/command/execution/CommandExecution.java +++ b/src/api/java/baritone/api/utils/command/execution/CommandExecution.java @@ -97,9 +97,9 @@ public class CommandExecution { } return new CommandExecution( - command, - label, - args + command, + label, + args ); } 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 2fb2f5bc..22c796d0 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 @@ -83,14 +83,14 @@ public class Paginator implements Helper { if (hasPrevPage) { prevPageComponent.getStyle() - .setClickEvent(new ClickEvent( - ClickEvent.Action.RUN_COMMAND, - String.format("%s %d", commandPrefix, page - 1) - )) - .setHoverEvent(new HoverEvent( - HoverEvent.Action.SHOW_TEXT, - new TextComponentString("Click to view previous page") - )); + .setClickEvent(new ClickEvent( + ClickEvent.Action.RUN_COMMAND, + String.format("%s %d", commandPrefix, page - 1) + )) + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, + new TextComponentString("Click to view previous page") + )); } else { prevPageComponent.getStyle().setColor(TextFormatting.DARK_GRAY); } @@ -99,14 +99,14 @@ public class Paginator implements Helper { if (hasNextPage) { nextPageComponent.getStyle() - .setClickEvent(new ClickEvent( - ClickEvent.Action.RUN_COMMAND, - String.format("%s %d", commandPrefix, page + 1) - )) - .setHoverEvent(new HoverEvent( - HoverEvent.Action.SHOW_TEXT, - new TextComponentString("Click to view next page") - )); + .setClickEvent(new ClickEvent( + ClickEvent.Action.RUN_COMMAND, + String.format("%s %d", commandPrefix, page + 1) + )) + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, + new TextComponentString("Click to view next page") + )); } else { nextPageComponent.getStyle().setColor(TextFormatting.DARK_GRAY); } @@ -134,12 +134,12 @@ public class Paginator implements Helper { if (!pagi.validPage(page)) { throw new CommandInvalidTypeException( - consumer.consumed(), - String.format( - "a valid page (1-%d)", - pagi.getMaxPage() - ), - consumer.consumed().value + consumer.consumed(), + String.format( + "a valid page (1-%d)", + pagi.getMaxPage() + ), + consumer.consumed().value ); } } diff --git a/src/api/java/baritone/api/utils/command/helpers/tabcomplete/TabCompleteHelper.java b/src/api/java/baritone/api/utils/command/helpers/tabcomplete/TabCompleteHelper.java index 972b634d..2878b8df 100644 --- a/src/api/java/baritone/api/utils/command/helpers/tabcomplete/TabCompleteHelper.java +++ b/src/api/java/baritone/api/utils/command/helpers/tabcomplete/TabCompleteHelper.java @@ -112,9 +112,9 @@ public class TabCompleteHelper { */ public TabCompleteHelper append(Class> num) { return append( - Arrays.stream(num.getEnumConstants()) - .map(Enum::name) - .map(String::toLowerCase) + Arrays.stream(num.getEnumConstants()) + .map(Enum::name) + .map(String::toLowerCase) ); } @@ -163,9 +163,9 @@ public class TabCompleteHelper { */ public TabCompleteHelper prepend(Class> num) { return prepend( - Arrays.stream(num.getEnumConstants()) - .map(Enum::name) - .map(String::toLowerCase) + Arrays.stream(num.getEnumConstants()) + .map(Enum::name) + .map(String::toLowerCase) ); } @@ -263,9 +263,9 @@ public class TabCompleteHelper { */ public TabCompleteHelper addCommands() { return append( - CommandManager.REGISTRY.descendingStream() - .flatMap(command -> command.names.stream()) - .distinct() + CommandManager.REGISTRY.descendingStream() + .flatMap(command -> command.names.stream()) + .distinct() ); } @@ -276,10 +276,10 @@ public class TabCompleteHelper { */ public TabCompleteHelper addSettings() { return append( - BaritoneAPI.getSettings().allSettings.stream() - .map(Settings.Setting::getName) - .filter(s -> !s.equalsIgnoreCase("logger")) - .sorted(String.CASE_INSENSITIVE_ORDER) + BaritoneAPI.getSettings().allSettings.stream() + .map(Settings.Setting::getName) + .filter(s -> !s.equalsIgnoreCase("logger")) + .sorted(String.CASE_INSENSITIVE_ORDER) ); } @@ -290,9 +290,9 @@ public class TabCompleteHelper { */ public TabCompleteHelper addModifiedSettings() { return append( - SettingsUtil.modifiedSettings(BaritoneAPI.getSettings()).stream() - .map(Settings.Setting::getName) - .sorted(String.CASE_INSENSITIVE_ORDER) + SettingsUtil.modifiedSettings(BaritoneAPI.getSettings()).stream() + .map(Settings.Setting::getName) + .sorted(String.CASE_INSENSITIVE_ORDER) ); } @@ -303,9 +303,9 @@ public class TabCompleteHelper { */ public TabCompleteHelper addToggleableSettings() { return append( - BaritoneAPI.getSettings().getAllValuesByType(Boolean.class).stream() - .map(Settings.Setting::getName) - .sorted(String.CASE_INSENSITIVE_ORDER) + BaritoneAPI.getSettings().getAllValuesByType(Boolean.class).stream() + .map(Settings.Setting::getName) + .sorted(String.CASE_INSENSITIVE_ORDER) ); } } diff --git a/src/api/java/baritone/api/utils/command/manager/CommandManager.java b/src/api/java/baritone/api/utils/command/manager/CommandManager.java index 287acaa5..425da5ef 100644 --- a/src/api/java/baritone/api/utils/command/manager/CommandManager.java +++ b/src/api/java/baritone/api/utils/command/manager/CommandManager.java @@ -78,9 +78,9 @@ public class CommandManager { if (args.isEmpty()) { return new TabCompleteHelper() - .addCommands() - .filterPrefix(label) - .stream(); + .addCommands() + .filterPrefix(label) + .stream(); } else { return tabComplete(pair); } diff --git a/src/api/java/baritone/api/utils/command/registry/Registry.java b/src/api/java/baritone/api/utils/command/registry/Registry.java index 4a8badd2..82a3dc6f 100644 --- a/src/api/java/baritone/api/utils/command/registry/Registry.java +++ b/src/api/java/baritone/api/utils/command/registry/Registry.java @@ -132,9 +132,9 @@ public class Registry { */ public Stream descendingStream() { return StreamSupport.stream(Spliterators.spliterator( - descendingIterator(), - _entries.size(), - Spliterator.SIZED | Spliterator.SUBSIZED + descendingIterator(), + _entries.size(), + Spliterator.SIZED | Spliterator.SUBSIZED ), false); } } diff --git a/src/main/java/baritone/utils/PathRenderer.java b/src/main/java/baritone/utils/PathRenderer.java index 8f8a3578..58917436 100644 --- a/src/main/java/baritone/utils/PathRenderer.java +++ b/src/main/java/baritone/utils/PathRenderer.java @@ -131,9 +131,9 @@ public final class PathRenderer implements IRenderer { int dirZ = end.z - start.z; while (next + 1 < positions.size() && (!fadeOut || next + 1 < fadeStart) && - (dirX == positions.get(next + 1).x - end.x && - dirY == positions.get(next + 1).y - end.y && - dirZ == positions.get(next + 1).z - end.z)) { + (dirX == positions.get(next + 1).x - end.x && + dirY == positions.get(next + 1).y - end.y && + dirZ == positions.get(next + 1).z - end.z)) { end = positions.get(++next); } @@ -239,15 +239,15 @@ public final class PathRenderer implements IRenderer { } TileEntityBeaconRenderer.renderBeamSegment( - goalPos.getX() - renderPosX, - -renderPosY, - goalPos.getZ() - renderPosZ, - partialTicks, - 1.0, - player.world.getTotalWorldTime(), - 0, - 256, - color.getColorComponents(null) + goalPos.getX() - renderPosX, + -renderPosY, + goalPos.getZ() - renderPosZ, + partialTicks, + 1.0, + player.world.getTotalWorldTime(), + 0, + 256, + color.getColorComponents(null) ); if (settings.renderGoalIgnoreDepth.value) {