From 984c5c2e9f29725a61668fe442a93d5914155fc0 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 17 Sep 2017 17:50:50 +1000 Subject: [PATCH] Fixes #741 --- .../boydti/fawe/bukkit/v0/BukkitQueue_0.java | 4 +- .../fawe/bukkit/v1_7/BukkitQueue17.java | 2 + .../regions/general/plot/CreateFromImage.java | 652 ------------------ .../general/plot/PlotSquaredFeature.java | 1 - 4 files changed, 4 insertions(+), 655 deletions(-) delete mode 100644 core/src/main/java/com/boydti/fawe/regions/general/plot/CreateFromImage.java diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java index 1932f6c6..7f5a315a 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java @@ -126,8 +126,8 @@ public abstract class BukkitQueue_0 extends NMSMa } } - private static boolean registered = false; - private static boolean disableChunkLoad = false; + protected static boolean registered = false; + protected static boolean disableChunkLoad = false; @EventHandler public static void onWorldLoad(WorldInitEvent event) { diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java index ff3c007c..88d3d8d2 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java @@ -613,7 +613,9 @@ public class BukkitQueue17 extends BukkitQueue_0 confirm, RunnableVal2 whenDone) throws CommandException { - List argList = StringMan.split(StringMan.join(args, " "), ' '); - checkTrue(argList.size() >= 1, C.COMMAND_SYNTAX, getUsage()); - PlotAreaManager manager = PS.get().getPlotAreaManager(); - if (manager instanceof SinglePlotAreaManager) TaskManager.IMP.async(new Runnable() { - @Override - public void run() { - FawePlayer fp = FawePlayer.wrap(player.getName()); - HeightMapMCAGenerator generator = fp.getMeta("HMGenerator"); - Plot plot = fp.getMeta("HMGeneratorPlot"); - if (generator == null) { - final Vector2D dimensions; - final BufferedImage image; - String arg0 = argList.get(0).toLowerCase(); - if (arg0.startsWith("http") || arg0.startsWith("file://")) { - try { - player.sendMessage(BBC.getPrefix() + "Loading image... (1)"); - image = getImage(argList.get(0), fp); - } catch (IOException e) { - player.sendMessage(e.getMessage()); - return; - } - dimensions = null; - } else { - image = null; - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, getUsage()); - return; - } - dimensions = new Vector2D(Integer.parseInt(argList.get(0)), Integer.parseInt(argList.get(1))); - } - fp.runAction(new Runnable() { - @Override - public void run() { - SinglePlotAreaManager sManager = (SinglePlotAreaManager) manager; - SinglePlotArea area = sManager.getArea(); - Plot plot = TaskManager.IMP.sync(new RunnableVal() { - @Override - public void run(Plot o) { - int currentPlots = Settings.Limit.GLOBAL ? player.getPlotCount() : player.getPlotCount(area.worldname); - int diff = player.getAllowedPlots() - currentPlots; - if (diff < 1) { - C.CANT_CLAIM_MORE_PLOTS_NUM.send(player, -diff); - return; - } - if (area.getMeta("lastPlot") == null) { - area.setMeta("lastPlot", new PlotId(0, 0)); - } - PlotId lastId = (PlotId) area.getMeta("lastPlot"); - while (true) { - lastId = Auto.getNextPlotId(lastId, 1); - if (area.canClaim(player, lastId, lastId)) { - break; - } - } - area.setMeta("lastPlot", lastId); - this.value = area.getPlot(lastId); - this.value.setOwner(player.getUUID()); - } - }); - - - // setGlassColor|setBiomeColor|setBlockAndBiomeColor|setColorPaletteComplexity|setColorPaletteRandomization|setColorPaletteBlocks|done|cancel|>"); - fp.sendMessage(BBC.getPrefix() + "Initializing components... (2)"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi biome [url|mask] [white=false]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi overlay [url|mask] [white=false]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi main [url|mask] [white=false]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi floor [url|mask] [white=false]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi column [url|mask] [white=false]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi caves"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi ore[s]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi schem [url] "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi height "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi smooth [whiteonly]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi waterHeight "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi waterId "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi color [image or fawe mask] [whiteOnly=true]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi glass "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi biomeColor "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi blockBiomeColor [image or fawe mask] [whiteOnly=true]"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi paletteComplexity "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi paletteRandomization "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi paletteBlocks "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi paletteBiomePriority "); - fp.sendMessage(BBC.getPrefix() + "/2 cfi done"); - fp.sendMessage(BBC.getPrefix() + "/2 cfi cancel"); - File folder = new File(PS.imp().getWorldContainer(), plot.getWorldName() + File.separator + "region"); - HeightMapMCAGenerator generator; - if (image != null) { - generator = new HeightMapMCAGenerator(image, folder); - } else { - generator = new HeightMapMCAGenerator(dimensions.getBlockX(), dimensions.getBlockZ(), folder); - } - generator.setImageViewer(Fawe.imp().getImageViewer(fp)); - fp.setMeta("HMGenerator", generator); - player.setMeta("HMGeneratorPlot", plot); - } - }, true, false); - return; - } - fp.runAction(new Runnable() { - @Override - public void run() { - if (generator == null) { - C.COMMAND_SYNTAX.send(player, getUsage()); - return; - } - ParserContext context = new ParserContext(); - context.setActor(fp.getPlayer()); - context.setWorld(fp.getWorld()); - context.setSession(fp.getSession()); - context.setExtent(generator); - Request.request().setExtent(generator); - try { - switch (argList.get(0).toLowerCase()) { - // BufferedImage, Mask, WorldData, ClipboardHolder[], rarity, distance, randomRotate - case "schem": - case "schems": - case "addschems": { - if (argList.size() != 6 && argList.size() != 7) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [url] "); - return; - } - int argOffset = 0; - BufferedImage img = null; - String arg1 = argList.get(1); - if (arg1.startsWith("http") || arg1.startsWith("file://")) { - img = getImage(argList.get(1), fp); - argOffset++; - } - World world = fp.getWorld(); - WorldData wd = world.getWorldData(); - Mask mask = we.getMaskFactory().parseFromInput(argList.get(1 + argOffset), context); - ClipboardHolder[] clipboards = ClipboardFormat.SCHEMATIC.loadAllFromInput(fp.getPlayer(), wd, argList.get(2 + argOffset), true); - if (clipboards == null) { - return; - } - int rarity = Integer.parseInt(argList.get(3 + argOffset)); - int distance = Integer.parseInt(argList.get(4 + argOffset)); - boolean rotate = Boolean.parseBoolean(argList.get(5 + argOffset)); - if (img == null) { - generator.addSchems(mask, wd, clipboards, rarity, distance, rotate); - } else { - generator.addSchems(img, mask, wd, clipboards, rarity, distance, rotate); - } - player.sendMessage(BBC.getPrefix() + "Added schems, what's next?"); - return; - } - case "palettecomplexity": - case "colorpalettecomplexity": - case "setcolorpalettecomplexity": { - // roughness - // blocks - if (argList.size() != 3) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - int min = Integer.parseInt(argList.get(1)); - int max = Integer.parseInt(argList.get(2)); - generator.setTextureUtil(new CleanTextureUtil(Fawe.get().getTextureUtil(), min, max)); - player.sendMessage("Set color palette complexity, what's next?"); - return; - } - case "paletterandomization": - case "colorpaletterandomization": - case "setcolorpaletterandomization": { - // roughness - // blocks - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - generator.setTextureRandomVariation(Boolean.parseBoolean(argList.get(1))); - player.sendMessage("Set color palette randomization, what's next?"); - return; - } - case "paletteblocks": - case "colorpaletterblocks": - case "setcolorpaletteblocks": { - // roughness - // blocks - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - if (argList.get(1).equalsIgnoreCase("*")) { - generator.setTextureUtil(Fawe.get().getTextureUtil()); - player.sendMessage("Set color palette blocks, what's next?"); - return; - } - context.setPreferringWildcard(true); - context.setRestricted(false); - Set blocks; - if (argList.get(1).equalsIgnoreCase("#clipboard")) { - ClipboardHolder holder = fp.getSession().getClipboard(); - Clipboard clipboard = holder.getClipboard(); - boolean[] ids = new boolean[Character.MAX_VALUE + 1]; - for (Vector pt : clipboard.getRegion()) { - ids[clipboard.getBlock(pt).getCombined()] = true; - } - blocks = new HashSet<>(); - for (int combined = 0; combined < ids.length; combined++) { - if (ids[combined]) blocks.add(FaweCache.CACHE_BLOCK[combined]); - } - } else { - blocks = we.getBlockFactory().parseFromListInput(argList.get(1), context); - } - generator.setTextureUtil(new FilteredTextureUtil(Fawe.get().getTextureUtil(), blocks)); - player.sendMessage("Set color palette blocks, what's next?"); - return; - } - case "biomepriority": - case "palettebiomepriority": - case "setpalettebiomepriority": { - // roughness - // blocks - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - generator.setBiomePriority(Integer.parseInt(argList.get(1))); - player.sendMessage("Set color palette biome priority, what's next?"); - return; - } - case "color": - case "setcolor": { - if (argList.size() < 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [mask] [whiteonly=true]"); - return; - } - BufferedImage image = getImage(argList.get(1), fp); - if (argList.size() > 2) { - String arg2 = argList.get(2); - if (arg2.startsWith("http") || arg2.startsWith("file://")) { - BufferedImage mask = getImage(arg2, fp); - boolean whiteOnly = argList.size() < 4 || Boolean.parseBoolean(argList.get(3)); - generator.setColor(image, mask, whiteOnly); - } else { - Mask mask = we.getMaskFactory().parseFromInput(argList.get(1), context); - boolean whiteOnly = argList.size() < 4 || Boolean.parseBoolean(argList.get(3)); - generator.setColor(image, mask); - } - } else { - generator.setColor(image); - } - player.sendMessage("Set color, what's next?"); - return; - } - case "biomecolor": - case "setbiomecolor": { - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - BufferedImage image = getImage(argList.get(1), fp); - generator.setBiomeColor(image); - player.sendMessage("Set color, what's next?"); - return; - } - case "blockbiomecolor": - case "setblockandbiomecolor": { - if (argList.size() < 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - BufferedImage image = getImage(argList.get(1), fp); - BufferedImage imgMask = null; - Mask mask = null; - boolean whiteOnly = true; - if (argList.size() > 2) { - String arg2 = argList.get(2); - if (arg2.startsWith("http") || arg2.startsWith("file://")) { - imgMask = getImage(arg2, fp); - } else { - mask = we.getMaskFactory().parseFromInput(argList.get(1), context); - } - whiteOnly = argList.size() < 4 || Boolean.parseBoolean(argList.get(3)); - } - generator.setBlockAndBiomeColor(image, mask, imgMask, whiteOnly); - player.sendMessage("Set color, what's next?"); - return; - } - case "glass": - case "glasscolor": - case "setglasscolor": { - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - BufferedImage image = getImage(argList.get(1), fp); - generator.setColorWithGlass(image); - player.sendMessage("Set glass color, what's next?"); - return; - } - case "waterheight": - case "setwaterheight": { - // roughness - // blocks - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - generator.setWaterHeight(Integer.parseInt(argList.get(1))); - player.sendMessage("Set water height, what's next?"); - return; - } - case "waterid": - case "setwaterid": { - // roughness - // blocks - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - generator.setWaterId(Integer.parseInt(argList.get(1))); - player.sendMessage("Set water id, what's next?"); - return; - } - case "height": - case "setheight": { - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - if (argList.get(1).startsWith("http")) { - player.sendMessage("Loading image (3)..."); - BufferedImage image = getImage(argList.get(1), fp); - generator.setHeight(image); - } else { - generator.setHeights(Integer.parseInt(args[1])); - } - player.sendMessage("Set height, what's next?"); - return; - } - case "ores": - case "addores": - if (argList.size() != 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - generator.addDefaultOres(we.getMaskFactory().parseFromInput(argList.get(1), context)); - player.sendMessage(BBC.getPrefix() + "Added ores, what's next?"); - return; - case "ore": - case "addore": { - if (argList.size() != 8) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " "); - return; - } - // mask pattern size freq rarity miny maxy - Mask mask = we.getMaskFactory().parseFromInput(argList.get(1), context); - Pattern pattern = we.getPatternFactory().parseFromInput(argList.get(2), context); - int size = Integer.parseInt(argList.get(3)); - int frequency = Integer.parseInt(argList.get(4)); - int rarity = Integer.parseInt(argList.get(5)); - int min = Integer.parseInt(argList.get(6)); - int max = Integer.parseInt(argList.get(7)); - generator.addOre(mask, pattern, size, frequency, rarity, min, max); - player.sendMessage(BBC.getPrefix() + "Added ore, what's next?"); - return; - } - case "cave": - case "caves": - case "addcaves": { - generator.addCaves(); - player.sendMessage(BBC.getPrefix() + "Added caves, what's next?"); - return; - } - case "biome": - case "setbiome": { - int id; - if (argList.size() < 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [url|mask] [whiteonly]"); - return; - } - if (argList.size() == 2) { - id = getBiome(argList.get(1), fp).getId(); - generator.setBiome(id); - } else { - id = getBiome(argList.get(2), fp).getId(); - BufferedImage img = getImage(argList.get(1), fp); - if (img != null) { - boolean whiteOnly = argList.size() == 4 && Boolean.parseBoolean(argList.get(3)); - generator.setBiome(img, (byte) id, whiteOnly); - } else { - generator.setBiome(we.getMaskFactory().parseFromInput(argList.get(1), context), (byte) id); - } - } - player.sendMessage(BBC.getPrefix() + "Set biome, what's next?"); - return; - } - case "smooth": { - int id; - if (argList.size() < 4) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [whiteonly]"); - return; - } - int radius = Integer.parseInt(argList.get(2)); - int iterations = Integer.parseInt(argList.get(3)); - BufferedImage img = getImage(argList.get(1), fp); - if (img != null) { - boolean whiteOnly = argList.size() == 5 && Boolean.parseBoolean(argList.get(4)); - generator.smooth(img, whiteOnly, radius, iterations); - } else { - Mask mask = we.getMaskFactory().parseFromInput(argList.get(1), context); - generator.smooth(mask, radius, iterations); - } - player.sendMessage(BBC.getPrefix() + "Smoothed terrain, what's next?"); - return; - } - case "overlay": - case "setoverlay": { - Pattern id; - if (argList.size() < 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [url|mask] [whiteonly]"); - return; - } - if (argList.size() == 2) { - id = we.getPatternFactory().parseFromInput(argList.get(1), context); - generator.setOverlay(id); - } else { - id = we.getPatternFactory().parseFromInput(argList.get(2), context); - BufferedImage img = getImage(argList.get(1), fp); - if (img != null) { - boolean whiteOnly = argList.size() == 4 && Boolean.parseBoolean(argList.get(3)); - generator.setOverlay(img, id, whiteOnly); - } else { - generator.setOverlay(we.getMaskFactory().parseFromInput(argList.get(1), context), id); - } - } - player.sendMessage(BBC.getPrefix() + "Set overlay, what's next?"); - return; - } - case "main": - case "setmain": { - Pattern id; - if (argList.size() < 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [url|mask] [whiteonly]"); - return; - } - if (argList.size() == 2) { - id = we.getPatternFactory().parseFromInput(argList.get(1), context); - generator.setMain(id); - } else { - id = we.getPatternFactory().parseFromInput(argList.get(2), context); - BufferedImage img = getImage(argList.get(1), fp); - if (img != null) { - boolean whiteOnly = argList.size() == 4 && Boolean.parseBoolean(argList.get(3)); - generator.setMain(img, id, whiteOnly); - } else { - generator.setMain(we.getMaskFactory().parseFromInput(argList.get(1), context), id); - } - } - player.sendMessage(BBC.getPrefix() + "Set main, what's next?"); - return; - } - case "floor": - case "setfloor": { - Pattern id; - if (argList.size() < 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [url|mask] [whiteonly]"); - return; - } - if (argList.size() == 2) { - id = we.getPatternFactory().parseFromInput(argList.get(1), context); - generator.setFloor(id); - } else { - id = we.getPatternFactory().parseFromInput(argList.get(2), context); - BufferedImage img = getImage(argList.get(1), fp); - if (img != null) { - boolean whiteOnly = argList.size() == 4 && Boolean.parseBoolean(argList.get(3)); - generator.setFloor(img, id, whiteOnly); - } else { - generator.setFloor(we.getMaskFactory().parseFromInput(argList.get(1), context), id); - } - } - player.sendMessage(BBC.getPrefix() + "Set floor, what's next?"); - return; - } - case "column": - case "setcolumn": { - Pattern id; - if (argList.size() < 2) { - C.COMMAND_SYNTAX.send(player, "/2 cfi " + argList.get(0) + " [url|mask] [whiteonly]"); - return; - } - if (argList.size() == 2) { - id = we.getPatternFactory().parseFromInput(argList.get(1), context); - generator.setColumn(id); - } else { - id = we.getPatternFactory().parseFromInput(argList.get(2), context); - BufferedImage img = getImage(argList.get(1), fp); - if (img != null) { - boolean whiteOnly = argList.size() == 4 && Boolean.parseBoolean(argList.get(3)); - generator.setColumn(img, id, whiteOnly); - } else { - generator.setColumn(we.getMaskFactory().parseFromInput(argList.get(1), context), id); - } - } - player.sendMessage(BBC.getPrefix() + "Set columns, what's next?"); - return; - } - case "create": - case "done": - player.deleteMeta("HMGenerator"); - player.deleteMeta("HMGeneratorPlot"); - player.sendMessage("Generating... (4)"); - try { - generator.generate(); - } catch (IOException e) { - e.printStackTrace(); - player.sendMessage(e.getMessage() + " (see console)"); - return; - } - player.sendMessage("Done!"); - TaskManager.IMP.sync(new RunnableVal() { - @Override - public void run(Object value) { - plot.teleportPlayer(player); - } - }); - return; - case "exit": - case "cancel": - fp.deleteMeta("HMGenerator"); - fp.deleteMeta("HMGeneratorPlot"); - player.sendMessage(BBC.getPrefix() + "Cancelled!"); - return; - default: - C.COMMAND_SYNTAX.send(player, "/2 cfi "); - return; - } - } catch (IOException e) { - player.sendMessage("Invalid url: " + e.getMessage()); - } catch (InputParseException e) { - player.sendMessage("Invalid mask " + e.getMessage()); - } catch (Throwable e) { - e.printStackTrace(); - player.sendMessage("Error " + e.getMessage()); - } finally { - Request.reset(); - } - } - }, true, false); - } - }); - else { - player.sendMessage("Must have the `worlds` component enabled in the PlotSquared config.yml"); - } - } - - private BaseBiome getBiome(String arg, FawePlayer fp) { - World world = fp.getWorld(); - BiomeRegistry biomeRegistry = world.getWorldData().getBiomeRegistry(); - List knownBiomes = biomeRegistry.getBiomes(); - return Biomes.findBiomeByName(knownBiomes, arg, biomeRegistry); - } - - private BufferedImage getImage(String arg, FawePlayer fp) throws IOException { - if (arg.endsWith(".jpg")) { - fp.sendMessage(BBC.getPrefix() + "JPG is lossy, you may see compression artifacts. For large image hosting you can try: empcraft.com/ui"); - } - if (arg.startsWith("http")) { - URL url = new URL(arg); - fp.sendMessage(BBC.getPrefix() + "Downloading image... (3)"); - BufferedImage img = MainUtil.readImage(url); - if (img == null) { - throw new IOException("Failed to read " + url + ", please try again later"); - } - return img; - } - if (arg.startsWith("file://")) { - arg = arg.substring(7); - File file = MainUtil.getFile(MainUtil.getFile(Fawe.imp().getDirectory(), com.boydti.fawe.config.Settings.IMP.PATHS.HEIGHTMAP), arg); - return MainUtil.readImage(file); - } - return null; - } -} \ No newline at end of file diff --git a/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java b/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java index bc156732..cb383211 100644 --- a/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java +++ b/core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java @@ -39,7 +39,6 @@ public class PlotSquaredFeature extends FaweMaskManager { try { new MoveTo512(); if (Settings.Enabled_Components.WORLDS) { - new CreateFromImage(); new ReplaceAll(); } } catch (Throwable e) {