mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
some codestyle application
This commit is contained in:
parent
dc11b74020
commit
195a13a23c
@ -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;
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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<? extends Player> getOnlinePlayers() {
|
||||
public @NotNull
|
||||
Collection<? extends Player> 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<OfflinePlayer> getWhitelistedPlayers() {
|
||||
public @NotNull
|
||||
Set<OfflinePlayer> 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<Player> matchPlayer(@NotNull String s) {
|
||||
public @NotNull
|
||||
List<Player> 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<World> getWorlds() {
|
||||
public @NotNull
|
||||
List<World> 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<Recipe> getRecipesFor(@NotNull ItemStack itemStack) {
|
||||
public @NotNull
|
||||
List<Recipe> 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<Recipe> recipeIterator() {
|
||||
public @NotNull
|
||||
Iterator<Recipe> recipeIterator() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -410,7 +444,8 @@ public class StubServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Map<String, String[]> getCommandAliases() {
|
||||
public @NotNull
|
||||
Map<String, String[]> 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<String> getIPBans() {
|
||||
public @NotNull
|
||||
Set<String> getIPBans() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -499,22 +538,26 @@ public class StubServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Set<OfflinePlayer> getBannedPlayers() {
|
||||
public @NotNull
|
||||
Set<OfflinePlayer> 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<OfflinePlayer> getOperators() {
|
||||
public @NotNull
|
||||
Set<OfflinePlayer> 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<KeyedBossBar> getBossBars() {
|
||||
public @NotNull
|
||||
Iterator<KeyedBossBar> 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<Advancement> advancementIterator() {
|
||||
public @NotNull
|
||||
Iterator<Advancement> 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<BlockData> consumer) {
|
||||
public @NotNull
|
||||
BlockData createBlockData(@NotNull Material material, @Nullable Consumer<BlockData> 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 <T extends Keyed> Iterable<Tag<T>> getTags(@NotNull String s, @NotNull Class<T> aClass) {
|
||||
public @NotNull
|
||||
<T extends Keyed> Iterable<Tag<T>> getTags(@NotNull String s, @NotNull Class<T> aClass) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable LootTable getLootTable(@NotNull NamespacedKey namespacedKey) {
|
||||
public @Nullable
|
||||
LootTable getLootTable(@NotNull NamespacedKey namespacedKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<Entity> selectEntities(@NotNull CommandSender commandSender, @NotNull String s) throws
|
||||
public @NotNull
|
||||
List<Entity> 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<? extends Audience> audiences() {
|
||||
public @NotNull
|
||||
Iterable<? extends Audience> audiences() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -915,7 +1006,8 @@ public class StubServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Set<String> getListeningPluginChannels() {
|
||||
public @NotNull
|
||||
Set<String> getListeningPluginChannels() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* A mob spawner block.
|
||||
*
|
||||
* @deprecated WorldEdit does not handle interpreting NBT,
|
||||
* deprecated for removal without replacement
|
||||
*/
|
||||
@ -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()));
|
||||
}
|
||||
|
@ -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,6 +53,7 @@ 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
|
||||
*/
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -351,6 +351,7 @@ 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
|
||||
* FaweException.Type.values().length}
|
||||
* @param e {@link FaweException} to handle
|
||||
|
@ -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<RegionWrapper> regionSet = Sets.<RegionWrapper>newHashSet(bounds);
|
||||
ArrayList<DiskStorageHistory> 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) {
|
||||
|
@ -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(
|
||||
public static final FaweException OUTSIDE_REGION = new FaweException(
|
||||
Caption.of(
|
||||
"fawe.cancel.worldedit.cancel.reason.outside.region"),
|
||||
Type.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(
|
||||
public static final FaweException MAX_ENTITIES = new FaweException(
|
||||
Caption.of(
|
||||
"fawe.cancel.worldedit.cancel.reason.max.entities"),
|
||||
Type.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(
|
||||
public static final FaweException MAX_ITERATIONS = new FaweException(
|
||||
Caption.of(
|
||||
"fawe.cancel.worldedit.cancel.reason.max.iterations"),
|
||||
Type.MAX_ITERATIONS);
|
||||
Type.MAX_ITERATIONS
|
||||
);
|
||||
|
||||
/*
|
||||
thread cache
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<Mask> {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -138,7 +138,9 @@ 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(
|
||||
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,7 +183,9 @@ public interface HeightMap {
|
||||
}
|
||||
raise = (yscale * raise);
|
||||
int random =
|
||||
ThreadLocalRandom.current().nextInt(maxY + 1 - minY) - minY < (int) ((raise - (int) raise) * (maxY - minY + 1))
|
||||
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;
|
||||
|
@ -48,6 +48,7 @@ public class FaweException extends RuntimeException {
|
||||
|
||||
/**
|
||||
* Get the {@link FaweException.Type}
|
||||
*
|
||||
* @return the {@link FaweException.Type}
|
||||
*/
|
||||
public Type getType() {
|
||||
|
@ -333,19 +333,29 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
||||
@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<T extends Future<T>> implements IQueueChunk<T> {
|
||||
|
||||
@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
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<String, Tag> 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<String, Tag> map = new HashMap<>(tag.getValue());
|
||||
map.put("Id", new StringTag(entity.getState().getType().getId()));
|
||||
ListTag pos = (ListTag) map.get("Pos");
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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()));
|
||||
}
|
||||
|
@ -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,
|
||||
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 {
|
||||
Arguments arguments
|
||||
) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
player.print(Caption.of("fawe.worldedit.brush.brush.none"));
|
||||
|
@ -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;
|
||||
|
@ -60,6 +60,7 @@ public class FactoryConverter<T> implements ArgumentConverter<T> {
|
||||
private final String description;
|
||||
@Nullable
|
||||
private final Consumer<ParserContext> contextTweaker;
|
||||
|
||||
private FactoryConverter(
|
||||
WorldEdit worldEdit,
|
||||
Function<WorldEdit, AbstractFactory<T>> factoryExtractor,
|
||||
|
@ -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
|
||||
|
@ -235,6 +235,7 @@ public final class SuggestionHelper {
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
|
||||
/**
|
||||
* Returns a stream of suggestions for booleans.
|
||||
*
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -56,7 +56,11 @@ public class Apply implements Contextual<Operation> {
|
||||
@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
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,11 @@ public class ApplyRegion implements Contextual<Operation> {
|
||||
@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
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,13 @@ public class Paint implements Contextual<Operation> {
|
||||
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;
|
||||
|
@ -62,6 +62,7 @@ public final class Masks {
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
|
||||
/**
|
||||
* Negate the given mask.
|
||||
*
|
||||
@ -212,6 +213,7 @@ public final class Masks {
|
||||
|
||||
//FAWE start - protected > private
|
||||
protected static class NegatedMask implements Mask {
|
||||
|
||||
//FAWE end
|
||||
protected final Mask mask;
|
||||
|
||||
@ -244,6 +246,7 @@ public final class Masks {
|
||||
}
|
||||
|
||||
private static class NegatedMask2D implements Mask2D {
|
||||
|
||||
private final Mask2D mask;
|
||||
|
||||
private NegatedMask2D(Mask2D mask) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -53,6 +53,7 @@ public class DownwardVisitor extends RecursiveVisitor {
|
||||
}
|
||||
|
||||
//FAWE start - int depth, min/max y, preloading
|
||||
|
||||
/**
|
||||
* Create a new visitor.
|
||||
*
|
||||
|
@ -49,6 +49,7 @@ public class FlatRegionVisitor implements Operation {
|
||||
private int affected = 0;
|
||||
|
||||
//FAWE start - chunk preloading
|
||||
|
||||
/**
|
||||
* Create a new visitor.
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -44,6 +44,7 @@ public class NonRisingVisitor extends RecursiveVisitor {
|
||||
}
|
||||
|
||||
//FAWE start - int depth, preloading, min/max y
|
||||
|
||||
/**
|
||||
* Create a new recursive visitor.
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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<? extends BlockVector3> 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<Component> getStatusMessages() {
|
||||
@Override
|
||||
public Iterable<Component> getStatusMessages() {
|
||||
return ImmutableList.of(Caption.of("worldedit.operation.affected.block", TextComponent.of(getAffected())));
|
||||
}
|
||||
|
||||
|
@ -68,9 +68,11 @@ class Int2BaseBlockMap extends AbstractInt2ObjectMap<BaseBlock> {
|
||||
}
|
||||
|
||||
private final Int2IntMap commonMap = new Int2IntOpenHashMap(64, 0.9f);
|
||||
|
||||
{
|
||||
commonMap.defaultReturnValue(BlockStateIdAccess.invalidId());
|
||||
}
|
||||
|
||||
private final Int2ObjectMap<BaseBlock> uncommonMap = new Int2ObjectOpenHashMap<>(1, 0.75f);
|
||||
|
||||
@Override
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -83,4 +83,5 @@ public class MethodEventHandler extends EventHandler {
|
||||
result = 31 * result + method.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -79,4 +79,5 @@ public class MethodHandleEventHandler extends EventHandler {
|
||||
|
||||
return Objects.equals(object, that.object);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -221,6 +221,7 @@ public interface World extends Extent, Keyed, IChunkCache<IChunkGet> {
|
||||
void simulateBlockMine(BlockVector3 position);
|
||||
|
||||
//FAWE start
|
||||
|
||||
/**
|
||||
* Return items that may drop by destroying this block.
|
||||
*
|
||||
|
@ -318,4 +318,5 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
|
||||
return blockState.getAsString() + nbtString;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -464,4 +464,5 @@ public class BlockState implements BlockStateHolder<BlockState>, Pattern {
|
||||
|
||||
return equalsFuzzy((BlockState) obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ public interface BlockStateHolder<B extends BlockStateHolder<B>> extends TileEnt
|
||||
<V> V getState(Property<V> property);
|
||||
|
||||
//FAWE start
|
||||
|
||||
/**
|
||||
* Returns a BlockStateHolder with the given state and value applied.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user