From 195a13a23cbd138863f160809483252dfef5fab3 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 8 Sep 2021 16:39:43 +0100 Subject: [PATCH] some codestyle application --- .../bukkit/util/DoNotMiniseThese.java | 2 + .../sk89q/worldedit/bukkit/BukkitWorld.java | 3 +- .../worldedit/bukkit/WorldEditPlugin.java | 2 +- .../bukkit/adapter/BukkitImplAdapter.java | 2 +- .../fastasyncworldedit/util/StubServer.java | 276 ++++++++++++------ .../com/sk89q/worldedit/cli/CLIPlatform.java | 5 +- worldedit-core/build.gradle.kts | 2 +- .../internal/util/DocumentationPrinter.kt | 8 +- .../internal/util/RstWorldEditText.kt | 4 +- .../worldedit/blocks/MobSpawnerBlock.java | 8 +- .../com/sk89q/worldedit/blocks/SignBlock.java | 10 +- .../sk89q/worldedit/blocks/SkullBlock.java | 9 +- .../com/fastasyncworldedit/core/Fawe.java | 3 +- .../com/fastasyncworldedit/core/FaweAPI.java | 6 +- .../fastasyncworldedit/core/FaweCache.java | 24 +- .../command/tool/brush/CatenaryBrush.java | 1 - .../command/tool/brush/CopyPastaBrush.java | 3 +- .../core/command/tool/brush/HeightBrush.java | 6 +- .../core/command/tool/brush/LayerBrush.java | 3 +- .../core/command/tool/brush/ScatterBrush.java | 3 +- .../core/command/tool/brush/StencilBrush.java | 6 +- .../command/tool/brush/SurfaceSpline.java | 1 - .../extension/factory/TransformFactory.java | 4 +- .../parser/mask/AdjacentMaskParser.java | 4 - .../factory/parser/mask/WallMaskParser.java | 2 - .../parser/pattern/OffsetPatternParser.java | 1 - .../pattern/RandomOffsetPatternParser.java | 1 - .../parser/pattern/RelativePatternParser.java | 1 - .../SolidRandomOffsetPatternParser.java | 1 - .../SurfaceRandomOffsetPatternParser.java | 1 - .../transform/OffsetTransformParser.java | 2 +- .../core/extent/LimitExtent.java | 1 - .../core/extent/NullExtent.java | 3 - .../core/extent/ResettableExtent.java | 1 - .../io/schematic/MinecraftStructure.java | 1 - .../processor/heightmap/ArrayHeightMap.java | 4 +- .../extent/processor/heightmap/HeightMap.java | 12 +- .../heightmap/ScalableHeightMap.java | 2 +- .../extent/transform/OffsetTransform.java | 6 +- .../transform/RandomOffsetTransform.java | 6 +- .../internal/exception/FaweException.java | 1 + .../implementation/blocks/CharSetBlocks.java | 2 +- .../implementation/chunk/ChunkHolder.java | 30 +- .../preloader/AsyncPreloader.java | 5 +- .../core/util/DelegateTextureUtil.java | 1 - .../core/util/EditSessionBuilder.java | 2 +- .../core/util/MainUtil.java | 6 +- .../java/com/sk89q/worldedit/EditSession.java | 2 +- .../java/com/sk89q/worldedit/WorldEdit.java | 2 +- .../worldedit/command/BrushCommands.java | 1 + .../worldedit/command/ClipboardCommands.java | 1 - .../worldedit/command/ExpandCommands.java | 6 +- .../worldedit/command/GenerationCommands.java | 10 +- .../command/LegacySnapshotCommands.java | 8 +- .../worldedit/command/RegionCommands.java | 4 +- .../worldedit/command/SnapshotCommands.java | 8 +- .../sk89q/worldedit/command/ToolCommands.java | 6 +- .../worldedit/command/ToolUtilCommands.java | 12 +- .../worldedit/command/UtilityCommands.java | 8 +- .../command/argument/BooleanConverter.java | 10 +- .../command/argument/FactoryConverter.java | 1 + .../argument/RegionFactoryConverter.java | 12 +- .../command/argument/RegistryConverter.java | 22 +- .../worldedit/command/tool/FloodFillTool.java | 3 +- .../worldedit/command/tool/QueryTool.java | 2 +- .../command/util/SuggestionHelper.java | 1 + .../factory/parser/mask/BiomeMaskParser.java | 2 - .../platform/PlatformCommandManager.java | 12 +- .../worldedit/extent/clipboard/Clipboard.java | 1 - .../worldedit/function/factory/Apply.java | 6 +- .../function/factory/ApplyRegion.java | 6 +- .../worldedit/function/factory/Paint.java | 8 +- .../sk89q/worldedit/function/mask/Masks.java | 5 +- .../function/operation/ForwardExtentCopy.java | 1 - .../function/visitor/BreadthFirstSearch.java | 4 +- .../function/visitor/DownwardVisitor.java | 1 + .../function/visitor/FlatRegionVisitor.java | 1 + .../function/visitor/LayerVisitor.java | 5 +- .../function/visitor/NonRisingVisitor.java | 1 + .../function/visitor/RecursiveVisitor.java | 2 + .../function/visitor/RegionVisitor.java | 16 +- .../internal/expression/Functions.java | 48 +-- .../expression/invoke/ExpressionHandles.java | 4 +- .../util/collection/Int2BaseBlockMap.java | 2 + .../eventbus/AnnotatedSubscriberFinder.java | 7 +- .../util/eventbus/MethodEventHandler.java | 3 +- .../eventbus/MethodHandleEventHandler.java | 7 +- .../java/com/sk89q/worldedit/world/World.java | 1 + .../worldedit/world/block/BaseBlock.java | 1 + .../worldedit/world/block/BlockState.java | 3 +- .../world/block/BlockStateHolder.java | 1 + .../worldedit/world/block/BlockTypes.java | 2 +- 92 files changed, 465 insertions(+), 291 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java index 11d4e340a..e80ff1477 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java @@ -10,9 +10,11 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap; * Class to prevent the above/below being removed from shaded/relocated dependencies via minimization */ final class DoNotMiniseThese { + private final Long2ObjectLinkedOpenHashMap a = null; private final LongArraySet b = null; private final LongIterator c = null; private final LongSet d = null; private final Int2ObjectMap e = null; + } diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java index fc700ce48..8482e0050 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java @@ -313,7 +313,8 @@ public class BukkitWorld extends AbstractWorld { public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 pt) { //FAWE start - allow tree commands to be undone and obey region restrictions return TaskManager.IMP.sync(() -> WorldEditPlugin.getInstance().getBukkitImplAdapter().generateTree(type, editSession, pt, - getWorld())); + getWorld() + )); //FAWE end } diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index 7160bcf4f..cc77ca835 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -306,7 +306,7 @@ public class WorldEditPlugin extends JavaPlugin { "The version of Spigot/Paper you are using doesn't support Tags. The usage of tags with WorldEdit will not work until you update."); } } - + // FAWE start private void setupBiomes() { if (this.adapter.value().isPresent()) { diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java index f60562616..83209aa4c 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java @@ -262,7 +262,7 @@ public interface BukkitImplAdapter extends IBukkitAdapter { * Clears the contents of a Clearable block. * * @param world The world - * @param pt The location + * @param pt The location * @return If a block was cleared */ default boolean clearContainerBlockContents(World world, BlockVector3 pt) { diff --git a/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java b/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java index 6bdac4edf..f42e44bf7 100644 --- a/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java +++ b/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java @@ -68,27 +68,32 @@ import java.util.logging.Logger; public class StubServer implements Server { @Override - public @NotNull String getName() { + public @NotNull + String getName() { return null; } @Override - public @NotNull String getVersion() { + public @NotNull + String getVersion() { return "STUB"; } @Override - public @NotNull String getBukkitVersion() { + public @NotNull + String getBukkitVersion() { return null; } @Override - public @NotNull String getMinecraftVersion() { + public @NotNull + String getMinecraftVersion() { return null; } @Override - public @NotNull Collection getOnlinePlayers() { + public @NotNull + Collection getOnlinePlayers() { return null; } @@ -113,12 +118,14 @@ public class StubServer implements Server { } @Override - public @NotNull String getIp() { + public @NotNull + String getIp() { return null; } @Override - public @NotNull String getWorldType() { + public @NotNull + String getWorldType() { return null; } @@ -163,7 +170,8 @@ public class StubServer implements Server { } @Override - public @NotNull Set getWhitelistedPlayers() { + public @NotNull + Set getWhitelistedPlayers() { return null; } @@ -182,12 +190,14 @@ public class StubServer implements Server { } @Override - public @NotNull String getUpdateFolder() { + public @NotNull + String getUpdateFolder() { return null; } @Override - public @NotNull File getUpdateFolderFile() { + public @NotNull + File getUpdateFolderFile() { return null; } @@ -222,52 +232,62 @@ public class StubServer implements Server { } @Override - public @Nullable Player getPlayer(@NotNull String s) { + public @Nullable + Player getPlayer(@NotNull String s) { return null; } @Override - public @Nullable Player getPlayerExact(@NotNull String s) { + public @Nullable + Player getPlayerExact(@NotNull String s) { return null; } @Override - public @NotNull List matchPlayer(@NotNull String s) { + public @NotNull + List matchPlayer(@NotNull String s) { return null; } @Override - public @Nullable Player getPlayer(@NotNull UUID uuid) { + public @Nullable + Player getPlayer(@NotNull UUID uuid) { return null; } @Override - public @Nullable UUID getPlayerUniqueId(@NotNull String s) { + public @Nullable + UUID getPlayerUniqueId(@NotNull String s) { return null; } @Override - public @NotNull PluginManager getPluginManager() { + public @NotNull + PluginManager getPluginManager() { return null; } @Override - public @NotNull BukkitScheduler getScheduler() { + public @NotNull + BukkitScheduler getScheduler() { return null; } @Override - public @NotNull ServicesManager getServicesManager() { + public @NotNull + ServicesManager getServicesManager() { return null; } @Override - public @NotNull List getWorlds() { + public @NotNull + List getWorlds() { return null; } @Override - public @Nullable World createWorld(@NotNull WorldCreator worldCreator) { + public @Nullable + World createWorld(@NotNull WorldCreator worldCreator) { return null; } @@ -282,17 +302,20 @@ public class StubServer implements Server { } @Override - public @Nullable World getWorld(@NotNull String s) { + public @Nullable + World getWorld(@NotNull String s) { return null; } @Override - public @Nullable World getWorld(@NotNull UUID uuid) { + public @Nullable + World getWorld(@NotNull UUID uuid) { return null; } @Override - public @Nullable World getWorld(@NotNull NamespacedKey namespacedKey) { + public @Nullable + World getWorld(@NotNull NamespacedKey namespacedKey) { return null; } @@ -301,17 +324,20 @@ public class StubServer implements Server { * @deprecated */ @Override - public @Nullable MapView getMap(int i) { + public @Nullable + MapView getMap(int i) { return null; } @Override - public @NotNull MapView createMap(@NotNull World world) { + public @NotNull + MapView createMap(@NotNull World world) { return null; } @Override - public @NotNull ItemStack createExplorerMap( + public @NotNull + ItemStack createExplorerMap( @NotNull World world, @NotNull Location location, @NotNull StructureType structureType @@ -320,7 +346,8 @@ public class StubServer implements Server { } @Override - public @NotNull ItemStack createExplorerMap( + public @NotNull + ItemStack createExplorerMap( @NotNull World world, @NotNull Location location, @NotNull StructureType structureType, @@ -341,12 +368,14 @@ public class StubServer implements Server { } @Override - public @NotNull Logger getLogger() { + public @NotNull + Logger getLogger() { return Logger.getLogger("StubServer"); } @Override - public @Nullable PluginCommand getPluginCommand(@NotNull String s) { + public @Nullable + PluginCommand getPluginCommand(@NotNull String s) { return null; } @@ -366,22 +395,26 @@ public class StubServer implements Server { } @Override - public @NotNull List getRecipesFor(@NotNull ItemStack itemStack) { + public @NotNull + List getRecipesFor(@NotNull ItemStack itemStack) { return null; } @Override - public @Nullable Recipe getRecipe(@NotNull NamespacedKey namespacedKey) { + public @Nullable + Recipe getRecipe(@NotNull NamespacedKey namespacedKey) { return null; } @Override - public @Nullable Recipe getCraftingRecipe(final @NotNull ItemStack[] itemStacks, @NotNull final World world) { + public @Nullable + Recipe getCraftingRecipe(final @NotNull ItemStack[] itemStacks, @NotNull final World world) { return null; } @Override - public @NotNull ItemStack craftItem( + public @NotNull + ItemStack craftItem( final @NotNull ItemStack[] itemStacks, @NotNull final World world, @NotNull final Player player @@ -390,7 +423,8 @@ public class StubServer implements Server { } @Override - public @NotNull Iterator recipeIterator() { + public @NotNull + Iterator recipeIterator() { return null; } @@ -410,7 +444,8 @@ public class StubServer implements Server { } @Override - public @NotNull Map getCommandAliases() { + public @NotNull + Map getCommandAliases() { return null; } @@ -469,22 +504,26 @@ public class StubServer implements Server { * @deprecated */ @Override - public @NotNull OfflinePlayer getOfflinePlayer(@NotNull String s) { + public @NotNull + OfflinePlayer getOfflinePlayer(@NotNull String s) { return null; } @Override - public @Nullable OfflinePlayer getOfflinePlayerIfCached(@NotNull String s) { + public @Nullable + OfflinePlayer getOfflinePlayerIfCached(@NotNull String s) { return null; } @Override - public @NotNull OfflinePlayer getOfflinePlayer(@NotNull UUID uuid) { + public @NotNull + OfflinePlayer getOfflinePlayer(@NotNull UUID uuid) { return null; } @Override - public @NotNull Set getIPBans() { + public @NotNull + Set getIPBans() { return null; } @@ -499,22 +538,26 @@ public class StubServer implements Server { } @Override - public @NotNull Set getBannedPlayers() { + public @NotNull + Set getBannedPlayers() { return null; } @Override - public @NotNull BanList getBanList(BanList.@NotNull Type type) { + public @NotNull + BanList getBanList(BanList.@NotNull Type type) { return null; } @Override - public @NotNull Set getOperators() { + public @NotNull + Set getOperators() { return null; } @Override - public @NotNull GameMode getDefaultGameMode() { + public @NotNull + GameMode getDefaultGameMode() { return null; } @@ -524,37 +567,44 @@ public class StubServer implements Server { } @Override - public @NotNull ConsoleCommandSender getConsoleSender() { + public @NotNull + ConsoleCommandSender getConsoleSender() { return null; } @Override - public @NotNull File getWorldContainer() { + public @NotNull + File getWorldContainer() { return null; } @Override - public @NotNull OfflinePlayer[] getOfflinePlayers() { + public @NotNull + OfflinePlayer[] getOfflinePlayers() { return new OfflinePlayer[0]; } @Override - public @NotNull Messenger getMessenger() { + public @NotNull + Messenger getMessenger() { return null; } @Override - public @NotNull HelpMap getHelpMap() { + public @NotNull + HelpMap getHelpMap() { return null; } @Override - public @NotNull Inventory createInventory(@Nullable InventoryHolder inventoryHolder, @NotNull InventoryType inventoryType) { + public @NotNull + Inventory createInventory(@Nullable InventoryHolder inventoryHolder, @NotNull InventoryType inventoryType) { return null; } @Override - public @NotNull Inventory createInventory( + public @NotNull + Inventory createInventory( @Nullable InventoryHolder inventoryHolder, @NotNull InventoryType inventoryType, @NotNull Component component @@ -569,7 +619,8 @@ public class StubServer implements Server { * @deprecated */ @Override - public @NotNull Inventory createInventory( + public @NotNull + Inventory createInventory( @Nullable InventoryHolder inventoryHolder, @NotNull InventoryType inventoryType, @NotNull String s @@ -578,12 +629,14 @@ public class StubServer implements Server { } @Override - public @NotNull Inventory createInventory(@Nullable InventoryHolder inventoryHolder, int i) throws IllegalArgumentException { + public @NotNull + Inventory createInventory(@Nullable InventoryHolder inventoryHolder, int i) throws IllegalArgumentException { return null; } @Override - public @NotNull Inventory createInventory( + public @NotNull + Inventory createInventory( @Nullable InventoryHolder inventoryHolder, int i, @NotNull Component component @@ -598,13 +651,15 @@ public class StubServer implements Server { * @deprecated */ @Override - public @NotNull Inventory createInventory(@Nullable InventoryHolder inventoryHolder, int i, @NotNull String s) throws + public @NotNull + Inventory createInventory(@Nullable InventoryHolder inventoryHolder, int i, @NotNull String s) throws IllegalArgumentException { return null; } @Override - public @NotNull Merchant createMerchant(@Nullable Component component) { + public @NotNull + Merchant createMerchant(@Nullable Component component) { return null; } @@ -613,7 +668,8 @@ public class StubServer implements Server { * @deprecated */ @Override - public @NotNull Merchant createMerchant(@Nullable String s) { + public @NotNull + Merchant createMerchant(@Nullable String s) { return null; } @@ -648,7 +704,8 @@ public class StubServer implements Server { } @Override - public @NotNull Component motd() { + public @NotNull + Component motd() { return null; } @@ -656,12 +713,14 @@ public class StubServer implements Server { * @deprecated */ @Override - public @NotNull String getMotd() { + public @NotNull + String getMotd() { return null; } @Override - public @Nullable Component shutdownMessage() { + public @Nullable + Component shutdownMessage() { return null; } @@ -669,7 +728,8 @@ public class StubServer implements Server { * @deprecated */ @Override - public @Nullable String getShutdownMessage() { + public @Nullable + String getShutdownMessage() { return null; } @@ -679,27 +739,32 @@ public class StubServer implements Server { } @Override - public @NotNull ItemFactory getItemFactory() { + public @NotNull + ItemFactory getItemFactory() { return null; } @Override - public @NotNull ScoreboardManager getScoreboardManager() { + public @NotNull + ScoreboardManager getScoreboardManager() { return null; } @Override - public @Nullable CachedServerIcon getServerIcon() { + public @Nullable + CachedServerIcon getServerIcon() { return null; } @Override - public @NotNull CachedServerIcon loadServerIcon(@NotNull File file) throws IllegalArgumentException, Exception { + public @NotNull + CachedServerIcon loadServerIcon(@NotNull File file) throws IllegalArgumentException, Exception { return null; } @Override - public @NotNull CachedServerIcon loadServerIcon(@NotNull BufferedImage bufferedImage) throws IllegalArgumentException, + public @NotNull + CachedServerIcon loadServerIcon(@NotNull BufferedImage bufferedImage) throws IllegalArgumentException, Exception { return null; } @@ -725,7 +790,8 @@ public class StubServer implements Server { } @Override - public @NotNull BossBar createBossBar( + public @NotNull + BossBar createBossBar( @Nullable String s, @NotNull BarColor barColor, @NotNull BarStyle barStyle, @@ -735,7 +801,8 @@ public class StubServer implements Server { } @Override - public @NotNull KeyedBossBar createBossBar( + public @NotNull + KeyedBossBar createBossBar( @NotNull NamespacedKey namespacedKey, @Nullable String s, @NotNull BarColor barColor, @@ -746,12 +813,14 @@ public class StubServer implements Server { } @Override - public @NotNull Iterator getBossBars() { + public @NotNull + Iterator getBossBars() { return null; } @Override - public @Nullable KeyedBossBar getBossBar(@NotNull NamespacedKey namespacedKey) { + public @Nullable + KeyedBossBar getBossBar(@NotNull NamespacedKey namespacedKey) { return null; } @@ -761,17 +830,20 @@ public class StubServer implements Server { } @Override - public @Nullable Entity getEntity(@NotNull UUID uuid) { + public @Nullable + Entity getEntity(@NotNull UUID uuid) { return null; } @Override - public @NotNull double[] getTPS() { + public @NotNull + double[] getTPS() { return new double[0]; } @Override - public @NotNull long[] getTickTimes() { + public @NotNull + long[] getTickTimes() { return new long[0]; } @@ -781,37 +853,44 @@ public class StubServer implements Server { } @Override - public @NotNull CommandMap getCommandMap() { + public @NotNull + CommandMap getCommandMap() { return null; } @Override - public @Nullable Advancement getAdvancement(@NotNull NamespacedKey namespacedKey) { + public @Nullable + Advancement getAdvancement(@NotNull NamespacedKey namespacedKey) { return null; } @Override - public @NotNull Iterator advancementIterator() { + public @NotNull + Iterator advancementIterator() { return null; } @Override - public @NotNull BlockData createBlockData(@NotNull Material material) { + public @NotNull + BlockData createBlockData(@NotNull Material material) { return null; } @Override - public @NotNull BlockData createBlockData(@NotNull Material material, @Nullable Consumer consumer) { + public @NotNull + BlockData createBlockData(@NotNull Material material, @Nullable Consumer consumer) { return null; } @Override - public @NotNull BlockData createBlockData(@NotNull String s) throws IllegalArgumentException { + public @NotNull + BlockData createBlockData(@NotNull String s) throws IllegalArgumentException { return null; } @Override - public @NotNull BlockData createBlockData(@Nullable Material material, @Nullable String s) throws IllegalArgumentException { + public @NotNull + BlockData createBlockData(@Nullable Material material, @Nullable String s) throws IllegalArgumentException { return null; } @@ -821,17 +900,20 @@ public class StubServer implements Server { } @Override - public @NotNull Iterable> getTags(@NotNull String s, @NotNull Class aClass) { + public @NotNull + Iterable> getTags(@NotNull String s, @NotNull Class aClass) { return null; } @Override - public @Nullable LootTable getLootTable(@NotNull NamespacedKey namespacedKey) { + public @Nullable + LootTable getLootTable(@NotNull NamespacedKey namespacedKey) { return null; } @Override - public @NotNull List selectEntities(@NotNull CommandSender commandSender, @NotNull String s) throws + public @NotNull + List selectEntities(@NotNull CommandSender commandSender, @NotNull String s) throws IllegalArgumentException { return null; } @@ -840,12 +922,14 @@ public class StubServer implements Server { * @deprecated */ @Override - public @NotNull UnsafeValues getUnsafe() { + public @NotNull + UnsafeValues getUnsafe() { return null; } @Override - public @NotNull Spigot spigot() { + public @NotNull + Spigot spigot() { return null; } @@ -865,22 +949,26 @@ public class StubServer implements Server { } @Override - public @NotNull String getPermissionMessage() { + public @NotNull + String getPermissionMessage() { return null; } @Override - public @NotNull PlayerProfile createProfile(@NotNull UUID uuid) { + public @NotNull + PlayerProfile createProfile(@NotNull UUID uuid) { return null; } @Override - public @NotNull PlayerProfile createProfile(@NotNull String s) { + public @NotNull + PlayerProfile createProfile(@NotNull String s) { return null; } @Override - public @NotNull PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String s) { + public @NotNull + PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String s) { return null; } @@ -895,17 +983,20 @@ public class StubServer implements Server { } @Override - public @NotNull MobGoals getMobGoals() { + public @NotNull + MobGoals getMobGoals() { return null; } @Override - public @NotNull DatapackManager getDatapackManager() { + public @NotNull + DatapackManager getDatapackManager() { return null; } @Override - public @NotNull Iterable audiences() { + public @NotNull + Iterable audiences() { return null; } @@ -915,7 +1006,8 @@ public class StubServer implements Server { } @Override - public @NotNull Set getListeningPluginChannels() { + public @NotNull + Set getListeningPluginChannels() { return null; } diff --git a/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java b/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java index 6c28e34c0..eb17c0f37 100644 --- a/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java +++ b/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java @@ -32,8 +32,8 @@ import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.entity.EntityTypes; import com.sk89q.worldedit.world.registry.Registries; import org.enginehub.piston.CommandManager; -import javax.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.EnumMap; @@ -164,7 +164,8 @@ class CLIPlatform extends AbstractPlatform { } @Override - public @Nonnull RelighterFactory getRelighterFactory() { + public @Nonnull + RelighterFactory getRelighterFactory() { return (_a, _b, _c) -> NullRelighter.INSTANCE; } diff --git a/worldedit-core/build.gradle.kts b/worldedit-core/build.gradle.kts index 8277057b9..72ae33026 100644 --- a/worldedit-core/build.gradle.kts +++ b/worldedit-core/build.gradle.kts @@ -11,7 +11,7 @@ applyPlatformAndCoreConfiguration() dependencies { constraints { - implementation( "org.yaml:snakeyaml") { + implementation("org.yaml:snakeyaml") { version { strictly("1.28") } because("Bukkit provides SnakeYaml") } diff --git a/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/DocumentationPrinter.kt b/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/DocumentationPrinter.kt index 7a7afc18b..dcaa400f7 100644 --- a/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/DocumentationPrinter.kt +++ b/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/DocumentationPrinter.kt @@ -291,10 +291,10 @@ Other Permissions } private fun String.makeRstSafe(lineJoiner: String) = trim() - .replace("\"", "\\\"").replace("\n", "\n" + " ".repeat(2)) - .lineSequence() - .map { line -> line.ifBlank { "" } } - .joinToString(separator = lineJoiner) + .replace("\"", "\\\"").replace("\n", "\n" + " ".repeat(2)) + .lineSequence() + .map { line -> line.ifBlank { "" } } + .joinToString(separator = lineJoiner) private fun linkSafe(text: String) = text.replace(" ", "-") diff --git a/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/RstWorldEditText.kt b/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/RstWorldEditText.kt index 87dadef87..aa1ec4ec2 100644 --- a/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/RstWorldEditText.kt +++ b/worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/RstWorldEditText.kt @@ -53,8 +53,8 @@ private fun formatAsRst(component: Component, currentDeco: String? = null): Char deco?.let { require(currentDeco == null) { "Nested decorations are hell in RST. \n" + - "Existing: $currentDeco; New: $deco\n" + - "Offender: ${TextHelper.reduceToText(component)}" + "Existing: $currentDeco; New: $deco\n" + + "Offender: ${TextHelper.reduceToText(component)}" } content.rstDeco(deco) } diff --git a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java index d4084ccfd..929354ab9 100644 --- a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java +++ b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java @@ -37,8 +37,9 @@ import java.util.Map; /** * A mob spawner block. + * * @deprecated WorldEdit does not handle interpreting NBT, - * deprecated for removal without replacement + * deprecated for removal without replacement */ @Deprecated(forRemoval = true) public class MobSpawnerBlock extends BaseBlock { @@ -69,7 +70,7 @@ public class MobSpawnerBlock extends BaseBlock { * Construct the mob spawner block. * * @param blockState The block state - * @param mobType mob type + * @param mobType mob type */ public MobSpawnerBlock(BlockState blockState, String mobType) { super(blockState); @@ -140,7 +141,8 @@ public class MobSpawnerBlock extends BaseBlock { if (spawnPotentials == null) { values.put("SpawnPotentials", new ListTag(CompoundTag.class, ImmutableList.of( new CompoundTag(ImmutableMap.of("Weight", new IntTag(1), "Entity", - new CompoundTag(ImmutableMap.of("id", new StringTag(mobType)))))))); + new CompoundTag(ImmutableMap.of("id", new StringTag(mobType))) + ))))); } else { values.put("SpawnPotentials", new ListTag(CompoundTag.class, spawnPotentials.getValue())); } diff --git a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java index 3b54302fc..2817365ff 100644 --- a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java +++ b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java @@ -33,25 +33,25 @@ import java.util.Map; * Represents a sign block. * * @deprecated WorldEdit does not handle interpreting NBT, - * deprecated for removal without replacement + * deprecated for removal without replacement */ @Deprecated(forRemoval = true) public class SignBlock extends BaseBlock { private String[] text; - private static String EMPTY = "{\"text\":\"\"}"; + private static String EMPTY = "{\"text\":\"\"}"; /** * Construct the sign with text. * * @param blockState The block state - * @param text lines of text + * @param text lines of text */ public SignBlock(BlockState blockState, String[] text) { super(blockState); if (text == null) { - this.text = new String[] { EMPTY, EMPTY, EMPTY, EMPTY }; + this.text = new String[]{EMPTY, EMPTY, EMPTY, EMPTY}; return; } for (int i = 0; i < text.length; i++) { @@ -115,7 +115,7 @@ public class SignBlock extends BaseBlock { Tag t; - text = new String[] { EMPTY, EMPTY, EMPTY, EMPTY }; + text = new String[]{EMPTY, EMPTY, EMPTY, EMPTY}; t = values.get("id"); if (!(t instanceof StringTag) || !((StringTag) t).getValue().equals(getNbtId())) { diff --git a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java index e5ea3da6f..a60ffbc09 100644 --- a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java +++ b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java @@ -33,7 +33,7 @@ import java.util.Map; * A skull block. * * @deprecated WorldEdit does not handle interpreting NBT, - * deprecated for removal without replacement + * deprecated for removal without replacement */ @Deprecated(forRemoval = true) public class SkullBlock extends BaseBlock { @@ -42,6 +42,7 @@ public class SkullBlock extends BaseBlock { /** * Construct the skull block with a default type of skelton. + * * @param state BlockState to set */ public SkullBlock(BlockState state) { @@ -52,8 +53,9 @@ public class SkullBlock extends BaseBlock { /** * Construct the skull block with a given rotation and owner. * The type is assumed to be player unless owner is null or empty. + * * @param blockState BlockState to set - * @param owner name of player + * @param owner name of player */ public SkullBlock(BlockState blockState, String owner) { super(blockState); @@ -62,6 +64,7 @@ public class SkullBlock extends BaseBlock { /** * Set the skull's owner. Automatically sets type to player if not empty or null. + * * @param owner player name to set the skull to */ public void setOwner(String owner) { @@ -78,6 +81,7 @@ public class SkullBlock extends BaseBlock { /** * Get the skull's owner. Returns null if unset. + * * @return player name or null */ public String getOwner() { @@ -123,4 +127,5 @@ public class SkullBlock extends BaseBlock { setOwner(((CompoundTag) t).getValue().get("Name").getValue().toString()); } } + } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java index d4e4b405c..078f00a80 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/Fawe.java @@ -351,7 +351,8 @@ public class Fawe { * Non-api. Handles an input FAWE exception if not already handled, given the input boolean array. * Looks at the {@link FaweException.Type} and decides what to do (rethrows if we want to attempt to show the error to the * player, outputs to console where necessary). - * @param faweExceptionReasonsUsed boolean array that should be cached where this method is called from of length {@code + * + * @param faweExceptionReasonsUsed boolean array that should be cached where this method is called from of length {@code * FaweException.Type.values().length} * @param e {@link FaweException} to handle * @param logger {@link Logger} of the calling class diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweAPI.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweAPI.java index 36be7b077..56366c888 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweAPI.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweAPI.java @@ -277,7 +277,8 @@ public class FaweAPI { ); RegionWrapper boundsPlus = new RegionWrapper(bounds.minX - 64, bounds.maxX + 512, bounds.minY, bounds.maxY, bounds.minZ - 64, - bounds.maxZ + 512); + bounds.maxZ + 512 + ); HashSet regionSet = Sets.newHashSet(bounds); ArrayList result = new ArrayList<>(); for (File file : files) { @@ -285,7 +286,8 @@ public class FaweAPI { DiskStorageHistory dsh = new DiskStorageHistory(world, uuid, Integer.parseInt(file.getName().split("\\.")[0])); SimpleChangeSetSummary summary = dsh.summarize(boundsPlus, shallow); RegionWrapper region = new RegionWrapper(summary.minX, summary.maxX, extent.getMinY(), extent.getMaxY(), summary.minZ, - summary.maxZ); + summary.maxZ + ); boolean encompassed = false; boolean isIn = false; for (RegionWrapper allowed : regionSet) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java index 1c724e3a4..3b752e356 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java @@ -141,9 +141,11 @@ public enum FaweCache implements Trimable { Caption.of("fawe.cancel.worldedit.cancel.reason.no.region"), Type.NO_REGION ); - public static final FaweException OUTSIDE_REGION = new FaweException(Caption.of( - "fawe.cancel.worldedit.cancel.reason.outside.region"), - Type.OUTSIDE_REGION); + public static final FaweException OUTSIDE_REGION = new FaweException( + Caption.of( + "fawe.cancel.worldedit.cancel.reason.outside.region"), + Type.OUTSIDE_REGION + ); public static final FaweException MAX_CHECKS = new FaweException( Caption.of("fawe.cancel.worldedit.cancel.reason.max" + ".checks"), Type.MAX_CHECKS @@ -156,16 +158,20 @@ public enum FaweCache implements Trimable { Caption.of("fawe.cancel.worldedit.cancel.reason.low" + ".memory"), Type.LOW_MEMORY ); - public static final FaweException MAX_ENTITIES = new FaweException(Caption.of( - "fawe.cancel.worldedit.cancel.reason.max.entities"), - Type.MAX_ENTITIES); + public static final FaweException MAX_ENTITIES = new FaweException( + Caption.of( + "fawe.cancel.worldedit.cancel.reason.max.entities"), + Type.MAX_ENTITIES + ); public static final FaweException MAX_TILES = new FaweException(Caption.of( "fawe.cancel.worldedit.cancel.reason.max.tiles", Type.MAX_TILES )); - public static final FaweException MAX_ITERATIONS = new FaweException(Caption.of( - "fawe.cancel.worldedit.cancel.reason.max.iterations"), - Type.MAX_ITERATIONS); + public static final FaweException MAX_ITERATIONS = new FaweException( + Caption.of( + "fawe.cancel.worldedit.cancel.reason.max.iterations"), + Type.MAX_ITERATIONS + ); /* thread cache diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java index 5cfd7d9f6..2575683e1 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java @@ -4,7 +4,6 @@ import com.fastasyncworldedit.core.command.tool.ResettableTool; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; -import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.command.tool.brush.Brush; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.function.pattern.Pattern; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CopyPastaBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CopyPastaBrush.java index 35f6785fb..d7e331107 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CopyPastaBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CopyPastaBrush.java @@ -79,7 +79,8 @@ public class CopyPastaBrush implements Brush, ResettableTool { // Add origin mask.test(position); RecursiveVisitor visitor = new RecursiveVisitor(mask, new NullRegionFunction(), (int) size, editSession.getMinY(), - editSession.getMaxY()); + editSession.getMaxY() + ); visitor.visit(position); Operations.completeBlindly(visitor); // Build the clipboard diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/HeightBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/HeightBrush.java index 2a92e7bb8..be001af8f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/HeightBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/HeightBrush.java @@ -27,8 +27,10 @@ public class HeightBrush implements Brush { public final boolean layers; public final boolean smooth; - public HeightBrush(InputStream stream, int rotation, double yscale, boolean layers, boolean smooth, Clipboard clipboard, - int minY, int maxY) { + public HeightBrush( + InputStream stream, int rotation, double yscale, boolean layers, boolean smooth, Clipboard clipboard, + int minY, int maxY + ) { this(stream, rotation, yscale, layers, smooth, clipboard, ScalableHeightMap.Shape.CONE, minY, maxY); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/LayerBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/LayerBrush.java index e2db42374..c71ff10d8 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/LayerBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/LayerBrush.java @@ -41,7 +41,8 @@ public class LayerBrush implements Brush { final RadiusMask radius = new RadiusMask(0, (int) size); visitor = new RecursiveVisitor(new MaskIntersection(adjacent, solid, radius), funcion -> true, Integer.MAX_VALUE, editSession.getMinY(), - editSession.getMaxY()); + editSession.getMaxY() + ); visitor.visit(position); visitor.setDirections(Arrays.asList(BreadthFirstSearch.DIAGONAL_DIRECTIONS)); Operations.completeBlindly(visitor); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/ScatterBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/ScatterBrush.java index 3d8f15aa3..f834bc26c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/ScatterBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/ScatterBrush.java @@ -53,7 +53,8 @@ public class ScatterBrush implements Brush { final int distance = Math.min((int) size, this.distance); RecursiveVisitor visitor = new RecursiveVisitor(new MaskIntersection(radius, surface), function -> true, - Integer.MAX_VALUE, editSession.getMinY(), editSession.getMaxY()); + Integer.MAX_VALUE, editSession.getMinY(), editSession.getMaxY() + ); visitor.visit(position); visitor.setDirections(Arrays.asList(BreadthFirstSearch.DIAGONAL_DIRECTIONS)); Operations.completeBlindly(visitor); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/StencilBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/StencilBrush.java index 7bb17ad84..969a39fd4 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/StencilBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/StencilBrush.java @@ -21,8 +21,10 @@ public class StencilBrush extends HeightBrush { private final boolean onlyWhite; - public StencilBrush(InputStream stream, int rotation, double yscale, boolean onlyWhite, Clipboard clipboard, int minY, - int maxY) { + public StencilBrush( + InputStream stream, int rotation, double yscale, boolean onlyWhite, Clipboard clipboard, int minY, + int maxY + ) { super(stream, rotation, yscale, false, true, clipboard, minY, maxY); this.onlyWhite = onlyWhite; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/SurfaceSpline.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/SurfaceSpline.java index 0b58b84ff..67e74660b 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/SurfaceSpline.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/SurfaceSpline.java @@ -6,7 +6,6 @@ import com.fastasyncworldedit.core.math.MutableBlockVector3; import com.fastasyncworldedit.core.util.MathMan; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; -import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.command.tool.brush.Brush; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector3; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/TransformFactory.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/TransformFactory.java index 40f0b65a7..a87c305cc 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/TransformFactory.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/TransformFactory.java @@ -1,12 +1,12 @@ package com.fastasyncworldedit.core.extension.factory; import com.fastasyncworldedit.core.configuration.Caption; -import com.fastasyncworldedit.core.extension.factory.parser.transform.RichTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.Linear3DTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.LinearTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.OffsetTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.PatternTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.RandomTransformParser; +import com.fastasyncworldedit.core.extension.factory.parser.transform.RichTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.RotateTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.ScaleTransformParser; import com.fastasyncworldedit.core.extension.factory.parser.transform.SpreadTransformParser; @@ -93,7 +93,7 @@ public class TransformFactory extends AbstractFactory { * Parses a transform without considering parsing through the {@link RichTransformParser}, therefore not accepting * "richer" parsing where & and , are used. Exists to prevent stack overflows. * - * @param input input string + * @param input input string * @param context input context * @return parsed result * @throws InputParseException if no result found diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java index d5a8dc909..8fbcb4ae0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java @@ -5,13 +5,9 @@ import com.fastasyncworldedit.core.function.mask.AdjacentAnyMask; import com.fastasyncworldedit.core.function.mask.AdjacentMask; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; -import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.extension.platform.Locatable; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.mask.Mask; -import com.sk89q.worldedit.world.World; import javax.annotation.Nonnull; import java.util.stream.Stream; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/WallMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/WallMaskParser.java index 56e3191d0..12b9b240e 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/WallMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/WallMaskParser.java @@ -2,7 +2,6 @@ package com.fastasyncworldedit.core.extension.factory.parser.mask; import com.fastasyncworldedit.core.extension.factory.parser.RichParser; import com.fastasyncworldedit.core.function.mask.WallMask; -import com.google.common.collect.ImmutableList; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; @@ -10,7 +9,6 @@ import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; import javax.annotation.Nonnull; -import java.util.List; import java.util.stream.Stream; public class WallMaskParser extends RichParser { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java index ea2a37b6b..c40d74c8e 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java @@ -7,7 +7,6 @@ import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java index 2250c982a..a827c20f7 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java @@ -7,7 +7,6 @@ import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java index 688eeebd5..bf56c1ddb 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java @@ -6,7 +6,6 @@ import com.fastasyncworldedit.core.function.pattern.RelativePattern; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java index 45b3dda76..ef6c3b2c4 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java @@ -7,7 +7,6 @@ import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java index ab5a882ef..7bb255332 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java @@ -7,7 +7,6 @@ import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java index f5fe4f70b..75eb6261d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java @@ -1,8 +1,8 @@ package com.fastasyncworldedit.core.extension.factory.parser.transform; import com.fastasyncworldedit.core.extension.factory.parser.RichParser; -import com.fastasyncworldedit.core.extent.transform.OffsetTransform; import com.fastasyncworldedit.core.extent.ResettableExtent; +import com.fastasyncworldedit.core.extent.transform.OffsetTransform; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/LimitExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/LimitExtent.java index 1bc15b1ee..2dbac5afa 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/LimitExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/LimitExtent.java @@ -1,6 +1,5 @@ package com.fastasyncworldedit.core.extent; -import com.fastasyncworldedit.core.FaweCache; import com.fastasyncworldedit.core.extent.filter.block.ExtentFilterBlock; import com.fastasyncworldedit.core.function.generator.GenBase; import com.fastasyncworldedit.core.function.generator.Resource; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java index 5d4d7d478..4cb30c674 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java @@ -27,16 +27,13 @@ import com.sk89q.worldedit.util.Countable; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.world.biome.BiomeType; -import com.sk89q.worldedit.world.biome.BiomeTypes; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockType; -import com.sk89q.worldedit.world.block.BlockTypes; import javax.annotation.Nullable; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.Set; import java.util.concurrent.Future; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/ResettableExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/ResettableExtent.java index b9122d2f6..0e3798415 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/ResettableExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/ResettableExtent.java @@ -2,7 +2,6 @@ package com.fastasyncworldedit.core.extent; import com.fastasyncworldedit.core.util.ExtentTraverser; import com.fastasyncworldedit.core.util.ReflectionUtils; -import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.math.BlockVector3; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java index 6821ebd48..c7d5d96a0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java @@ -1,7 +1,6 @@ package com.fastasyncworldedit.core.extent.clipboard.io.schematic; import com.fastasyncworldedit.core.FaweCache; -import com.fastasyncworldedit.core.math.MutableBlockVector3; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.IntTag; import com.sk89q.jnbt.ListTag; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ArrayHeightMap.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ArrayHeightMap.java index 6bce75ba1..4567e0341 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ArrayHeightMap.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ArrayHeightMap.java @@ -15,8 +15,8 @@ public class ArrayHeightMap extends ScalableHeightMap { * New height map represented by byte array[][] of values x*z to be scaled given a set size * * @param height array of height values - * @param minY min y value allowed to be set. Inclusive. - * @param maxY max y value allowed to be set. Inclusive. + * @param minY min y value allowed to be set. Inclusive. + * @param maxY max y value allowed to be set. Inclusive. */ public ArrayHeightMap(byte[][] height, int minY, int maxY) { super(minY, maxY); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightMap.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightMap.java index e627e07c9..21d61b897 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightMap.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightMap.java @@ -138,8 +138,10 @@ public interface HeightMap { double raiseScaled = diff * (raisePow * sizePowInv); double raiseScaledAbs = Math.abs(raiseScaled); int random = - ThreadLocalRandom.current().nextInt(maxY + 1 - minY) - minY < (int) ((Math.ceil(raiseScaledAbs) - Math.floor( - raiseScaledAbs)) * (maxY + 1 - minY)) ? (diff > 0 ? 1 : -1) : 0; + ThreadLocalRandom + .current() + .nextInt(maxY + 1 - minY) - minY < (int) ((Math.ceil(raiseScaledAbs) - Math.floor( + raiseScaledAbs)) * (maxY + 1 - minY)) ? (diff > 0 ? 1 : -1) : 0; int raiseScaledInt = (int) raiseScaled + random; newData[index] = height + raiseScaledInt; } @@ -181,8 +183,10 @@ public interface HeightMap { } raise = (yscale * raise); int random = - ThreadLocalRandom.current().nextInt(maxY + 1 - minY) - minY < (int) ((raise - (int) raise) * (maxY - minY + 1)) - ? 1 : 0; + ThreadLocalRandom + .current() + .nextInt(maxY + 1 - minY) - minY < (int) ((raise - (int) raise) * (maxY - minY + 1)) + ? 1 : 0; int newHeight = height + (int) raise + random; newData[index] = newHeight; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ScalableHeightMap.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ScalableHeightMap.java index ff70dcf35..ba5ef6d5c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ScalableHeightMap.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/ScalableHeightMap.java @@ -92,7 +92,7 @@ public class ScalableHeightMap implements HeightMap { highestY = y + 1; } } - int pointHeight = Math.min(clipMaxY, ((maxY - minY + 1 ) * (highestY - clipMinY)) / clipHeight); + int pointHeight = Math.min(clipMaxY, ((maxY - minY + 1) * (highestY - clipMinY)) / clipHeight); int x = xx - clipMinX; int z = zz - clipMinZ; heightArray[x][z] = (byte) pointHeight; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/OffsetTransform.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/OffsetTransform.java index 685eef5f5..a8ade6df1 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/OffsetTransform.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/OffsetTransform.java @@ -17,9 +17,9 @@ public class OffsetTransform extends ResettableExtent { * New instance * * @param parent extent to set to - * @param dx offset x - * @param dy offset y - * @param dz offset z + * @param dx offset x + * @param dy offset y + * @param dz offset z */ public OffsetTransform(Extent parent, int dx, int dy, int dz) { super(parent); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/RandomOffsetTransform.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/RandomOffsetTransform.java index 4e80c72d7..268255bf2 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/RandomOffsetTransform.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/transform/RandomOffsetTransform.java @@ -20,9 +20,9 @@ public class RandomOffsetTransform extends ResettableExtent { * New instance * * @param parent extent to set to - * @param dx range of x values to choose from (0 -> x) - * @param dy range of y values to choose from (0 -> y) - * @param dz range of z values to choose from (0 -> z) + * @param dx range of x values to choose from (0 -> x) + * @param dy range of y values to choose from (0 -> y) + * @param dz range of z values to choose from (0 -> z) */ public RandomOffsetTransform(Extent parent, int dx, int dy, int dz) { super(parent); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/exception/FaweException.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/exception/FaweException.java index 3c0e462a5..04dee6c4a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/exception/FaweException.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/exception/FaweException.java @@ -48,6 +48,7 @@ public class FaweException extends RuntimeException { /** * Get the {@link FaweException.Type} + * * @return the {@link FaweException.Type} */ public Type getType() { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java index 81256fdcb..3958e09a6 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java @@ -356,7 +356,7 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet { minSectionIndex = layer; if (biomes != null) { BiomeType[] tmpBiomes = new BiomeType[sectionCount * 64]; - System.arraycopy(biomes, 0, tmpBiomes, 64*diff, biomes.length); + System.arraycopy(biomes, 0, tmpBiomes, 64 * diff, biomes.length); biomes = tmpBiomes; } if (light != null) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java index bf3a12bf5..95ba886ca 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java @@ -333,19 +333,29 @@ public class ChunkHolder> implements IQueueChunk { @Override public void flushLightToGet(ChunkHolder chunk) { chunk.chunkExisting.setLightingToGet(chunk.chunkSet.getLight(), chunk.chunkSet.getMinSectionIndex(), - chunk.chunkSet.getMaxSectionIndex()); + chunk.chunkSet.getMaxSectionIndex() + ); chunk.chunkExisting.setSkyLightingToGet(chunk.chunkSet.getSkyLight(), chunk.chunkSet.getMinSectionIndex(), - chunk.chunkSet.getMaxSectionIndex()); + chunk.chunkSet.getMaxSectionIndex() + ); } @Override public void setLightingToGet(ChunkHolder chunk, char[][] lighting) { - chunk.chunkExisting.setLightingToGet(lighting, chunk.chunkSet.getMinSectionIndex(), chunk.chunkSet.getMaxSectionIndex()); + chunk.chunkExisting.setLightingToGet( + lighting, + chunk.chunkSet.getMinSectionIndex(), + chunk.chunkSet.getMaxSectionIndex() + ); } @Override public void setSkyLightingToGet(ChunkHolder chunk, char[][] lighting) { - chunk.chunkExisting.setSkyLightingToGet(lighting, chunk.chunkSet.getMinSectionIndex(), chunk.chunkSet.getMaxSectionIndex()); + chunk.chunkExisting.setSkyLightingToGet( + lighting, + chunk.chunkSet.getMinSectionIndex(), + chunk.chunkSet.getMaxSectionIndex() + ); } @Override @@ -486,12 +496,20 @@ public class ChunkHolder> implements IQueueChunk { @Override public void setLightingToGet(ChunkHolder chunk, char[][] lighting) { - chunk.chunkExisting.setLightingToGet(lighting, chunk.chunkSet.getMinSectionIndex(), chunk.chunkSet.getMaxSectionIndex()); + chunk.chunkExisting.setLightingToGet( + lighting, + chunk.chunkSet.getMinSectionIndex(), + chunk.chunkSet.getMaxSectionIndex() + ); } @Override public void setSkyLightingToGet(ChunkHolder chunk, char[][] lighting) { - chunk.chunkExisting.setSkyLightingToGet(lighting, chunk.chunkSet.getMinSectionIndex(), chunk.chunkSet.getMaxSectionIndex()); + chunk.chunkExisting.setSkyLightingToGet( + lighting, + chunk.chunkSet.getMinSectionIndex(), + chunk.chunkSet.getMaxSectionIndex() + ); } @Override diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/preloader/AsyncPreloader.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/preloader/AsyncPreloader.java index 51bf98c93..43d18f3a7 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/preloader/AsyncPreloader.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/preloader/AsyncPreloader.java @@ -75,7 +75,10 @@ public class AsyncPreloader implements Preloader, Runnable { } synchronized (existing) { // Ensure key & value are mutated together existing.setKey(world); - existing.setValue(ImmutableSet.copyOf(Iterables.limit(region.getChunks(), Settings.IMP.QUEUE.PRELOAD_CHUNK_COUNT))); + existing.setValue(ImmutableSet.copyOf(Iterables.limit( + region.getChunks(), + Settings.IMP.QUEUE.PRELOAD_CHUNK_COUNT + ))); } synchronized (update) { update.notify(); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/DelegateTextureUtil.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/DelegateTextureUtil.java index ff89310e9..23fc05f4d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/DelegateTextureUtil.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/DelegateTextureUtil.java @@ -4,7 +4,6 @@ package com.fastasyncworldedit.core.util; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BlockType; -import java.awt.image.BufferedImage; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java index 1486286f7..94f3970c0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java @@ -6,13 +6,13 @@ import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.FaweRegionExtent; import com.fastasyncworldedit.core.extent.HistoryExtent; +import com.fastasyncworldedit.core.extent.LimitExtent; import com.fastasyncworldedit.core.extent.MultiRegionExtent; import com.fastasyncworldedit.core.extent.NullExtent; import com.fastasyncworldedit.core.extent.SingleRegionExtent; import com.fastasyncworldedit.core.extent.SlowExtent; import com.fastasyncworldedit.core.extent.StripNBTExtent; import com.fastasyncworldedit.core.extent.processor.HeightmapProcessor; -import com.fastasyncworldedit.core.extent.LimitExtent; import com.fastasyncworldedit.core.extent.processor.lighting.NullRelighter; import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.fastasyncworldedit.core.extent.processor.lighting.RelightProcessor; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java index 9201f81f2..457f24a75 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java @@ -472,7 +472,8 @@ public class MainUtil { * @param z New Z coordinate * @return New tag */ - @Nonnull public static CompoundTag setPosition(@Nonnull CompoundTag tag, int x, int y, int z) { + @Nonnull + public static CompoundTag setPosition(@Nonnull CompoundTag tag, int x, int y, int z) { Map value = new HashMap<>(tag.getValue()); value.put("x", new IntTag(x)); value.put("y", new IntTag(y)); @@ -487,7 +488,8 @@ public class MainUtil { * @param entity Entity * @return New tag */ - @Nonnull public static CompoundTag setEntityInfo(@Nonnull CompoundTag tag, @Nonnull Entity entity) { + @Nonnull + public static CompoundTag setEntityInfo(@Nonnull CompoundTag tag, @Nonnull Entity entity) { Map map = new HashMap<>(tag.getValue()); map.put("Id", new StringTag(entity.getState().getType().getId())); ListTag pos = (ListTag) map.get("Pos"); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index b834508dc..45b088bab 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1999,7 +1999,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { // There are boundaries that the routine needs to stay in Mask mask = new MaskIntersection( - new BoundedHeightMask(minY, Math.min(origin.getBlockY(), maxY)), + new BoundedHeightMask(minY, Math.min(origin.getBlockY(), maxY)), new RegionMask(new EllipsoidRegion(null, origin, Vector3.at(radius, radius, radius))), blockMask ); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java b/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java index f97735dee..9989c3ad9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -20,6 +20,7 @@ package com.sk89q.worldedit; import com.fastasyncworldedit.core.configuration.Caption; +import com.fastasyncworldedit.core.extension.factory.TransformFactory; import com.fastasyncworldedit.core.extent.ResettableExtent; import com.google.common.base.Throwables; import com.google.common.collect.HashMultimap; @@ -38,7 +39,6 @@ import com.sk89q.worldedit.extension.factory.BlockFactory; import com.sk89q.worldedit.extension.factory.ItemFactory; import com.sk89q.worldedit.extension.factory.MaskFactory; import com.sk89q.worldedit.extension.factory.PatternFactory; -import com.fastasyncworldedit.core.extension.factory.TransformFactory; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Capability; import com.sk89q.worldedit.extension.platform.Platform; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java index a572845e3..d71f40eaa 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java @@ -1500,4 +1500,5 @@ public class BrushCommands { player.print(Caption.of("worldedit.brush.operation.equip", TextComponent.of(factory.toString()))); ToolCommands.sendUnbindInstruction(player, UNBIND_COMMAND_COMPONENT); } + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java index 4ec61179c..493e11e94 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java @@ -28,7 +28,6 @@ import com.fastasyncworldedit.core.extent.clipboard.DiskOptimizedClipboard; import com.fastasyncworldedit.core.extent.clipboard.MultiClipboardHolder; import com.fastasyncworldedit.core.extent.clipboard.ReadOnlyClipboard; import com.fastasyncworldedit.core.extent.clipboard.URIClipboardHolder; -import com.fastasyncworldedit.core.internal.exception.FaweException; import com.fastasyncworldedit.core.internal.io.FastByteArrayOutputStream; import com.fastasyncworldedit.core.object.FaweLimit; import com.fastasyncworldedit.core.util.ImgurUtility; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java index 9439832b8..73230bf89 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java @@ -75,9 +75,9 @@ public class ExpandCommands { command.condition(new PermissionCondition(ImmutableSet.of("worldedit.selection.expand"))); command.addPart(SubCommandPart.builder( - Caption.of("vert"), - TextComponent.of("Vertical expansion sub-command") - ) + Caption.of("vert"), + TextComponent.of("Vertical expansion sub-command") + ) .withCommands(ImmutableSet.of(createVertCommand(commandManager))) .optional() .build()); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java index 6d5775d5e..75ef2fb31 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java @@ -51,7 +51,6 @@ import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.util.TreeGenerator.TreeType; import com.sk89q.worldedit.util.formatting.text.TextComponent; -import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BlockType; import org.enginehub.piston.annotation.Command; @@ -637,11 +636,14 @@ public class GenerationCommands { ((AbstractExtentMask) mask).setExtent(editSession); } checkCommandArgument(minY >= editSession.getMinY(), Caption.of("fawe.error.outside-range-lower", "miny", - editSession.getMinY())); + editSession.getMinY() + )); checkCommandArgument(maxY <= editSession.getMaxY(), Caption.of("fawe.error.outside-range-upper", "maxy", - editSession.getMaxY())); + editSession.getMaxY() + )); checkCommandArgument(minY < maxY, Caption.of("fawe.error.argument-size-mismatch", "miny", - "maxy")); + "maxy" + )); editSession.addOre(region, mask, material, size, freq, rarity, minY, maxY); actor.print(Caption.of("fawe.worldedit.visitor.visitor.block", editSession.getBlockChangeCount())); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/LegacySnapshotCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/LegacySnapshotCommands.java index 20b96a0e7..488fb571c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/LegacySnapshotCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/LegacySnapshotCommands.java @@ -147,8 +147,8 @@ class LegacySnapshotCommands { if (snapshot == null) { actor.print(Caption.of( - "worldedit.snapshot.none-before", - TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) + "worldedit.snapshot.none-before", + TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) ) ); } else { @@ -167,8 +167,8 @@ class LegacySnapshotCommands { Snapshot snapshot = config.snapshotRepo.getSnapshotAfter(date, world.getName()); if (snapshot == null) { actor.print(Caption.of( - "worldedit.snapshot.none-after", - TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) + "worldedit.snapshot.none-after", + TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) ) ); } else { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java index 1a72af85b..ef5aac33f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java @@ -320,10 +320,10 @@ public class RegionCommands { ) throws WorldEditException { if (from == null) { from = new ExistingBlockMask(editSession); - //FAWE start > the mask will have been initialised with a WorldWrapper extent (very bad/slow + //FAWE start > the mask will have been initialised with a WorldWrapper extent (very bad/slow } else if (from instanceof AbstractExtentMask) { ((AbstractExtentMask) from).setExtent(editSession); - //FAWE end + //FAWE end } if (from instanceof AbstractExtentMask) { ((AbstractExtentMask) from).setExtent(editSession); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SnapshotCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SnapshotCommands.java index 916ceb7b0..66cfdd853 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SnapshotCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SnapshotCommands.java @@ -272,8 +272,8 @@ public class SnapshotCommands { if (snapshot == null) { actor.print(Caption.of( - "worldedit.snapshot.none-before", - TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) + "worldedit.snapshot.none-before", + TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) ) ); } else { @@ -314,8 +314,8 @@ public class SnapshotCommands { } if (snapshot == null) { actor.print(Caption.of( - "worldedit.snapshot.none-after", - TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) + "worldedit.snapshot.none-after", + TextComponent.of(dateFormat.withZone(session.getTimeZone()).format(date)) ) ); } else { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java index 416e1a00a..d06ec7cfa 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java @@ -122,9 +122,9 @@ public class ToolCommands { .collect(Collectors.toSet()); commandManager.register("tool", command -> { command.addPart(SubCommandPart.builder( - Caption.of("tool"), - TextComponent.of("The tool to bind") - ) + Caption.of("tool"), + TextComponent.of("The tool to bind") + ) .withCommands(nonGlobalCommands) .required() .build()); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolUtilCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolUtilCommands.java index 12edce796..945498683 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolUtilCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolUtilCommands.java @@ -367,11 +367,13 @@ public class ToolUtilCommands { desc = "Set the brush transform" ) @CommandPermissions({"worldedit.brush.options.transform", "worldedit.transform.brush"}) - public void transform(Player player, LocalSession session, EditSession editSession, - @Arg(desc = "The transform", def = "") ResettableExtent transform, - @Switch(name = 'h', desc = "Whether the offhand should be considered or not") - boolean offHand, - Arguments arguments) throws WorldEditException { + public void transform( + Player player, LocalSession session, EditSession editSession, + @Arg(desc = "The transform", def = "") ResettableExtent transform, + @Switch(name = 'h', desc = "Whether the offhand should be considered or not") + boolean offHand, + Arguments arguments + ) throws WorldEditException { BrushTool tool = session.getBrushTool(player, false); if (tool == null) { player.print(Caption.of("fawe.worldedit.brush.brush.none")); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index 24def83d0..15d4b3bc2 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -414,7 +414,9 @@ public class UtilityCommands { size = Math.max(1, size); we.checkMaxRadius(size); - height = height != null ? Math.min((world.getMaxY() - world.getMinY() + 1), height + 1) : (world.getMaxY() - world.getMinY() + 1); + height = height != null + ? Math.min((world.getMaxY() - world.getMinY() + 1), height + 1) + : (world.getMaxY() - world.getMinY() + 1); int affected = editSession.removeAbove(session.getPlacementPosition(actor), size, height); actor.print(Caption.of("worldedit.removeabove.removed", TextComponent.of(affected))); return affected; @@ -437,7 +439,9 @@ public class UtilityCommands { size = Math.max(1, size); we.checkMaxRadius(size); - height = height != null ? Math.min((world.getMaxY() - world.getMinY() + 1), height + 1) : (world.getMaxY() - world.getMinY() + 1); + height = height != null + ? Math.min((world.getMaxY() - world.getMinY() + 1), height + 1) + : (world.getMaxY() - world.getMinY() + 1); int affected = editSession.removeBelow(session.getPlacementPosition(actor), size, height); actor.print(Caption.of("worldedit.removebelow.removed", TextComponent.of(affected))); return affected; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/BooleanConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/BooleanConverter.java index 2ca618f1e..134eecf32 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/BooleanConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/BooleanConverter.java @@ -30,11 +30,11 @@ public class BooleanConverter { commandManager.registerConverter( Key.of(Boolean.class), MultiKeyConverter.builder( - ImmutableSetMultimap.builder() - .putAll(false, "off", "f", "false", "n", "no") - .putAll(true, "on", "t", "true", "y", "yes") - .build() - ) + ImmutableSetMultimap.builder() + .putAll(false, "off", "f", "false", "n", "no") + .putAll(true, "on", "t", "true", "y", "yes") + .build() + ) .errorMessage(arg -> "Not a boolean value: " + arg) .build() ); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java index a52ed9201..1a382d43c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java @@ -60,6 +60,7 @@ public class FactoryConverter implements ArgumentConverter { private final String description; @Nullable private final Consumer contextTweaker; + private FactoryConverter( WorldEdit worldEdit, Function> factoryExtractor, diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegionFactoryConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegionFactoryConverter.java index 5fd556319..b0e1cb1ad 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegionFactoryConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegionFactoryConverter.java @@ -34,12 +34,12 @@ public class RegionFactoryConverter { commandManager.registerConverter( Key.of(RegionFactory.class), MultiKeyConverter.builder( - ImmutableSetMultimap.builder() - .put(new CuboidRegionFactory(), "cuboid") - .put(new SphereRegionFactory(), "sphere") - .putAll(new CylinderRegionFactory(1), "cyl", "cylinder") - .build() - ) + ImmutableSetMultimap.builder() + .put(new CuboidRegionFactory(), "cuboid") + .put(new SphereRegionFactory(), "sphere") + .putAll(new CylinderRegionFactory(1), "cyl", "cylinder") + .build() + ) .errorMessage(arg -> "Not a known region type: " + arg) .build() ); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegistryConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegistryConverter.java index 098d0a33d..271c0aa07 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegistryConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/RegistryConverter.java @@ -53,17 +53,17 @@ public final class RegistryConverter implements ArgumentConvert @SuppressWarnings("unchecked") public static void register(CommandManager commandManager) { ImmutableList.of( - BlockType.class, - BlockCategory.class, - ItemType.class, - ItemCategory.class, - BiomeType.class, - EntityType.class, - FluidType.class, - FluidCategory.class, - GameMode.class, - WeatherType.class - ) + BlockType.class, + BlockCategory.class, + ItemType.class, + ItemCategory.class, + BiomeType.class, + EntityType.class, + FluidType.class, + FluidCategory.class, + GameMode.class, + WeatherType.class + ) .stream() .map(c -> (Class) c) .forEach(registryType -> diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java index 7986a7a1d..3d8d63f7d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java @@ -88,7 +88,8 @@ public class FloodFillTool implements BlockTool { Mask mask = initialType.toMask(editSession); BlockReplace function = new BlockReplace(editSession, pattern); RecursiveVisitor visitor = new RecursiveVisitor(mask, function, range, editSession.getMinY(), - editSession.getMaxY(), editSession); + editSession.getMaxY(), editSession + ); visitor.visit(origin); Operations.completeLegacy(visitor); //FAWE end diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java index 42d372c06..d2a6fde14 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java @@ -77,7 +77,7 @@ public class QueryTool implements BlockTool { } builder.append(TextComponent.of(" (" + world.getBlockLightLevel(blockPoint) + "/" - + world.getBlockLightLevel(blockPoint.add(0, 1, 0)) + ")", TextColor.WHITE) + + world.getBlockLightLevel(blockPoint.add(0, 1, 0)) + ")", TextColor.WHITE) .hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, Caption.of("worldedit.tool.info.light.hover")))); player.print(builder.build()); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/SuggestionHelper.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/SuggestionHelper.java index 899fd07a0..232b5f25d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/SuggestionHelper.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/SuggestionHelper.java @@ -235,6 +235,7 @@ public final class SuggestionHelper { } //FAWE start + /** * Returns a stream of suggestions for booleans. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BiomeMaskParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BiomeMaskParser.java index 60e2e3d82..149068f21 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BiomeMaskParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BiomeMaskParser.java @@ -21,7 +21,6 @@ package com.sk89q.worldedit.extension.factory.parser.mask; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.extension.factory.parser.AliasedParser; -import com.fastasyncworldedit.core.util.StringMan; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.sk89q.worldedit.WorldEdit; @@ -36,7 +35,6 @@ import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.world.biome.BiomeType; import java.util.Arrays; -import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java index f131b052a..24bfaf5dd 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java @@ -384,9 +384,9 @@ public final class PlatformCommandManager { final List subCommands = manager.getAllCommands().collect(Collectors.toList()); cmd.addPart(SubCommandPart.builder( - Caption.of("worldedit.argument.action"), - TextComponent.of("Sub-command to run.") - ) + Caption.of("worldedit.argument.action"), + TextComponent.of("Sub-command to run.") + ) .withCommands(subCommands) .required() .build()); @@ -419,9 +419,9 @@ public final class PlatformCommandManager { final List subCommands = manager.getAllCommands().collect(Collectors.toList()); cmd.addPart(SubCommandPart.builder( - Caption.of("worldedit.argument.action"), - TextComponent.of("Sub-command to run.") - ) + Caption.of("worldedit.argument.action"), + TextComponent.of("Sub-command to run.") + ) .withCommands(subCommands) .required() .build()); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java index 1ff8e867e..0374f305e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java @@ -29,7 +29,6 @@ import com.fastasyncworldedit.core.queue.Filter; import com.fastasyncworldedit.core.util.EditSessionBuilder; import com.fastasyncworldedit.core.util.MaskTraverser; import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java index 131151081..bd1ff40e3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java @@ -56,7 +56,11 @@ public class Apply implements Contextual { @Override public Operation createFromContext(EditContext context) { //FAWE start > add extent to RegionVisitor to allow chunk preloading - return new RegionVisitor(firstNonNull(context.getRegion(), region), function.createFromContext(context), context.getDestination()); + return new RegionVisitor( + firstNonNull(context.getRegion(), region), + function.createFromContext(context), + context.getDestination() + ); //FAWE end } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/ApplyRegion.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/ApplyRegion.java index 068cb3321..b7634f74d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/ApplyRegion.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/ApplyRegion.java @@ -49,7 +49,11 @@ public class ApplyRegion implements Contextual { @Override public Operation createFromContext(EditContext context) { //FAWE start > add extent to RegionVisitor to allow chunk preloading - return new RegionVisitor(firstNonNull(context.getRegion(), region), function.createFromContext(context), context.getDestination()); + return new RegionVisitor( + firstNonNull(context.getRegion(), region), + function.createFromContext(context), + context.getDestination() + ); //FAWE end } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Paint.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Paint.java index f8246f0f1..b5ee690f5 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Paint.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Paint.java @@ -71,7 +71,13 @@ public class Paint implements Contextual { Region region = firstNonNull(context.getRegion(), this.region); GroundFunction ground = new GroundFunction(new ExistingBlockMask(destination), function.createFromContext(context)); //FAWE start - provide extent for preloading - LayerVisitor visitor = new LayerVisitor(asFlatRegion(region), minimumBlockY(region), maximumBlockY(region), ground, destination); + LayerVisitor visitor = new LayerVisitor( + asFlatRegion(region), + minimumBlockY(region), + maximumBlockY(region), + ground, + destination + ); //FAWE end visitor.setMask(new NoiseFilter2D(new RandomNoise(), density)); return visitor; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Masks.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Masks.java index 1c5fcb9fc..d3cb4cad7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Masks.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Masks.java @@ -62,6 +62,7 @@ public final class Masks { } //FAWE start + /** * Negate the given mask. * @@ -212,7 +213,8 @@ public final class Masks { //FAWE start - protected > private protected static class NegatedMask implements Mask { - //FAWE end + + //FAWE end protected final Mask mask; private NegatedMask(Mask mask) { @@ -244,6 +246,7 @@ public final class Masks { } private static class NegatedMask2D implements Mask2D { + private final Mask2D mask; private NegatedMask2D(Mask2D mask) { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java index 9733e42fd..9959c9d67 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java @@ -28,7 +28,6 @@ import com.fastasyncworldedit.core.function.block.CombinedBlockCopy; import com.fastasyncworldedit.core.function.block.SimpleBlockCopy; import com.fastasyncworldedit.core.function.visitor.IntersectRegionFunction; import com.fastasyncworldedit.core.queue.implementation.ParallelQueueExtent; -import com.fastasyncworldedit.core.queue.implementation.SingleThreadQueueExtent; import com.fastasyncworldedit.core.util.ExtentTraverser; import com.fastasyncworldedit.core.util.MaskTraverser; import com.google.common.collect.ImmutableList; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/BreadthFirstSearch.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/BreadthFirstSearch.java index aadf915a3..95ac8e0f8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/BreadthFirstSearch.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/BreadthFirstSearch.java @@ -114,6 +114,7 @@ public abstract class BreadthFirstSearch implements Operation { } //FAWE start - int depth, min/max y, preloading + /** * Create a new instance. * @@ -290,7 +291,8 @@ public abstract class BreadthFirstSearch implements Operation { if (singleQueue != null && Settings.IMP.QUEUE.PRELOAD_CHUNK_COUNT > 1) { int cx = Integer.MIN_VALUE; int cz = Integer.MIN_VALUE; - outer: for (BlockVector3 from : queue) { + outer: + for (BlockVector3 from : queue) { for (BlockVector3 direction : dirs) { if (loadCount > Settings.IMP.QUEUE.PRELOAD_CHUNK_COUNT) { break outer; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/DownwardVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/DownwardVisitor.java index 45a81c9a0..7ea7f99e6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/DownwardVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/DownwardVisitor.java @@ -53,6 +53,7 @@ public class DownwardVisitor extends RecursiveVisitor { } //FAWE start - int depth, min/max y, preloading + /** * Create a new visitor. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/FlatRegionVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/FlatRegionVisitor.java index b4a278e8f..39b3adae9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/FlatRegionVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/FlatRegionVisitor.java @@ -49,6 +49,7 @@ public class FlatRegionVisitor implements Operation { private int affected = 0; //FAWE start - chunk preloading + /** * Create a new visitor. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/LayerVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/LayerVisitor.java index f4f40f68b..ab1ebd933 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/LayerVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/LayerVisitor.java @@ -19,8 +19,6 @@ package com.sk89q.worldedit.function.visitor; -import com.fastasyncworldedit.core.configuration.Settings; -import com.fastasyncworldedit.core.math.BlockVectorSet; import com.fastasyncworldedit.core.queue.implementation.ParallelQueueExtent; import com.fastasyncworldedit.core.queue.implementation.SingleThreadQueueExtent; import com.fastasyncworldedit.core.util.ExtentTraverser; @@ -35,8 +33,6 @@ import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.FlatRegion; -import java.util.Set; - import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -61,6 +57,7 @@ public class LayerVisitor implements Operation { //FAWE start - chunk preloading + /** * Create a new visitor. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/NonRisingVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/NonRisingVisitor.java index f1a358f36..c4dedc1b3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/NonRisingVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/NonRisingVisitor.java @@ -44,6 +44,7 @@ public class NonRisingVisitor extends RecursiveVisitor { } //FAWE start - int depth, preloading, min/max y + /** * Create a new recursive visitor. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RecursiveVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RecursiveVisitor.java index ba80448a0..861210a46 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RecursiveVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RecursiveVisitor.java @@ -46,6 +46,7 @@ public class RecursiveVisitor extends BreadthFirstSearch { } //FAWE start - int depth, min/max y + /** * Create a new recursive visitor. * @@ -60,6 +61,7 @@ public class RecursiveVisitor extends BreadthFirstSearch { } //FAWE start - int depth, min/max y + /** * Create a new recursive visitor. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java index c128e48d3..80292e12e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/visitor/RegionVisitor.java @@ -35,6 +35,7 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.util.formatting.text.TextComponent; + import java.util.Iterator; /** @@ -42,7 +43,8 @@ import java.util.Iterator; * * @deprecated - FAWE deprecation: Let the queue iterate, not the region function which lacks any kind of optimizations / parallelism */ -@Deprecated public class RegionVisitor implements Operation { +@Deprecated +public class RegionVisitor implements Operation { public final Iterable iterable; //FAWE start - allow chunk preloading @@ -55,7 +57,8 @@ import java.util.Iterator; /** * @deprecated Use other constructors which will preload chunks during iteration */ - @Deprecated public RegionVisitor(Region region, RegionFunction function) { + @Deprecated + public RegionVisitor(Region region, RegionFunction function) { this(region, function, null); } @@ -87,7 +90,8 @@ import java.util.Iterator; return affected; } - @Override public Operation resume(RunContext run) throws WorldEditException { + @Override + public Operation resume(RunContext run) throws WorldEditException { //FAWE start > allow chunk preloading if (singleQueue != null && Settings.IMP.QUEUE.PRELOAD_CHUNK_COUNT > 1) { /* @@ -196,10 +200,12 @@ import java.util.Iterator; } //FAWE end - @Override public void cancel() { + @Override + public void cancel() { } - @Override public Iterable getStatusMessages() { + @Override + public Iterable getStatusMessages() { return ImmutableList.of(Caption.of("worldedit.operation.affected.block", TextComponent.of(getAffected()))); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/Functions.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/Functions.java index d3b737ae1..369694f0b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/Functions.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/Functions.java @@ -113,12 +113,12 @@ public final class Functions { // Special cases: we accept varargs for these map.put("min", lookup.findStatic(Doubles.class, "min", - methodType(double.class, double[].class) - ) + methodType(double.class, double[].class) + ) .asVarargsCollector(double[].class)); map.put("max", lookup.findStatic(Doubles.class, "max", - methodType(double.class, double[].class) - ) + methodType(double.class, double[].class) + ) .asVarargsCollector(double[].class)); } @@ -171,38 +171,38 @@ public final class Functions { MethodHandles.Lookup lookup ) throws NoSuchMethodException, IllegalAccessException { map.put("megabuf", lookup.findSpecial(Functions.class, "megabuf", - methodType(double.class, double.class), Functions.class - ) + methodType(double.class, double.class), Functions.class + ) .bindTo(this)); map.put("megabuf", lookup.findSpecial(Functions.class, "megabuf", - methodType(double.class, double.class, double.class), Functions.class - ) + methodType(double.class, double.class, double.class), Functions.class + ) .bindTo(this)); map.put("closest", lookup.findSpecial(Functions.class, "closest", - methodType(double.class, double.class, double.class, double.class, double.class, - double.class, double.class - ), Functions.class - ) + methodType(double.class, double.class, double.class, double.class, double.class, + double.class, double.class + ), Functions.class + ) .bindTo(this)); // rely on expression field map.put("query", lookup.findSpecial(Functions.class, "query", - methodType(double.class, double.class, double.class, double.class, LocalSlot.class, - LocalSlot.class - ), Functions.class - ) + methodType(double.class, double.class, double.class, double.class, LocalSlot.class, + LocalSlot.class + ), Functions.class + ) .bindTo(this)); map.put("queryAbs", lookup.findSpecial(Functions.class, "queryAbs", - methodType(double.class, double.class, double.class, double.class, LocalSlot.class, - LocalSlot.class - ), Functions.class - ) + methodType(double.class, double.class, double.class, double.class, LocalSlot.class, + LocalSlot.class + ), Functions.class + ) .bindTo(this)); map.put("queryRel", lookup.findSpecial(Functions.class, "queryRel", - methodType(double.class, double.class, double.class, double.class, LocalSlot.class, - LocalSlot.class - ), Functions.class - ) + methodType(double.class, double.class, double.class, double.class, LocalSlot.class, + LocalSlot.class + ), Functions.class + ) .bindTo(this)); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExpressionHandles.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExpressionHandles.java index 97a1f63d3..a2d0ad483 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExpressionHandles.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExpressionHandles.java @@ -116,8 +116,8 @@ class ExpressionHandles { methodType(boolean.class, double.class) )); CALL_BINARY_OP = lookup.findVirtual(DoubleBinaryOperator.class, "applyAsDouble", - methodType(double.class, double.class, double.class) - ) + methodType(double.class, double.class, double.class) + ) .asType(methodType(Double.class, DoubleBinaryOperator.class, double.class, double.class)); NEW_LS_CONSTANT = lookup.findConstructor( LocalSlot.Constant.class, diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/Int2BaseBlockMap.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/Int2BaseBlockMap.java index 751a42e1e..bf8e3bed5 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/Int2BaseBlockMap.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/Int2BaseBlockMap.java @@ -68,9 +68,11 @@ class Int2BaseBlockMap extends AbstractInt2ObjectMap { } private final Int2IntMap commonMap = new Int2IntOpenHashMap(64, 0.9f); + { commonMap.defaultReturnValue(BlockStateIdAccess.invalidId()); } + private final Int2ObjectMap uncommonMap = new Int2ObjectOpenHashMap<>(1, 0.75f); @Override diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/AnnotatedSubscriberFinder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/AnnotatedSubscriberFinder.java index a6d17be49..78c52889e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/AnnotatedSubscriberFinder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/AnnotatedSubscriberFinder.java @@ -68,7 +68,12 @@ class AnnotatedSubscriberFinder implements SubscriberFindingStrategy { throw new IllegalArgumentException("Method " + method + " failed to unreflect.", e); } - EventHandler handler = new MethodHandleEventHandler(annotation.priority(), listener, handle, method.getName()); + EventHandler handler = new MethodHandleEventHandler( + annotation.priority(), + listener, + handle, + method.getName() + ); methodsInListener.put(eventType, handler); } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java index 0353103c3..bdbc1fcc8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java @@ -36,7 +36,7 @@ public class MethodEventHandler extends EventHandler { * Create a new event handler. * * @param priority the priority - * @param method the method + * @param method the method */ public MethodEventHandler(Priority priority, Object object, Method method) { super(priority); @@ -83,4 +83,5 @@ public class MethodEventHandler extends EventHandler { result = 31 * result + method.hashCode(); return result; } + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodHandleEventHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodHandleEventHandler.java index 33ca1d3b2..26a2df742 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodHandleEventHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodHandleEventHandler.java @@ -32,10 +32,10 @@ public class MethodHandleEventHandler extends EventHandler { /** * Create a new event handler that uses MethodHandles to dispatch. * - * @param priority the priority - * @param object The object to invoke it on + * @param priority the priority + * @param object The object to invoke it on * @param methodHandle The handle to invoke - * @param methodName The name of the method (for equality checks) + * @param methodName The name of the method (for equality checks) */ protected MethodHandleEventHandler(Priority priority, Object object, MethodHandle methodHandle, String methodName) { super(priority); @@ -79,4 +79,5 @@ public class MethodHandleEventHandler extends EventHandler { return Objects.equals(object, that.object); } + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java index b14478dcf..d12cd70b2 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java @@ -221,6 +221,7 @@ public interface World extends Extent, Keyed, IChunkCache { void simulateBlockMine(BlockVector3 position); //FAWE start + /** * Return items that may drop by destroying this block. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BaseBlock.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BaseBlock.java index a79b86538..9828c9069 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BaseBlock.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BaseBlock.java @@ -318,4 +318,5 @@ public class BaseBlock implements BlockStateHolder, TileEntityBlock { return blockState.getAsString() + nbtString; } + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java index 6ffae96ab..520a5abd4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java @@ -151,7 +151,7 @@ public class BlockState implements BlockStateHolder, Pattern { if (type == null) { String input = key.toString(); throw new SuggestInputParseException("Does not match a valid block type: " + input, input, () -> Stream.of( - BlockTypesCache.values) + BlockTypesCache.values) .filter(b -> StringMan.blockStateMatches(input, b.getId())) .map(BlockType::getId) .sorted(StringMan.blockStateComparator(input)) @@ -464,4 +464,5 @@ public class BlockState implements BlockStateHolder, Pattern { return equalsFuzzy((BlockState) obj); } + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java index e6c451743..fa554f219 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java @@ -101,6 +101,7 @@ public interface BlockStateHolder> extends TileEnt V getState(Property property); //FAWE start + /** * Returns a BlockStateHolder with the given state and value applied. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java index 17f8668b6..19ece6d3e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java @@ -1893,7 +1893,7 @@ public final class BlockTypes { } throw new SuggestInputParseException("Does not match a valid block type: " + inputLower, inputLower, () -> Stream.of( - BlockTypesCache.values) + BlockTypesCache.values) .filter(b -> StringMan.blockStateMatches(inputLower, b.getId())) .map(BlockType::getId) .sorted(StringMan.blockStateComparator(inputLower))