diff --git a/build.gradle b/build.gradle index d1452e298..d246f9ed7 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ plugins { id "de.undercouch.download" version "5.0.1" } -version '2.3.7-1.19.2' // Needs to be version specific +version '2.3.8-1.19.2' // Needs to be version specific def nmsVersion = "1.19.2" //[NMS] def apiVersion = '1.19' def specialSourceVersion = '1.11.0' //[NMS] diff --git a/src/main/java/com/volmit/iris/Iris.java b/src/main/java/com/volmit/iris/Iris.java index 953366dc4..d9e6af165 100644 --- a/src/main/java/com/volmit/iris/Iris.java +++ b/src/main/java/com/volmit/iris/Iris.java @@ -103,7 +103,7 @@ public class Iris extends VolmitPlugin implements Listener { try { fixShading(); InstanceState.updateInstanceId(); - } catch(Throwable ignored) { + } catch (Throwable ignored) { } } @@ -121,7 +121,7 @@ public static T service(Class c) { } public static void callEvent(Event e) { - if(!e.isAsynchronous()) { + if (!e.isAsynchronous()) { J.s(() -> Bukkit.getPluginManager().callEvent(e)); } else { Bukkit.getPluginManager().callEvent(e); @@ -132,11 +132,11 @@ public static KList initialize(String s, Class sli JarScanner js = new JarScanner(instance.getJarFile(), s); KList v = new KList<>(); J.attempt(js::scan); - for(Class i : js.getClasses()) { - if(slicedClass == null || i.isAnnotationPresent(slicedClass)) { + for (Class i : js.getClasses()) { + if (slicedClass == null || i.isAnnotationPresent(slicedClass)) { try { v.add(i.getDeclaredConstructor().newInstance()); - } catch(Throwable ignored) { + } catch (Throwable ignored) { } } @@ -149,11 +149,11 @@ public static KList> getClasses(String s, Class s JarScanner js = new JarScanner(instance.getJarFile(), s); KList> v = new KList<>(); J.attempt(js::scan); - for(Class i : js.getClasses()) { - if(slicedClass == null || i.isAnnotationPresent(slicedClass)) { + for (Class i : js.getClasses()) { + if (slicedClass == null || i.isAnnotationPresent(slicedClass)) { try { v.add(i); - } catch(Throwable ignored) { + } catch (Throwable ignored) { } } @@ -167,7 +167,7 @@ public static KList initialize(String s) { } public static void sq(Runnable r) { - synchronized(syncJobs) { + synchronized (syncJobs) { syncJobs.queue(r); } } @@ -179,27 +179,28 @@ public static File getTemp() { public static void msg(String string) { try { sender.sendMessage(string); - } catch(Throwable e) { + } catch (Throwable e) { try { System.out.println(instance.getTag() + string.replaceAll("(<([^>]+)>)", "")); - } catch(Throwable ignored1) { + } catch (Throwable ignored1) { } } } + public static File getCached(String name, String url) { String h = IO.hash(name + "@" + url); File f = Iris.instance.getDataFile("cache", h.substring(0, 2), h.substring(3, 5), h); - if(!f.exists()) { - try(BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f)) { + if (!f.exists()) { + try (BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f)) { byte[] dataBuffer = new byte[1024]; int bytesRead; - while((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { + while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { fileOutputStream.write(dataBuffer, 0, bytesRead); Iris.verbose("Aquiring " + name); } - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } } @@ -211,19 +212,19 @@ public static String getNonCached(String name, String url) { String h = IO.hash(name + "*" + url); File f = Iris.instance.getDataFile("cache", h.substring(0, 2), h.substring(3, 5), h); - try(BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f)) { + try (BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f)) { byte[] dataBuffer = new byte[1024]; int bytesRead; - while((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { + while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { fileOutputStream.write(dataBuffer, 0, bytesRead); } - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } try { return IO.readAll(f); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } @@ -234,15 +235,15 @@ public static File getNonCachedFile(String name, String url) { String h = IO.hash(name + "*" + url); File f = Iris.instance.getDataFile("cache", h.substring(0, 2), h.substring(3, 5), h); Iris.verbose("Download " + name + " -> " + url); - try(BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f)) { + try (BufferedInputStream in = new BufferedInputStream(new URL(url).openStream()); FileOutputStream fileOutputStream = new FileOutputStream(f)) { byte[] dataBuffer = new byte[1024]; int bytesRead; - while((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { + while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { fileOutputStream.write(dataBuffer, 0, bytesRead); } fileOutputStream.flush(); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); Iris.reportError(e); } @@ -259,32 +260,32 @@ public static void error(String format, Object... objs) { } public static void debug(String string) { - if(!IrisSettings.get().getGeneral().isDebug()) { + if (!IrisSettings.get().getGeneral().isDebug()) { return; } try { throw new RuntimeException(); - } catch(Throwable e) { + } catch (Throwable e) { try { String[] cc = e.getStackTrace()[1].getClassName().split("\\Q.\\E"); - if(cc.length > 5) { + if (cc.length > 5) { debug(cc[3] + "/" + cc[4] + "/" + cc[cc.length - 1], e.getStackTrace()[1].getLineNumber(), string); } else { debug(cc[3] + "/" + cc[4], e.getStackTrace()[1].getLineNumber(), string); } - } catch(Throwable ex) { + } catch (Throwable ex) { debug("Origin", -1, string); } } } public static void debug(String category, int line, String string) { - if(!IrisSettings.get().getGeneral().isDebug()) { + if (!IrisSettings.get().getGeneral().isDebug()) { return; } - if(IrisSettings.get().getGeneral().isUseConsoleCustomColors()) { + if (IrisSettings.get().getGeneral().isUseConsoleCustomColors()) { msg("" + category + " <#bf3b76>" + line + " " + C.LIGHT_PURPLE + string.replaceAll("\\Q<\\E", "[").replaceAll("\\Q>\\E", "]")); } else { msg(C.BLUE + category + ":" + C.AQUA + line + C.RESET + C.LIGHT_PURPLE + " " + string.replaceAll("\\Q<\\E", "[").replaceAll("\\Q>\\E", "]")); @@ -311,12 +312,12 @@ public static void later(NastyRunnable object) { { try { object.run(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } }, RNG.r.i(100, 1200)); - } catch(IllegalPluginAccessException ignored) { + } catch (IllegalPluginAccessException ignored) { } } @@ -326,18 +327,18 @@ public static int jobCount() { } public static void clearQueues() { - synchronized(syncJobs) { + synchronized (syncJobs) { syncJobs.clear(); } } private static int getJavaVersion() { String version = System.getProperty("java.version"); - if(version.startsWith("1.")) { + if (version.startsWith("1.")) { version = version.substring(2, 3); } else { int dot = version.indexOf("."); - if(dot != -1) { + if (dot != -1) { version = version.substring(0, dot); } } @@ -345,10 +346,10 @@ private static int getJavaVersion() { } public static void reportErrorChunk(int x, int z, Throwable e, String extra) { - if(IrisSettings.get().getGeneral().isDebug()) { + if (IrisSettings.get().getGeneral().isDebug()) { File f = instance.getDataFile("debug", "chunk-errors", "chunk." + x + "." + z + ".txt"); - if(!f.exists()) { + if (!f.exists()) { J.attempt(() -> { PrintWriter pw = new PrintWriter(f); pw.println("Thread: " + Thread.currentThread().getName()); @@ -363,16 +364,16 @@ public static void reportErrorChunk(int x, int z, Throwable e, String extra) { } public static void reportError(Throwable e) { - if(IrisSettings.get().getGeneral().isDebug()) { + if (IrisSettings.get().getGeneral().isDebug()) { String n = e.getClass().getCanonicalName() + "-" + e.getStackTrace()[0].getClassName() + "-" + e.getStackTrace()[0].getLineNumber(); - if(e.getCause() != null) { + if (e.getCause() != null) { n += "-" + e.getCause().getStackTrace()[0].getClassName() + "-" + e.getCause().getStackTrace()[0].getLineNumber(); } File f = instance.getDataFile("debug", "caught-exceptions", n + ".txt"); - if(!f.exists()) { + if (!f.exists()) { J.attempt(() -> { PrintWriter pw = new PrintWriter(f); pw.println("Thread: " + Thread.currentThread().getName()); @@ -386,6 +387,44 @@ public static void reportError(Throwable e) { } } + public static void dump() { + try { + File fi = Iris.instance.getDataFile("dump", "td-" + new java.sql.Date(M.ms()) + ".txt"); + FileOutputStream fos = new FileOutputStream(fi); + Map f = Thread.getAllStackTraces(); + PrintWriter pw = new PrintWriter(fos); + for (Thread i : f.keySet()) { + pw.println("========================================"); + pw.println("Thread: '" + i.getName() + "' ID: " + i.getId() + " STATUS: " + i.getState().name()); + + for (StackTraceElement j : f.get(i)) { + pw.println(" @ " + j.toString()); + } + + pw.println("========================================"); + pw.println(); + pw.println(); + } + + pw.close(); + System.out.println("DUMPED! See " + fi.getAbsolutePath()); + } catch (Throwable e) { + e.printStackTrace(); + } + } + + public static void panic() { + EnginePanic.panic(); + } + + public static void addPanic(String s, String v) { + EnginePanic.add(s, v); + } + + private static void fixShading() { + ShadeFix.fix(ComponentSerializer.class); + } + private void enable() { instance = this; services = new KMap<>(); @@ -423,23 +462,21 @@ private void checkForBukkitWorlds() { FileConfiguration fc = new YamlConfiguration(); try { fc.load(new File("bukkit.yml")); - searching: for(String i : fc.getKeys(true)) - { - if(i.startsWith("worlds.") && i.endsWith(".generator")) { + searching: + for (String i : fc.getKeys(true)) { + if (i.startsWith("worlds.") && i.endsWith(".generator")) { String worldName = i.split("\\Q.\\E")[1]; String generator = IrisSettings.get().getGenerator().getDefaultWorldType(); - if(fc.getString(i).startsWith("Iris:")) { + if (fc.getString(i).startsWith("Iris:")) { generator = fc.getString(i).split("\\Q:\\E")[1]; - } else if(fc.getString(i).equals("Iris")) { + } else if (fc.getString(i).equals("Iris")) { generator = IrisSettings.get().getGenerator().getDefaultWorldType(); } else { continue; } - for(World j : Bukkit.getWorlds()) - { - if(j.getName().equals(worldName)) - { + for (World j : Bukkit.getWorlds()) { + if (j.getName().equals(worldName)) { continue searching; } } @@ -447,31 +484,31 @@ private void checkForBukkitWorlds() { Iris.warn("Detected an Iris World in the bukkit yml '" + worldName + "' using Iris that was not loaded by bukkit. Good Guy Iris will load it up for you!"); Iris.info(C.LIGHT_PURPLE + "Preparing Spawn for " + worldName + "' using Iris:" + generator); World world = new WorldCreator(worldName) - .generator(getDefaultWorldGenerator(worldName, generator)) - .environment(IrisData.loadAnyDimension(generator).getEnvironment()) - .createWorld(); + .generator(getDefaultWorldGenerator(worldName, generator)) + .environment(IrisData.loadAnyDimension(generator).getEnvironment()) + .createWorld(); Iris.info(C.LIGHT_PURPLE + "Loaded " + worldName + "!"); } } - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } private void autoStartStudio() { - if(IrisSettings.get().getStudio().isAutoStartDefaultStudio()) { + if (IrisSettings.get().getStudio().isAutoStartDefaultStudio()) { Iris.info("Starting up auto Studio!"); try { Player r = new KList<>(getServer().getOnlinePlayers()).getRandom(); Iris.service(StudioSVC.class).open(r != null ? new VolmitSender(r) : sender, 1337, IrisSettings.get().getGenerator().getDefaultWorldType(), (w) -> { J.s(() -> { - for(Player i : getServer().getOnlinePlayers()) { + for (Player i : getServer().getOnlinePlayers()) { i.setGameMode(GameMode.SPECTATOR); i.teleport(new Location(w, 0, 200, 0)); } }); }); - } catch(IrisException e) { + } catch (IrisException e) { e.printStackTrace(); } } @@ -480,7 +517,7 @@ private void autoStartStudio() { private void setupAudience() { try { audiences = BukkitAudiences.create(this); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); IrisSettings.get().getGeneral().setUseConsoleCustomColors(false); IrisSettings.get().getGeneral().setUseCustomColorsIngame(false); @@ -488,44 +525,10 @@ private void setupAudience() { } } - public static void dump() { - try { - File fi = Iris.instance.getDataFile("dump", "td-" + new java.sql.Date(M.ms()) + ".txt"); - FileOutputStream fos = new FileOutputStream(fi); - Map f = Thread.getAllStackTraces(); - PrintWriter pw = new PrintWriter(fos); - for(Thread i : f.keySet()) { - pw.println("========================================"); - pw.println("Thread: '" + i.getName() + "' ID: " + i.getId() + " STATUS: " + i.getState().name()); - - for(StackTraceElement j : f.get(i)) { - pw.println(" @ " + j.toString()); - } - - pw.println("========================================"); - pw.println(); - pw.println(); - } - - pw.close(); - System.out.println("DUMPED! See " + fi.getAbsolutePath()); - } catch(Throwable e) { - e.printStackTrace(); - } - } - public void postShutdown(Runnable r) { postShutdown.add(r); } - public static void panic() { - EnginePanic.panic(); - } - - public static void addPanic(String s, String v) { - EnginePanic.add(s, v); - } - public void onEnable() { enable(); super.onEnable(); @@ -542,12 +545,8 @@ public void onDisable() { super.onDisable(); } - private static void fixShading() { - ShadeFix.fix(ComponentSerializer.class); - } - private void setupPapi() { - if(Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) { + if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) { new IrisPapiExpansion().register(); } } @@ -568,7 +567,7 @@ public String getTag(String subTag) { } private void checkConfigHotload() { - if(configWatcher.checkModified()) { + if (configWatcher.checkModified()) { IrisSettings.invalidate(); IrisSettings.get(); configWatcher.checkModified(); @@ -577,17 +576,17 @@ private void checkConfigHotload() { } private void tickQueue() { - synchronized(Iris.syncJobs) { - if(!Iris.syncJobs.hasNext()) { + synchronized (Iris.syncJobs) { + if (!Iris.syncJobs.hasNext()) { return; } long ms = M.ms(); - while(Iris.syncJobs.hasNext() && M.ms() - ms < 25) { + while (Iris.syncJobs.hasNext() && M.ms() - ms < 25) { try { Iris.syncJobs.next().run(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } @@ -596,7 +595,7 @@ private void tickQueue() { } private void bstats() { - if(IrisSettings.get().getGeneral().isPluginMetrics()) { + if (IrisSettings.get().getGeneral().isPluginMetrics()) { J.s(() -> new Metrics(Iris.instance, 8757)); } } @@ -620,12 +619,12 @@ public BiomeProvider getDefaultBiomeProvider(@NotNull String worldName, @Nullabl @Override public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) { Iris.debug("Default World Generator Called for " + worldName + " using ID: " + id); - if(worldName.equals("test")) { + if (worldName.equals("test")) { try { throw new RuntimeException(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.info(e.getStackTrace()[1].getClassName()); - if(e.getStackTrace()[1].getClassName().contains("com.onarandombox.MultiverseCore")) { + if (e.getStackTrace()[1].getClassName().contains("com.onarandombox.MultiverseCore")) { Iris.debug("MVC Test detected, Quick! Send them the dummy!"); return new DummyChunkGenerator(); } @@ -633,20 +632,20 @@ public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) { } IrisDimension dim; - if(id == null || id.isEmpty()) { + if (id == null || id.isEmpty()) { dim = IrisData.loadAnyDimension(IrisSettings.get().getGenerator().getDefaultWorldType()); } else { dim = IrisData.loadAnyDimension(id); } Iris.debug("Generator ID: " + id + " requested by bukkit/plugin"); - if(dim == null) { + if (dim == null) { Iris.warn("Unable to find dimension type " + id + " Looking for online packs..."); service(StudioSVC.class).downloadSearch(new VolmitSender(Bukkit.getConsoleSender()), id, true); dim = IrisData.loadAnyDimension(id); - if(dim == null) { + if (dim == null) { throw new RuntimeException("Can't find dimension " + id + "!"); } else { Iris.info("Resolved missing dimension, proceeding with generation."); @@ -656,18 +655,18 @@ public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) { Iris.debug("Assuming IrisDimension: " + dim.getName()); IrisWorld w = IrisWorld.builder() - .name(worldName) - .seed(1337) - .environment(dim.getEnvironment()) - .worldFolder(new File(worldName)) - .minHeight(dim.getMinHeight()) - .maxHeight(dim.getMaxHeight()) - .build(); + .name(worldName) + .seed(1337) + .environment(dim.getEnvironment()) + .worldFolder(new File(worldName)) + .minHeight(dim.getMinHeight()) + .maxHeight(dim.getMaxHeight()) + .build(); Iris.debug("Generator Config: " + w.toString()); File ff = new File(w.worldFolder(), "iris/pack"); - if(!ff.exists() || ff.listFiles().length == 0) { + if (!ff.exists() || ff.listFiles().length == 0) { ff.mkdirs(); service(StudioSVC.class).installIntoWorld(sender, dim.getLoadKey(), ff.getParentFile()); } @@ -676,7 +675,7 @@ public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) { } public void splash() { - if(!IrisSettings.get().getGeneral().isSplashLogoStartup()) { + if (!IrisSettings.get().getGeneral().isSplashLogoStartup()) { return; } @@ -705,7 +704,7 @@ public void splash() { Iris.info("Custom Biomes: " + INMS.get().countCustomBiomes()); printPacks(); - for(int i = 0; i < info.length; i++) { + for (int i = 0; i < info.length; i++) { splash[i] += info[i]; } @@ -715,21 +714,22 @@ public void splash() { private void printPacks() { File packFolder = Iris.service(StudioSVC.class).getWorkspaceFolder(); File[] packs = packFolder.listFiles(File::isDirectory); - if(packs == null || packs.length == 0) + if (packs == null || packs.length == 0) return; Iris.info("Custom Dimensions: " + packs.length); - for(File f : packs) + for (File f : packs) printPack(f); } private void printPack(File pack) { String dimName = pack.getName(); String version = "???"; - try(FileReader r = new FileReader(new File(pack, "dimensions/" + dimName + ".json"))) { + try (FileReader r = new FileReader(new File(pack, "dimensions/" + dimName + ".json"))) { JsonObject json = JsonParser.parseReader(r).getAsJsonObject(); - if(json.has("version")) + if (json.has("version")) version = json.get("version").getAsString(); - } catch(IOException | JsonParseException ignored) { } + } catch (IOException | JsonParseException ignored) { + } Iris.info(" " + dimName + " v" + version); } } diff --git a/src/main/java/com/volmit/iris/core/IrisSettings.java b/src/main/java/com/volmit/iris/core/IrisSettings.java index 877440f45..c389cc963 100644 --- a/src/main/java/com/volmit/iris/core/IrisSettings.java +++ b/src/main/java/com/volmit/iris/core/IrisSettings.java @@ -43,13 +43,64 @@ public class IrisSettings { private IrisSettingsPerformance performance = new IrisSettingsPerformance(); public static int getThreadCount(int c) { - return switch(c) { + return switch (c) { case -1, -2, -4 -> Runtime.getRuntime().availableProcessors() / -c; case 0, 1, 2 -> 1; default -> Math.max(c, 2); }; } + public static IrisSettings get() { + if (settings != null) { + return settings; + } + + settings = new IrisSettings(); + + File s = Iris.instance.getDataFile("settings.json"); + + if (!s.exists()) { + try { + IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4)); + } catch (JSONException | IOException e) { + e.printStackTrace(); + Iris.reportError(e); + } + } else { + try { + String ss = IO.readAll(s); + settings = new Gson().fromJson(ss, IrisSettings.class); + try { + IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4)); + } catch (IOException e) { + e.printStackTrace(); + } + } catch (Throwable ee) { + // Iris.reportError(ee); causes a self-reference & stackoverflow + Iris.error("Configuration Error in settings.json! " + ee.getClass().getSimpleName() + ": " + ee.getMessage()); + } + } + + return settings; + } + + public static void invalidate() { + synchronized (settings) { + settings = null; + } + } + + public void forceSave() { + File s = Iris.instance.getDataFile("settings.json"); + + try { + IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4)); + } catch (JSONException | IOException e) { + e.printStackTrace(); + Iris.reportError(e); + } + } + @Data public static class IrisSettingsAutoconfiguration { public boolean configureSpigotTimeoutTime = true; @@ -132,55 +183,4 @@ public static class IrisSettingsStudio { public boolean disableTimeAndWeather = true; public boolean autoStartDefaultStudio = false; } - - public static IrisSettings get() { - if(settings != null) { - return settings; - } - - settings = new IrisSettings(); - - File s = Iris.instance.getDataFile("settings.json"); - - if(!s.exists()) { - try { - IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4)); - } catch(JSONException | IOException e) { - e.printStackTrace(); - Iris.reportError(e); - } - } else { - try { - String ss = IO.readAll(s); - settings = new Gson().fromJson(ss, IrisSettings.class); - try { - IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4)); - } catch(IOException e) { - e.printStackTrace(); - } - } catch(Throwable ee) { - // Iris.reportError(ee); causes a self-reference & stackoverflow - Iris.error("Configuration Error in settings.json! " + ee.getClass().getSimpleName() + ": " + ee.getMessage()); - } - } - - return settings; - } - - public static void invalidate() { - synchronized(settings) { - settings = null; - } - } - - public void forceSave() { - File s = Iris.instance.getDataFile("settings.json"); - - try { - IO.writeAll(s, new JSONObject(new Gson().toJson(settings)).toString(4)); - } catch(JSONException | IOException e) { - e.printStackTrace(); - Iris.reportError(e); - } - } } diff --git a/src/main/java/com/volmit/iris/core/ServerConfigurator.java b/src/main/java/com/volmit/iris/core/ServerConfigurator.java index dded4b582..02c6985f3 100644 --- a/src/main/java/com/volmit/iris/core/ServerConfigurator.java +++ b/src/main/java/com/volmit/iris/core/ServerConfigurator.java @@ -43,11 +43,11 @@ public class ServerConfigurator { public static void configure() { IrisSettings.IrisSettingsAutoconfiguration s = IrisSettings.get().getAutoConfiguration(); - if(s.isConfigureSpigotTimeoutTime()) { + if (s.isConfigureSpigotTimeoutTime()) { J.attempt(ServerConfigurator::increaseKeepAliveSpigot); } - if(s.isConfigurePaperWatchdogDelay()) { + if (s.isConfigurePaperWatchdogDelay()) { J.attempt(ServerConfigurator::increasePaperWatchdog); } @@ -60,7 +60,7 @@ private static void increaseKeepAliveSpigot() throws IOException, InvalidConfigu f.load(spigotConfig); long tt = f.getLong("settings.timeout-time"); - if(tt < TimeUnit.MINUTES.toSeconds(5)) { + if (tt < TimeUnit.MINUTES.toSeconds(5)) { Iris.warn("Updating spigot.yml timeout-time: " + tt + " -> " + TimeUnit.MINUTES.toSeconds(5) + " (5 minutes)"); Iris.warn("You can disable this change (autoconfigureServer) in Iris settings, then change back the value."); f.set("settings.timeout-time", TimeUnit.MINUTES.toSeconds(5)); @@ -74,7 +74,7 @@ private static void increasePaperWatchdog() throws IOException, InvalidConfigura f.load(spigotConfig); long tt = f.getLong("watchdog.early-warning-delay"); - if(tt < TimeUnit.MINUTES.toMillis(3)) { + if (tt < TimeUnit.MINUTES.toMillis(3)) { Iris.warn("Updating paper.yml watchdog early-warning-delay: " + tt + " -> " + TimeUnit.MINUTES.toMillis(3) + " (3 minutes)"); Iris.warn("You can disable this change (autoconfigureServer) in Iris settings, then change back the value."); f.set("watchdog.early-warning-delay", TimeUnit.MINUTES.toMillis(3)); @@ -83,7 +83,7 @@ private static void increasePaperWatchdog() throws IOException, InvalidConfigura } private static List getDatapacksFolder() { - if(!IrisSettings.get().getGeneral().forceMainWorld.isEmpty()) { + if (!IrisSettings.get().getGeneral().forceMainWorld.isEmpty()) { return new KList().qadd(new File(IrisSettings.get().getGeneral().forceMainWorld + "/datapacks")); } KList worlds = new KList<>(); @@ -96,24 +96,24 @@ public static void installDataPacks(boolean fullInstall) { Iris.info("Checking Data Packs..."); File packs = new File("plugins/Iris/packs"); - if(packs.exists()) { - for(File i : packs.listFiles()) { - if(i.isDirectory()) { + if (packs.exists()) { + for (File i : packs.listFiles()) { + if (i.isDirectory()) { Iris.verbose("Checking Pack: " + i.getPath()); IrisData data = IrisData.get(i); File dims = new File(i, "dimensions"); - if(dims.exists()) { - for(File j : dims.listFiles()) { - if(j.getName().endsWith(".json")) { + if (dims.exists()) { + for (File j : dims.listFiles()) { + if (j.getName().endsWith(".json")) { IrisDimension dim = data.getDimensionLoader().load(j.getName().split("\\Q.\\E")[0]); - if(dim == null) { + if (dim == null) { continue; } Iris.verbose(" Checking Dimension " + dim.getLoadFile().getPath()); - for(File dpack : getDatapacksFolder()) { + for (File dpack : getDatapacksFolder()) { dim.installDataPack(() -> data, dpack); } } @@ -125,7 +125,7 @@ public static void installDataPacks(boolean fullInstall) { Iris.info("Data Packs Setup!"); - if(fullInstall) + if (fullInstall) verifyDataPacksPost(IrisSettings.get().getAutoConfiguration().isAutoRestartOnCustomBiomeInstall()); } @@ -133,24 +133,24 @@ private static void verifyDataPacksPost(boolean allowRestarting) { File packs = new File("plugins/Iris/packs"); boolean bad = false; - if(packs.exists()) { - for(File i : packs.listFiles()) { - if(i.isDirectory()) { + if (packs.exists()) { + for (File i : packs.listFiles()) { + if (i.isDirectory()) { Iris.verbose("Checking Pack: " + i.getPath()); IrisData data = IrisData.get(i); File dims = new File(i, "dimensions"); - if(dims.exists()) { - for(File j : dims.listFiles()) { - if(j.getName().endsWith(".json")) { + if (dims.exists()) { + for (File j : dims.listFiles()) { + if (j.getName().endsWith(".json")) { IrisDimension dim = data.getDimensionLoader().load(j.getName().split("\\Q.\\E")[0]); - if(dim == null) { + if (dim == null) { Iris.error("Failed to load " + j.getPath() + " "); continue; } - if(!verifyDataPackInstalled(dim)) { + if (!verifyDataPackInstalled(dim)) { bad = true; } } @@ -160,10 +160,10 @@ private static void verifyDataPacksPost(boolean allowRestarting) { } } - if(bad) { - if(allowRestarting) { + if (bad) { + if (allowRestarting) { restart(); - } else if(INMS.get().supportsDataPacks()) { + } else if (INMS.get().supportsDataPacks()) { Iris.error("============================================================================"); Iris.error(C.ITALIC + "You need to restart your server to properly generate custom biomes."); Iris.error(C.ITALIC + "By continuing, Iris will use backup biomes in place of the custom biomes."); @@ -171,8 +171,8 @@ private static void verifyDataPacksPost(boolean allowRestarting) { Iris.error(C.UNDERLINE + "IT IS HIGHLY RECOMMENDED YOU RESTART THE SERVER BEFORE GENERATING!"); Iris.error("============================================================================"); - for(Player i : Bukkit.getOnlinePlayers()) { - if(i.isOp() || i.hasPermission("iris.all")) { + for (Player i : Bukkit.getOnlinePlayers()) { + if (i.isOp() || i.hasPermission("iris.all")) { VolmitSender sender = new VolmitSender(i, Iris.instance.getTag("WARNING")); sender.sendMessage("There are some Iris Packs that have custom biomes in them"); sender.sendMessage("You need to restart your server to use these packs."); @@ -202,16 +202,16 @@ public static boolean verifyDataPackInstalled(IrisDimension dimension) { KSet keys = new KSet<>(); boolean warn = false; - for(IrisBiome i : dimension.getAllBiomes(() -> idm)) { - if(i.isCustom()) { - for(IrisBiomeCustom j : i.getCustomDerivitives()) { + for (IrisBiome i : dimension.getAllBiomes(() -> idm)) { + if (i.isCustom()) { + for (IrisBiomeCustom j : i.getCustomDerivitives()) { keys.add(dimension.getLoadKey() + ":" + j.getId()); } } } - if(!INMS.get().supportsDataPacks()) { - if(!keys.isEmpty()) { + if (!INMS.get().supportsDataPacks()) { + if (!keys.isEmpty()) { Iris.warn("==================================================================================="); Iris.warn("Pack " + dimension.getLoadKey() + " has " + keys.size() + " custom biome(s). "); Iris.warn("Your server version does not yet support datapacks for iris."); @@ -222,16 +222,16 @@ public static boolean verifyDataPackInstalled(IrisDimension dimension) { return true; } - for(String i : keys) { + for (String i : keys) { Object o = INMS.get().getCustomBiomeBaseFor(i); - if(o == null) { + if (o == null) { Iris.warn("The Biome " + i + " is not registered on the server."); warn = true; } } - if(warn) { + if (warn) { Iris.error("The Pack " + dimension.getLoadKey() + " is INCAPABLE of generating custom biomes"); Iris.error("If not done automatically, restart your server before generating with this pack!"); } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandEdit.java b/src/main/java/com/volmit/iris/core/commands/CommandEdit.java index 30afeafb8..345b3f214 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandEdit.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandEdit.java @@ -34,15 +34,15 @@ public class CommandEdit implements DecreeExecutor { private boolean noStudio() { - if(!sender().isPlayer()) { + if (!sender().isPlayer()) { sender().sendMessage(C.RED + "Players only!"); return true; } - if(!Iris.service(StudioSVC.class).isProjectOpen()) { + if (!Iris.service(StudioSVC.class).isProjectOpen()) { sender().sendMessage(C.RED + "No studio world is open!"); return true; } - if(!engine().isStudio()) { + if (!engine().isStudio()) { sender().sendMessage(C.RED + "You must be in a studio world!"); return true; } @@ -52,17 +52,17 @@ private boolean noStudio() { @Decree(description = "Edit the biome you specified", aliases = {"b"}, origin = DecreeOrigin.PLAYER) public void biome(@Param(contextual = false, description = "The biome to edit") IrisBiome biome) { - if(noStudio()) { + if (noStudio()) { return; } try { - if(biome == null || biome.getLoadFile() == null) { + if (biome == null || biome.getLoadFile() == null) { sender().sendMessage(C.GOLD + "Cannot find the file; Perhaps it was not loaded directly from a file?"); return; } Desktop.getDesktop().open(biome.getLoadFile()); sender().sendMessage(C.GREEN + "Opening " + biome.getTypeName() + " " + biome.getLoadFile().getName().split("\\Q.\\E")[0] + " in VSCode! "); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cant find the file. Or registrant does not exist"); } @@ -70,17 +70,17 @@ public void biome(@Param(contextual = false, description = "The biome to edit") @Decree(description = "Edit the region you specified", aliases = {"r"}, origin = DecreeOrigin.PLAYER) public void region(@Param(contextual = false, description = "The region to edit") IrisRegion region) { - if(noStudio()) { + if (noStudio()) { return; } try { - if(region == null || region.getLoadFile() == null) { + if (region == null || region.getLoadFile() == null) { sender().sendMessage(C.GOLD + "Cannot find the file; Perhaps it was not loaded directly from a file?"); return; } Desktop.getDesktop().open(region.getLoadFile()); sender().sendMessage(C.GREEN + "Opening " + region.getTypeName() + " " + region.getLoadFile().getName().split("\\Q.\\E")[0] + " in VSCode! "); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cant find the file. Or registrant does not exist"); } @@ -88,17 +88,17 @@ public void region(@Param(contextual = false, description = "The region to edit" @Decree(description = "Edit the dimension you specified", aliases = {"d"}, origin = DecreeOrigin.PLAYER) public void dimension(@Param(contextual = false, description = "The dimension to edit") IrisDimension dimension) { - if(noStudio()) { + if (noStudio()) { return; } try { - if(dimension == null || dimension.getLoadFile() == null) { + if (dimension == null || dimension.getLoadFile() == null) { sender().sendMessage(C.GOLD + "Cannot find the file; Perhaps it was not loaded directly from a file?"); return; } Desktop.getDesktop().open(dimension.getLoadFile()); sender().sendMessage(C.GREEN + "Opening " + dimension.getTypeName() + " " + dimension.getLoadFile().getName().split("\\Q.\\E")[0] + " in VSCode! "); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cant find the file. Or registrant does not exist"); } @@ -106,17 +106,17 @@ public void dimension(@Param(contextual = false, description = "The dimension to @Decree(description = "Edit the cave file you specified", aliases = {"c"}, origin = DecreeOrigin.PLAYER) public void cave(@Param(contextual = false, description = "The cave to edit") IrisCave cave) { - if(noStudio()) { + if (noStudio()) { return; } try { - if(cave == null || cave.getLoadFile() == null) { + if (cave == null || cave.getLoadFile() == null) { sender().sendMessage(C.GOLD + "Cannot find the file; Perhaps it was not loaded directly from a file?"); return; } Desktop.getDesktop().open(cave.getLoadFile()); sender().sendMessage(C.GREEN + "Opening " + cave.getTypeName() + " " + cave.getLoadFile().getName().split("\\Q.\\E")[0] + " in VSCode! "); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cant find the file. Or registrant does not exist"); } @@ -124,17 +124,17 @@ public void cave(@Param(contextual = false, description = "The cave to edit") Ir @Decree(description = "Edit the structure file you specified", aliases = {"jigsawstructure", "structure"}, origin = DecreeOrigin.PLAYER) public void jigsaw(@Param(contextual = false, description = "The jigsaw structure to edit") IrisJigsawStructure jigsaw) { - if(noStudio()) { + if (noStudio()) { return; } try { - if(jigsaw == null || jigsaw.getLoadFile() == null) { + if (jigsaw == null || jigsaw.getLoadFile() == null) { sender().sendMessage(C.GOLD + "Cannot find the file; Perhaps it was not loaded directly from a file?"); return; } Desktop.getDesktop().open(jigsaw.getLoadFile()); sender().sendMessage(C.GREEN + "Opening " + jigsaw.getTypeName() + " " + jigsaw.getLoadFile().getName().split("\\Q.\\E")[0] + " in VSCode! "); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cant find the file. Or registrant does not exist"); } @@ -142,17 +142,17 @@ public void jigsaw(@Param(contextual = false, description = "The jigsaw structur @Decree(description = "Edit the pool file you specified", aliases = {"jigsawpool", "pool"}, origin = DecreeOrigin.PLAYER) public void jigsawPool(@Param(contextual = false, description = "The jigsaw pool to edit") IrisJigsawPool pool) { - if(noStudio()) { + if (noStudio()) { return; } try { - if(pool == null || pool.getLoadFile() == null) { + if (pool == null || pool.getLoadFile() == null) { sender().sendMessage(C.GOLD + "Cannot find the file; Perhaps it was not loaded directly from a file?"); return; } Desktop.getDesktop().open(pool.getLoadFile()); sender().sendMessage(C.GREEN + "Opening " + pool.getTypeName() + " " + pool.getLoadFile().getName().split("\\Q.\\E")[0] + " in VSCode! "); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cant find the file. Or registrant does not exist"); } @@ -160,17 +160,17 @@ public void jigsawPool(@Param(contextual = false, description = "The jigsaw pool @Decree(description = "Edit the jigsaw piece file you specified", aliases = {"jigsawpiece", "piece"}, origin = DecreeOrigin.PLAYER) public void jigsawPiece(@Param(contextual = false, description = "The jigsaw piece to edit") IrisJigsawPiece piece) { - if(noStudio()) { + if (noStudio()) { return; } try { - if(piece == null || piece.getLoadFile() == null) { + if (piece == null || piece.getLoadFile() == null) { sender().sendMessage(C.GOLD + "Cannot find the file; Perhaps it was not loaded directly from a file?"); return; } Desktop.getDesktop().open(piece.getLoadFile()); sender().sendMessage(C.GREEN + "Opening " + piece.getTypeName() + " " + piece.getLoadFile().getName().split("\\Q.\\E")[0] + " in VSCode! "); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cant find the file. Or registrant does not exist"); } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandFind.java b/src/main/java/com/volmit/iris/core/commands/CommandFind.java index 1a461b8d4..a85728803 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandFind.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandFind.java @@ -28,7 +28,6 @@ import com.volmit.iris.util.decree.annotations.Param; import com.volmit.iris.util.decree.specialhandlers.ObjectHandler; import com.volmit.iris.util.format.C; -import org.bukkit.generator.structure.StructureType; @Decree(name = "find", origin = DecreeOrigin.PLAYER, description = "Iris Find commands", aliases = "goto") public class CommandFind implements DecreeExecutor { @@ -39,7 +38,7 @@ public void biome( ) { Engine e = engine(); - if(e == null) { + if (e == null) { sender().sendMessage(C.GOLD + "Not in an Iris World!"); return; } @@ -54,7 +53,7 @@ public void region( ) { Engine e = engine(); - if(e == null) { + if (e == null) { sender().sendMessage(C.GOLD + "Not in an Iris World!"); return; } @@ -69,7 +68,7 @@ public void structure( ) { Engine e = engine(); - if(e == null) { + if (e == null) { sender().sendMessage(C.GOLD + "Not in an Iris World!"); return; } @@ -83,7 +82,7 @@ public void poi( String type ) { Engine e = engine(); - if(e == null) { + if (e == null) { sender().sendMessage(C.GOLD + "Not in an Iris World!"); return; } @@ -98,7 +97,7 @@ public void object( ) { Engine e = engine(); - if(e == null) { + if (e == null) { sender().sendMessage(C.GOLD + "Not in an Iris World!"); return; } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandIris.java b/src/main/java/com/volmit/iris/core/commands/CommandIris.java index fff7e4384..20f1755ae 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandIris.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandIris.java @@ -67,13 +67,13 @@ public void create( @Param(description = "The seed to generate the world with", defaultValue = "1337") long seed ) { - if(name.equals("iris")) { + if (name.equals("iris")) { sender().sendMessage(C.RED + "You cannot use the world name \"iris\" for creating worlds as Iris uses this directory for studio worlds."); sender().sendMessage(C.RED + "May we suggest the name \"IrisWorld\" instead?"); return; } - if(new File(name).exists()) { + if (new File(name).exists()) { sender().sendMessage(C.RED + "That folder already exists!"); return; } @@ -86,7 +86,7 @@ public void create( .sender(sender()) .studio(false) .create(); - } catch(Throwable e) { + } catch (Throwable e) { sender().sendMessage(C.RED + "Exception raised during creation. See the console for more details."); Iris.error("Exception raised during world creation: " + e.getMessage()); Iris.reportError(e); @@ -103,24 +103,24 @@ public void remove( @Param(description = "Whether to also remove the folder (if set to false, just does not load the world)", defaultValue = "true") boolean delete ) { - if(!IrisToolbelt.isIrisWorld(world)) { + if (!IrisToolbelt.isIrisWorld(world)) { sender().sendMessage(C.RED + "This is not an Iris world. Iris worlds: " + String.join(", ", Bukkit.getServer().getWorlds().stream().filter(IrisToolbelt::isIrisWorld).map(World::getName).toList())); return; } sender().sendMessage(C.GREEN + "Removing world: " + world.getName()); try { - if(IrisToolbelt.removeWorld(world)) { + if (IrisToolbelt.removeWorld(world)) { sender().sendMessage(C.GREEN + "Successfully removed " + world.getName() + " from bukkit.yml"); } else { sender().sendMessage(C.YELLOW + "Looks like the world was already removed from bukkit.yml"); } - } catch(IOException e) { + } catch (IOException e) { sender().sendMessage(C.RED + "Failed to save bukkit.yml because of " + e.getMessage()); e.printStackTrace(); } IrisToolbelt.evacuate(world, "Deleting world"); Bukkit.unloadWorld(world, false); - if(delete && world.getWorldFolder().delete()) { + if (delete && world.getWorldFolder().delete()) { sender().sendMessage(C.GREEN + "Successfully removed world folder"); } else { sender().sendMessage(C.RED + "Failed to remove world folder"); @@ -170,7 +170,7 @@ public void bitwise( int value2 ) { Integer v = null; - switch(operator) { + switch (operator) { case "|" -> v = value1 | value2; case "&" -> v = value1 & value2; case "^" -> v = value1 ^ value2; @@ -178,7 +178,7 @@ public void bitwise( case ">>" -> v = value1 >> value2; case "<<" -> v = value1 << value2; } - if(v == null) { + if (v == null) { sender().sendMessage(C.RED + "The operator you entered: (" + operator + ") is invalid!"); return; } @@ -208,7 +208,7 @@ public void download( boolean overwrite ) { sender().sendMessage(C.GREEN + "Downloading pack: " + pack + "/" + branch + (trim ? " trimmed" : "") + (overwrite ? " overwriting" : "")); - if(pack.equals("overworld")) { + if (pack.equals("overworld")) { String url = "https://github.com/IrisDimensions/overworld/releases/download/" + Iris.OVERWORLD_TAG + "/overworld.zip"; Iris.service(StudioSVC.class).downloadRelease(sender(), url, trim, overwrite); } else { @@ -218,7 +218,7 @@ public void download( @Decree(description = "Get metrics for your world", aliases = "measure", origin = DecreeOrigin.PLAYER) public void metrics() { - if(!IrisToolbelt.isIrisWorld(world())) { + if (!IrisToolbelt.isIrisWorld(world())) { sender().sendMessage(C.RED + "You must be in an Iris world"); return; } @@ -238,7 +238,7 @@ public void regen( @Param(name = "radius", description = "The radius of nearby cunks", defaultValue = "5") int radius ) { - if(IrisToolbelt.isIrisWorld(player().getWorld())) { + if (IrisToolbelt.isIrisWorld(player().getWorld())) { VolmitSender sender = sender(); J.a(() -> { DecreeContext.touch(sender); @@ -250,18 +250,18 @@ public void regen( BurstExecutor b = MultiBurst.burst.burst(); b.setMulticore(false); int rad = engine.getMantle().getRealRadius(); - for(int i = -(radius + rad); i <= radius + rad; i++) { - for(int j = -(radius + rad); j <= radius + rad; j++) { + for (int i = -(radius + rad); i <= radius + rad; i++) { + for (int j = -(radius + rad); j <= radius + rad; j++) { engine.getMantle().getMantle().deleteChunk(i + cx.getX(), j + cx.getZ()); } } - for(int i = -radius; i <= radius; i++) { - for(int j = -radius; j <= radius; j++) { + for (int i = -radius; i <= radius; i++) { + for (int j = -radius; j <= radius; j++) { int finalJ = j; int finalI = i; b.queue(() -> plat.injectChunkReplacement(player().getWorld(), finalI + cx.getX(), finalJ + cx.getZ(), (f) -> { - synchronized(js) { + synchronized (js) { js.add(f); } })); @@ -277,11 +277,11 @@ public void regen( public void execute(Runnable runnable) { futures.add(J.sfut(runnable)); - if(futures.size() > 64) { - while(futures.isNotEmpty()) { + if (futures.size() > 64) { + while (futures.isNotEmpty()) { try { futures.remove(0).get(); - } catch(InterruptedException | ExecutionException e) { + } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } } @@ -295,7 +295,7 @@ public String getName() { }; r.queue(js); r.execute(sender()); - } catch(Throwable e) { + } catch (Throwable e) { sender().sendMessage("Unable to parse view-distance"); } }); @@ -315,7 +315,7 @@ public void updateWorld( @Param(description = "Should Iris download the pack again for you", defaultValue = "false", name = "fresh-download", aliases = {"fresh", "new"}) boolean freshDownload ) { - if(!confirm) { + if (!confirm) { sender().sendMessage(new String[]{ C.RED + "You should always make a backup before using this", C.YELLOW + "Issues caused by this can be, but are not limited to:", @@ -333,7 +333,7 @@ public void updateWorld( File folder = world.getWorldFolder(); folder.mkdirs(); - if(freshDownload) { + if (freshDownload) { Iris.service(StudioSVC.class).downloadSearch(sender(), pack.getLoadKey(), false, true); } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java b/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java index 22f4547ef..922041241 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandJigsaw.java @@ -71,7 +71,7 @@ public void create( ) { IrisObject o = IrisData.loadAnyObject(object); - if(object == null) { + if (object == null) { sender().sendMessage(C.RED + "Failed to find existing object"); return; } @@ -88,7 +88,7 @@ public void create( public void exit() { JigsawEditor editor = JigsawEditor.editors.get(player()); - if(editor == null) { + if (editor == null) { sender().sendMessage(C.GOLD + "You don't have any pieces open to exit!"); return; } @@ -101,7 +101,7 @@ public void exit() { public void save() { JigsawEditor editor = JigsawEditor.editors.get(player()); - if(editor == null) { + if (editor == null) { sender().sendMessage(C.GOLD + "You don't have any pieces open to save!"); return; } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandObject.java b/src/main/java/com/volmit/iris/core/commands/CommandObject.java index 219c4c16f..aa8d47566 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandObject.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandObject.java @@ -74,7 +74,7 @@ public void set(int x, int y, int z, BlockData d) { Block block = world.getBlockAt(x, y, z); //Prevent blocks being set in or bellow bedrock - if(y <= world.getMinHeight() || block.getType() == Material.BEDROCK) return; + if (y <= world.getMinHeight() || block.getType() == Material.BEDROCK) return; futureBlockChanges.put(block, block.getBlockData()); @@ -143,19 +143,19 @@ public void analyze( Map> unsorted = new HashMap<>(); Map amounts = new HashMap<>(); Map materials = new HashMap<>(); - while(queue.hasNext()) { + while (queue.hasNext()) { BlockData block = queue.next(); //unsorted.put(block.getMaterial(), block); - if(!amounts.containsKey(block)) { + if (!amounts.containsKey(block)) { amounts.put(block, 1); } else amounts.put(block, amounts.get(block) + 1); - if(!materials.containsKey(block.getMaterial())) { + if (!materials.containsKey(block.getMaterial())) { materials.put(block.getMaterial(), 1); unsorted.put(block.getMaterial(), new HashSet<>()); unsorted.get(block.getMaterial()).add(block); @@ -173,7 +173,7 @@ public void analyze( sender().sendMessage("== Blocks in object =="); int n = 0; - for(Material mat : sortedMats) { + for (Material mat : sortedMats) { int amount = materials.get(mat); List set = new ArrayList<>(unsorted.get(mat)); set.sort(Comparator.comparingInt(amounts::get).reversed()); @@ -181,7 +181,7 @@ public void analyze( int dataAmount = amounts.get(data); String string = " - " + mat.toString() + "*" + amount; - if(data.getAsString(true).contains("[")) { + if (data.getAsString(true).contains("[")) { string = string + " --> [" + data.getAsString(true).split("\\[")[1] .replaceAll("true", ChatColor.GREEN + "true" + ChatColor.GRAY) .replaceAll("false", ChatColor.RED + "false" + ChatColor.GRAY) + "*" + dataAmount; @@ -191,7 +191,7 @@ public void analyze( n++; - if(n >= 10) { + if (n >= 10) { sender().sendMessage(" + " + (sortedMats.size() - n) + " other block types"); return; } @@ -209,7 +209,7 @@ public void contract( @Param(description = "The amount to inset by", defaultValue = "1") int amount ) { - if(!WandSVC.isHoldingWand(player())) { + if (!WandSVC.isHoldingWand(player())) { sender().sendMessage("Hold your wand."); return; } @@ -234,15 +234,15 @@ public void position1( @Param(description = "Whether to use your current position, or where you look", defaultValue = "true") boolean here ) { - if(!WandSVC.isHoldingWand(player())) { + if (!WandSVC.isHoldingWand(player())) { sender().sendMessage("Ready your Wand."); return; } - if(WandSVC.isHoldingWand(player())) { + if (WandSVC.isHoldingWand(player())) { Location[] g = WandSVC.getCuboid(player()); - if(!here) { + if (!here) { // TODO: WARNING HEIGHT g[1] = player().getTargetBlock(null, 256).getLocation().clone(); } else { @@ -257,15 +257,15 @@ public void position2( @Param(description = "Whether to use your current position, or where you look", defaultValue = "true") boolean here ) { - if(!WandSVC.isHoldingWand(player())) { + if (!WandSVC.isHoldingWand(player())) { sender().sendMessage("Ready your Wand."); return; } - if(WandSVC.isHoldingIrisWand(player())) { + if (WandSVC.isHoldingIrisWand(player())) { Location[] g = WandSVC.getCuboid(player()); - if(!here) { + if (!here) { // TODO: WARNING HEIGHT g[0] = player().getTargetBlock(null, 256).getLocation().clone(); } else { @@ -291,7 +291,7 @@ public void paste( ) { IrisObject o = IrisData.loadAnyObject(object); double maxScale = Double.max(10 - o.getBlocks().size() / 10000d, 1); - if(scale > maxScale) { + if (scale > maxScale) { sender().sendMessage(C.YELLOW + "Indicated scale exceeds maximum. Downscaled to maximum: " + maxScale); scale = maxScale; } @@ -306,7 +306,7 @@ public void paste( Map futureChanges = new HashMap<>(); - if(scale != 1) { + if (scale != 1) { o = o.scaled(scale, IrisObjectPlacementScaleInterpolator.TRICUBIC); } @@ -314,16 +314,16 @@ public void paste( Iris.service(ObjectSVC.class).addChanges(futureChanges); - if(edit) { + if (edit) { ItemStack newWand = WandSVC.createWand(block.clone().subtract(o.getCenter()).add(o.getW() - 1, o.getH() + o.getCenter().clone().getY() - 1, o.getD() - 1), block.clone().subtract(o.getCenter().clone().setY(0))); - if(WandSVC.isWand(wand)) { + if (WandSVC.isWand(wand)) { wand = newWand; player().getInventory().setItemInMainHand(wand); sender().sendMessage("Updated wand for " + "objects/" + o.getLoadKey() + ".iob "); } else { int slot = WandSVC.findWand(player().getInventory()); - if(slot == -1) { + if (slot == -1) { player().getInventory().addItem(newWand); sender().sendMessage("Given new wand for " + "objects/" + o.getLoadKey() + ".iob "); } else { @@ -347,20 +347,20 @@ public void save( ) { IrisObject o = WandSVC.createSchematic(player()); - if(o == null) { + if (o == null) { sender().sendMessage(C.YELLOW + "You need to hold your wand!"); return; } File file = Iris.service(StudioSVC.class).getWorkspaceFile(dimension.getLoadKey(), "objects", name + ".iob"); - if(file.exists() && !overwrite) { + if (file.exists() && !overwrite) { sender().sendMessage(C.RED + "File already exists. Set overwrite=true to overwrite it."); return; } try { o.write(file); - } catch(IOException e) { + } catch (IOException e) { sender().sendMessage(C.RED + "Failed to save object because of an IOException: " + e.getMessage()); Iris.reportError(e); } @@ -374,7 +374,7 @@ public void shift( @Param(description = "The amount to shift by", defaultValue = "1") int amount ) { - if(!WandSVC.isHoldingWand(player())) { + if (!WandSVC.isHoldingWand(player())) { sender().sendMessage("Hold your wand."); return; } @@ -406,14 +406,14 @@ public void undo( @Decree(description = "Gets an object wand and grabs the current WorldEdit selection.", aliases = "we", origin = DecreeOrigin.PLAYER, studio = true) public void we() { - if(!Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) { + if (!Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) { sender().sendMessage(C.RED + "You can't get a WorldEdit selection without WorldEdit, you know."); return; } Cuboid locs = WorldEditLink.getSelection(sender().player()); - if(locs == null) { + if (locs == null) { sender().sendMessage(C.RED + "You don't have a WorldEdit selection in this world."); return; } @@ -431,7 +431,7 @@ public void wand() { @Decree(name = "x&y", description = "Autoselect up, down & out", sync = true) public void xay() { - if(!WandSVC.isHoldingWand(player())) { + if (!WandSVC.isHoldingWand(player())) { sender().sendMessage(C.YELLOW + "Hold your wand!"); return; } @@ -444,7 +444,7 @@ public void xay() { Cuboid cursor = new Cuboid(a1, a2); Cuboid cursorx = new Cuboid(a1, a2); - while(!cursor.containsOnly(Material.AIR)) { + while (!cursor.containsOnly(Material.AIR)) { a1.add(new org.bukkit.util.Vector(0, 1, 0)); a2.add(new org.bukkit.util.Vector(0, 1, 0)); cursor = new Cuboid(a1, a2); @@ -453,7 +453,7 @@ public void xay() { a1.add(new org.bukkit.util.Vector(0, -1, 0)); a2.add(new org.bukkit.util.Vector(0, -1, 0)); - while(!cursorx.containsOnly(Material.AIR)) { + while (!cursorx.containsOnly(Material.AIR)) { a1x.add(new org.bukkit.util.Vector(0, -1, 0)); a2x.add(new org.bukkit.util.Vector(0, -1, 0)); cursorx = new Cuboid(a1x, a2x); @@ -478,7 +478,7 @@ public void xay() { @Decree(name = "x+y", description = "Autoselect up & out", sync = true) public void xpy() { - if(!WandSVC.isHoldingWand(player())) { + if (!WandSVC.isHoldingWand(player())) { sender().sendMessage(C.YELLOW + "Hold your wand!"); return; } @@ -490,7 +490,7 @@ public void xpy() { Location a2 = b[1].clone(); Cuboid cursor = new Cuboid(a1, a2); - while(!cursor.containsOnly(Material.AIR)) { + while (!cursor.containsOnly(Material.AIR)) { a1.add(new Vector(0, 1, 0)); a2.add(new Vector(0, 1, 0)); cursor = new Cuboid(a1, a2); diff --git a/src/main/java/com/volmit/iris/core/commands/CommandPregen.java b/src/main/java/com/volmit/iris/core/commands/CommandPregen.java index e08e7a507..a221c7e09 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandPregen.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandPregen.java @@ -42,7 +42,7 @@ public void start( Vector center ) { try { - if(sender().isPlayer() && access() == null) { + if (sender().isPlayer() && access() == null) { sender().sendMessage(C.RED + "The engine access for this world is null!"); sender().sendMessage(C.RED + "Please make sure the world is loaded & the engine is initialized. Generate a new chunk, for example."); } @@ -57,7 +57,7 @@ public void start( String msg = C.GREEN + "Pregen started in " + C.GOLD + world.getName() + C.GREEN + " of " + C.GOLD + (radius * 2) + C.GREEN + " by " + C.GOLD + (radius * 2) + C.GREEN + " blocks from " + C.GOLD + center.getX() + "," + center.getZ(); sender().sendMessage(msg); Iris.info(msg); - } catch(Throwable e) { + } catch (Throwable e) { sender().sendMessage(C.RED + "Epic fail. See console."); Iris.reportError(e); e.printStackTrace(); @@ -66,7 +66,7 @@ public void start( @Decree(description = "Stop the active pregeneration task", aliases = "x") public void stop() { - if(PregeneratorJob.shutdownInstance()) { + if (PregeneratorJob.shutdownInstance()) { sender().sendMessage(C.GREEN + "Stopped pregeneration task"); } else { sender().sendMessage(C.YELLOW + "No active pregeneration tasks to stop"); @@ -75,7 +75,7 @@ public void stop() { @Decree(description = "Pause / continue the active pregeneration task", aliases = {"t", "resume", "unpause"}) public void pause() { - if(PregeneratorJob.pauseResume()) { + if (PregeneratorJob.pauseResume()) { sender().sendMessage(C.GREEN + "Paused/unpaused pregeneration task, now: " + (PregeneratorJob.isPaused() ? "Paused" : "Running") + "."); } else { sender().sendMessage(C.YELLOW + "No active pregeneration tasks to pause/unpause."); diff --git a/src/main/java/com/volmit/iris/core/commands/CommandStudio.java b/src/main/java/com/volmit/iris/core/commands/CommandStudio.java index d5fddfd75..e65d79553 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandStudio.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandStudio.java @@ -113,7 +113,7 @@ public void vscode( @Decree(description = "Close an open studio project", aliases = {"x", "c"}, sync = true) public void close() { - if(!Iris.service(StudioSVC.class).isProjectOpen()) { + if (!Iris.service(StudioSVC.class).isProjectOpen()) { sender().sendMessage(C.RED + "No open studio projects."); return; } @@ -128,7 +128,7 @@ public void create( String name, @Param(description = "Copy the contents of an existing project in your packs folder and use it as a template in this new project.", contextual = true) IrisDimension template) { - if(template != null) { + if (template != null) { Iris.service(StudioSVC.class).create(sender(), name, template.getLoadKey()); } else { Iris.service(StudioSVC.class).create(sender(), name); @@ -159,14 +159,14 @@ public void execute( @Decree(description = "Open the noise explorer (External GUI)", aliases = {"nmap", "n"}) public void noise() { - if(noGUI()) return; + if (noGUI()) return; sender().sendMessage(C.GREEN + "Opening Noise Explorer!"); NoiseExplorerGUI.launch(); } @Decree(description = "Charges all spawners in the area", aliases = "zzt", origin = DecreeOrigin.PLAYER) public void charge() { - if(!IrisToolbelt.isIrisWorld(world())) { + if (!IrisToolbelt.isIrisWorld(world())) { sender().sendMessage(C.RED + "You must be in an Iris world to charge spawners!"); return; } @@ -181,12 +181,12 @@ public void explore( @Param(description = "The seed to generate with", defaultValue = "12345") long seed ) { - if(noGUI()) return; + if (noGUI()) return; sender().sendMessage(C.GREEN + "Opening Noise Explorer!"); Supplier> l = () -> { - if(generator == null) { + if (generator == null) { return (x, z) -> 0D; } @@ -197,7 +197,7 @@ public void explore( @Decree(description = "Hotload a studio", aliases = {"reload", "h"}) public void hotload() { - if(!Iris.service(StudioSVC.class).isProjectOpen()) { + if (!Iris.service(StudioSVC.class).isProjectOpen()) { sender().sendMessage(C.RED + "No studio world open!"); return; } @@ -212,14 +212,14 @@ public void loot( @Param(description = "Whether or not to append to the inventory currently open (if false, clears opened inventory)", defaultValue = "true") boolean add ) { - if(noStudio()) return; + if (noStudio()) return; KList tables = engine().getLootTables(RNG.r, player().getLocation().getBlock()); Inventory inv = Bukkit.createInventory(null, 27 * 2); try { engine().addItems(true, inv, RNG.r, tables, InventorySlotType.STORAGE, player().getLocation().getBlockX(), player().getLocation().getBlockY(), player().getLocation().getBlockZ(), 1); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage(C.RED + "Cannot add items to virtual inventory because of: " + e.getMessage()); return; @@ -231,13 +231,13 @@ public void loot( ta.set(Bukkit.getScheduler().scheduleSyncRepeatingTask(Iris.instance, () -> { - if(!player().getOpenInventory().getType().equals(InventoryType.CHEST)) { + if (!player().getOpenInventory().getType().equals(InventoryType.CHEST)) { Bukkit.getScheduler().cancelTask(ta.get()); sender().sendMessage(C.GREEN + "Opened inventory!"); return; } - if(!add) { + if (!add) { inv.clear(); } @@ -253,9 +253,9 @@ public void map( @Param(name = "world", description = "The world to open the generator for", contextual = true) World world ) { - if(noGUI()) return; + if (noGUI()) return; - if(!IrisToolbelt.isIrisWorld(world)) { + if (!IrisToolbelt.isIrisWorld(world)) { sender().sendMessage(C.RED + "You need to be in or specify an Iris-generated world!"); return; } @@ -296,17 +296,17 @@ public void profile( sender().sendMessage("Calculating Performance Metrics for Noise generators"); - for(NoiseStyle i : NoiseStyle.values()) { + for (NoiseStyle i : NoiseStyle.values()) { CNG c = i.create(new RNG(i.hashCode())); - for(int j = 0; j < 3000; j++) { + for (int j = 0; j < 3000; j++) { c.noise(j, j + 1000, j * j); c.noise(j, -j); } PrecisionStopwatch px = PrecisionStopwatch.start(); - for(int j = 0; j < 100000; j++) { + for (int j = 0; j < 100000; j++) { c.noise(j, j + 1000, j * j); c.noise(j, -j); } @@ -316,7 +316,7 @@ public void profile( fileText.add("Noise Style Performance Impacts: "); - for(NoiseStyle i : styleTimings.sortKNumber()) { + for (NoiseStyle i : styleTimings.sortKNumber()) { fileText.add(i.name() + ": " + styleTimings.get(i)); } @@ -324,20 +324,20 @@ public void profile( sender().sendMessage("Calculating Interpolator Timings..."); - for(InterpolationMethod i : InterpolationMethod.values()) { + for (InterpolationMethod i : InterpolationMethod.values()) { IrisInterpolator in = new IrisInterpolator(); in.setFunction(i); in.setHorizontalScale(8); NoiseProvider np = (x, z) -> Math.random(); - for(int j = 0; j < 3000; j++) { + for (int j = 0; j < 3000; j++) { in.interpolate(j, -j, np); } PrecisionStopwatch px = PrecisionStopwatch.start(); - for(int j = 0; j < 100000; j++) { + for (int j = 0; j < 100000; j++) { in.interpolate(j + 10000, -j - 100000, np); } @@ -346,7 +346,7 @@ public void profile( fileText.add("Noise Interpolator Performance Impacts: "); - for(InterpolationMethod i : interpolatorTimings.sortKNumber()) { + for (InterpolationMethod i : interpolatorTimings.sortKNumber()) { fileText.add(i.name() + ": " + interpolatorTimings.get(i)); } @@ -356,13 +356,13 @@ public void profile( KMap> btx = new KMap<>(); - for(String i : data.getGeneratorLoader().getPossibleKeys()) { + for (String i : data.getGeneratorLoader().getPossibleKeys()) { KList vv = new KList<>(); IrisGenerator g = data.getGeneratorLoader().load(i); KList composites = g.getAllComposites(); double score = 0; int m = 0; - for(IrisNoiseGenerator j : composites) { + for (IrisNoiseGenerator j : composites) { m++; score += styleTimings.get(j.getStyle().getStyle()); vv.add("Composite Noise Style " + m + " " + j.getStyle().getStyle().name() + ": " + styleTimings.get(j.getStyle().getStyle())); @@ -376,7 +376,7 @@ public void profile( fileText.add("Project Generator Performance Impacts: "); - for(String i : generatorTimings.sortKNumber()) { + for (String i : generatorTimings.sortKNumber()) { fileText.add(i + ": " + generatorTimings.get(i)); btx.get(i).forEach((ii) -> fileText.add(" " + ii)); @@ -386,13 +386,13 @@ public void profile( KMap> bt = new KMap<>(); - for(String i : data.getBiomeLoader().getPossibleKeys()) { + for (String i : data.getBiomeLoader().getPossibleKeys()) { KList vv = new KList<>(); IrisBiome b = data.getBiomeLoader().load(i); double score = 0; int m = 0; - for(IrisBiomePaletteLayer j : b.getLayers()) { + for (IrisBiomePaletteLayer j : b.getLayers()) { m++; score += styleTimings.get(j.getStyle().getStyle()); vv.add("Palette Layer " + m + ": " + styleTimings.get(j.getStyle().getStyle())); @@ -408,7 +408,7 @@ public void profile( fileText.add("Project Biome Performance Impacts: "); - for(String i : biomeTimings.sortKNumber()) { + for (String i : biomeTimings.sortKNumber()) { fileText.add(i + ": " + biomeTimings.get(i)); bt.get(i).forEach((ff) -> fileText.add(" " + ff)); @@ -416,7 +416,7 @@ public void profile( fileText.add(""); - for(String i : data.getRegionLoader().getPossibleKeys()) { + for (String i : data.getRegionLoader().getPossibleKeys()) { IrisRegion b = data.getRegionLoader().load(i); double score = 0; @@ -427,25 +427,25 @@ public void profile( fileText.add("Project Region Performance Impacts: "); - for(String i : regionTimings.sortKNumber()) { + for (String i : regionTimings.sortKNumber()) { fileText.add(i + ": " + regionTimings.get(i)); } fileText.add(""); double m = 0; - for(double i : biomeTimings.v()) { + for (double i : biomeTimings.v()) { m += i; } m /= biomeTimings.size(); double mm = 0; - for(double i : generatorTimings.v()) { + for (double i : generatorTimings.v()) { mm += i; } mm /= generatorTimings.size(); m += mm; double mmm = 0; - for(double i : regionTimings.v()) { + for (double i : regionTimings.v()) { mmm += i; } mmm /= regionTimings.size(); @@ -456,7 +456,7 @@ public void profile( try { IO.writeAll(report, fileText.toString("\n")); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -471,7 +471,7 @@ public void summon( @Param(description = "The location at which to spawn the entity", defaultValue = "self") Vector location ) { - if(!sender().isPlayer()) { + if (!sender().isPlayer()) { sender().sendMessage(C.RED + "Players only (this is a config error. Ask support to add DecreeOrigin.PLAYER to the command you tried to run)"); return; } @@ -482,12 +482,12 @@ public void summon( @Decree(description = "Teleport to the active studio world", aliases = "stp", origin = DecreeOrigin.PLAYER, sync = true) public void tpstudio() { - if(!Iris.service(StudioSVC.class).isProjectOpen()) { + if (!Iris.service(StudioSVC.class).isProjectOpen()) { sender().sendMessage(C.RED + "No studio world is open!"); return; } - if(IrisToolbelt.isIrisWorld(world()) && engine().isStudio()) { + if (IrisToolbelt.isIrisWorld(world()) && engine().isStudio()) { sender().sendMessage(C.RED + "You are already in a studio world!"); return; } @@ -503,7 +503,7 @@ public void update( IrisDimension dimension ) { sender().sendMessage(C.GOLD + "Updating Code Workspace for " + dimension.getName() + "..."); - if(new IrisProject(dimension.getLoader().getDataFolder()).updateWorkspace()) { + if (new IrisProject(dimension.getLoader().getDataFolder()).updateWorkspace()) { sender().sendMessage(C.GREEN + "Updated Code Workspace for " + dimension.getName()); } else { sender().sendMessage(C.RED + "Invalid project: " + dimension.getName() + ". Try deleting the code-workspace file and try again."); @@ -512,14 +512,14 @@ public void update( @Decree(aliases = "find-objects", description = "Get information about nearby structures") public void objects() { - if(!IrisToolbelt.isIrisWorld(player().getWorld())) { + if (!IrisToolbelt.isIrisWorld(player().getWorld())) { sender().sendMessage(C.RED + "You must be in an Iris world"); return; } World world = player().getWorld(); - if(!IrisToolbelt.isIrisWorld(world)) { + if (!IrisToolbelt.isIrisWorld(world)) { sender().sendMessage("You must be in an iris world."); return; } @@ -533,7 +533,7 @@ public void objects() { int cx = l.getChunk().getX(); int cz = l.getChunk().getZ(); new Spiraler(3, 3, (x, z) -> chunks.addIfMissing(world.getChunkAt(x + cx, z + cz))).drain(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -551,7 +551,7 @@ public void objects() { pw.println("Report Captured At: " + new Date()); pw.println("Chunks: (" + chunks.size() + "): "); - for(Chunk i : chunks) { + for (Chunk i : chunks) { pw.println("- [" + i.getX() + ", " + i.getZ() + "]"); } @@ -560,19 +560,19 @@ public void objects() { String age = "No idea..."; try { - for(File i : Objects.requireNonNull(new File(world.getWorldFolder(), "region").listFiles())) { - if(i.isFile()) { + for (File i : Objects.requireNonNull(new File(world.getWorldFolder(), "region").listFiles())) { + if (i.isFile()) { size += i.length(); } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } try { FileTime creationTime = (FileTime) Files.getAttribute(world.getWorldFolder().toPath(), "creationTime"); age = hrf(Duration.of(M.ms() - creationTime.toMillis(), ChronoUnit.MILLIS)); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } @@ -580,10 +580,10 @@ public void objects() { KList caveBiomes = new KList<>(); KMap>> objects = new KMap<>(); - for(Chunk i : chunks) { - for(int j = 0; j < 16; j += 3) { + for (Chunk i : chunks) { + for (int j = 0; j < 16; j += 3) { - for(int k = 0; k < 16; k += 3) { + for (int k = 0; k < 16; k += 3) { assert engine() != null; IrisBiome bb = engine().getSurfaceBiome((i.getX() * 16) + j, (i.getZ() * 16) + k); @@ -610,20 +610,20 @@ public void objects() { pw.println("== Biome Info =="); pw.println("Found " + biomes.size() + " Biome(s): "); - for(String i : biomes) { + for (String i : biomes) { pw.println("- " + i); } pw.println(); pw.println("== Object Info =="); - for(String i : objects.k()) { + for (String i : objects.k()) { pw.println("- " + i); - for(String j : objects.get(i).k()) { + for (String j : objects.get(i).k()) { pw.println(" @ " + j); - for(String k : objects.get(i).get(j)) { + for (String k : objects.get(i).get(j)) { pw.println(" * " + k); } } @@ -633,7 +633,7 @@ public void objects() { pw.close(); sender().sendMessage("Reported to: " + ff.getPath()); - } catch(FileNotFoundException e) { + } catch (FileNotFoundException e) { e.printStackTrace(); Iris.reportError(e); } @@ -643,15 +643,15 @@ private void exportObjects(IrisBiome bb, PrintWriter pw, Engine g, KMap stop = new KSet<>(); - for(IrisObjectPlacement f : bb.getObjects()) { + for (IrisObjectPlacement f : bb.getObjects()) { m++; String n2 = "Placement #" + m + " (" + f.getPlace().size() + " possible objects)"; - for(String i : f.getPlace()) { + for (String i : f.getPlace()) { String nn3 = i + ": [ERROR] Failed to find object!"; try { - if(stop.contains(i)) { + if (stop.contains(i)) { continue; } @@ -659,7 +659,7 @@ private void exportObjects(IrisBiome bb, PrintWriter pw, Engine g, KMap files) { - if(clean.isDirectory()) { - for(File i : clean.listFiles()) { + if (clean.isDirectory()) { + for (File i : clean.listFiles()) { files(i, files); } - } else if(clean.getName().endsWith(".json")) { + } else if (clean.getName().endsWith(".json")) { try { files.add(clean); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Failed to beautify " + clean.getAbsolutePath() + " You may have errors in your json!"); } @@ -717,28 +717,28 @@ public void files(File clean, KList files) { } private void fixBlocks(JSONObject obj) { - for(String i : obj.keySet()) { + for (String i : obj.keySet()) { Object o = obj.get(i); - if(i.equals("block") && o instanceof String && !o.toString().trim().isEmpty() && !o.toString().contains(":")) { + if (i.equals("block") && o instanceof String && !o.toString().trim().isEmpty() && !o.toString().contains(":")) { obj.put(i, "minecraft:" + o); } - if(o instanceof JSONObject) { + if (o instanceof JSONObject) { fixBlocks((JSONObject) o); - } else if(o instanceof JSONArray) { + } else if (o instanceof JSONArray) { fixBlocks((JSONArray) o); } } } private void fixBlocks(JSONArray obj) { - for(int i = 0; i < obj.length(); i++) { + for (int i = 0; i < obj.length(); i++) { Object o = obj.get(i); - if(o instanceof JSONObject) { + if (o instanceof JSONObject) { fixBlocks((JSONObject) o); - } else if(o instanceof JSONArray) { + } else if (o instanceof JSONArray) { fixBlocks((JSONArray) o); } } diff --git a/src/main/java/com/volmit/iris/core/commands/CommandWhat.java b/src/main/java/com/volmit/iris/core/commands/CommandWhat.java index d59568776..3686ad81a 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandWhat.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandWhat.java @@ -45,16 +45,16 @@ public class CommandWhat implements DecreeExecutor { public void hand() { try { BlockData bd = player().getInventory().getItemInMainHand().getType().createBlockData(); - if(!bd.getMaterial().equals(Material.AIR)) { + if (!bd.getMaterial().equals(Material.AIR)) { sender().sendMessage("Material: " + C.GREEN + bd.getMaterial().name()); sender().sendMessage("Full: " + C.WHITE + bd.getAsString(true)); } else { sender().sendMessage("Please hold a block/item"); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Material bd = player().getInventory().getItemInMainHand().getType(); - if(!bd.equals(Material.AIR)) { + if (!bd.equals(Material.AIR)) { sender().sendMessage("Material: " + C.GREEN + bd.name()); } else { sender().sendMessage("Please hold a block/item"); @@ -68,14 +68,14 @@ public void biome() { IrisBiome b = engine().getBiome(player().getLocation().getBlockX(), player().getLocation().getBlockY() - player().getWorld().getMinHeight(), player().getLocation().getBlockZ()); sender().sendMessage("IBiome: " + b.getLoadKey() + " (" + b.getDerivative().name() + ")"); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); sender().sendMessage("Non-Iris Biome: " + player().getLocation().getBlock().getBiome().name()); - if(player().getLocation().getBlock().getBiome().equals(Biome.CUSTOM)) { + if (player().getLocation().getBlock().getBiome().equals(Biome.CUSTOM)) { try { sender().sendMessage("Data Pack Biome: " + INMS.get().getTrueBiomeBaseKey(player().getLocation()) + " (ID: " + INMS.get().getTrueBiomeBaseId(INMS.get().getTrueBiomeBase(player().getLocation())) + ")"); - } catch(Throwable ee) { + } catch (Throwable ee) { Iris.reportError(ee); } } @@ -87,41 +87,41 @@ public void block() { BlockData bd; try { bd = player().getTargetBlockExact(128, FluidCollisionMode.NEVER).getBlockData(); - } catch(NullPointerException e) { + } catch (NullPointerException e) { Iris.reportError(e); sender().sendMessage("Please look at any block, not at the sky"); bd = null; } - if(bd != null) { + if (bd != null) { sender().sendMessage("Material: " + C.GREEN + bd.getMaterial().name()); sender().sendMessage("Full: " + C.WHITE + bd.getAsString(true)); - if(B.isStorage(bd)) { + if (B.isStorage(bd)) { sender().sendMessage(C.YELLOW + "* Storage Block (Loot Capable)"); } - if(B.isLit(bd)) { + if (B.isLit(bd)) { sender().sendMessage(C.YELLOW + "* Lit Block (Light Capable)"); } - if(B.isFoliage(bd)) { + if (B.isFoliage(bd)) { sender().sendMessage(C.YELLOW + "* Foliage Block"); } - if(B.isDecorant(bd)) { + if (B.isDecorant(bd)) { sender().sendMessage(C.YELLOW + "* Decorant Block"); } - if(B.isFluid(bd)) { + if (B.isFluid(bd)) { sender().sendMessage(C.YELLOW + "* Fluid Block"); } - if(B.isFoliagePlantable(bd)) { + if (B.isFoliagePlantable(bd)) { sender().sendMessage(C.YELLOW + "* Plantable Foliage Block"); } - if(B.isSolid(bd)) { + if (B.isSolid(bd)) { sender().sendMessage(C.YELLOW + "* Solid Block"); } } @@ -131,12 +131,12 @@ public void block() { public void markers(@Param(description = "Marker name such as cave_floor or cave_ceiling") String marker) { Chunk c = player().getLocation().getChunk(); - if(IrisToolbelt.isIrisWorld(c.getWorld())) { + if (IrisToolbelt.isIrisWorld(c.getWorld())) { int m = 1; AtomicInteger v = new AtomicInteger(0); - for(int xxx = c.getX() - 4; xxx <= c.getX() + 4; xxx++) { - for(int zzz = c.getZ() - 4; zzz <= c.getZ() + 4; zzz++) { + for (int xxx = c.getX() - 4; xxx <= c.getX() + 4; xxx++) { + for (int zzz = c.getZ() - 4; zzz <= c.getZ() + 4; zzz++) { IrisToolbelt.access(c.getWorld()).getEngine().getMantle().findMarkers(xxx, zzz, new MatterMarker(marker)) .convert((i) -> i.toLocation(c.getWorld())).forEach((i) -> { J.s(() -> BlockSignal.of(i.getBlock(), 100)); diff --git a/src/main/java/com/volmit/iris/core/edit/BlockSignal.java b/src/main/java/com/volmit/iris/core/edit/BlockSignal.java index cd4b8d639..65526cd87 100644 --- a/src/main/java/com/volmit/iris/core/edit/BlockSignal.java +++ b/src/main/java/com/volmit/iris/core/edit/BlockSignal.java @@ -51,7 +51,7 @@ public BlockSignal(Block block, int ticks) { active.decrementAndGet(); BlockData type = block.getBlockData(); MultiBurst.burst.lazy(() -> { - for(Player i : block.getWorld().getPlayers()) { + for (Player i : block.getWorld().getPlayers()) { i.sendBlockChange(block.getLocation(), block.getBlockData()); } }); @@ -82,7 +82,7 @@ public static Runnable forever(Block block) { new SR(20) { @Override public void run() { - if(e.isDead()) { + if (e.isDead()) { cancel(); return; } @@ -98,7 +98,7 @@ public void run() { BlockData type = block.getBlockData(); MultiBurst.burst.lazy(() -> { - for(Player i : block.getWorld().getPlayers()) { + for (Player i : block.getWorld().getPlayers()) { i.sendBlockChange(block.getLocation(), block.getBlockData()); } }); diff --git a/src/main/java/com/volmit/iris/core/edit/DustRevealer.java b/src/main/java/com/volmit/iris/core/edit/DustRevealer.java index f04ec80cc..35353c771 100644 --- a/src/main/java/com/volmit/iris/core/edit/DustRevealer.java +++ b/src/main/java/com/volmit/iris/core/edit/DustRevealer.java @@ -50,11 +50,11 @@ public DustRevealer(Engine engine, World world, BlockPosition block, String key, J.s(() -> { new BlockSignal(world.getBlockAt(block.getX(), block.getY(), block.getZ()), 10); - if(M.r(0.25)) { + if (M.r(0.25)) { world.playSound(block.toBlock(world).getLocation(), Sound.BLOCK_AMETHYST_BLOCK_CHIME, 1f, RNG.r.f(0.2f, 2f)); } J.a(() -> { - while(BlockSignal.active.get() > 128) { + while (BlockSignal.active.get() > 128) { J.sleep(5); } @@ -85,7 +85,7 @@ public DustRevealer(Engine engine, World world, BlockPosition block, String key, is(new BlockPosition(block.getX() + 1, block.getY() + 1, block.getZ() + 1)); is(new BlockPosition(block.getX() + 1, block.getY() - 1, block.getZ() - 1)); is(new BlockPosition(block.getX() + 1, block.getY() - 1, block.getZ() + 1)); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -97,9 +97,9 @@ public static void spawn(Block block, VolmitSender sender) { World world = block.getWorld(); Engine access = IrisToolbelt.access(world).getEngine(); - if(access != null) { + if (access != null) { String a = access.getObjectPlacementKey(block.getX(), block.getY() - block.getWorld().getMinHeight(), block.getZ()); - if(a != null) { + if (a != null) { world.playSound(block.getLocation(), Sound.ITEM_LODESTONE_COMPASS_LOCK, 1f, 0.1f); sender.sendMessage("Found object " + a); @@ -112,7 +112,7 @@ public static void spawn(Block block, VolmitSender sender) { private boolean is(BlockPosition a) { int betterY = a.getY() - world.getMinHeight(); - if(isValidTry(a) && engine.getObjectPlacementKey(a.getX(), betterY, a.getZ()) != null && engine.getObjectPlacementKey(a.getX(), betterY, a.getZ()).equals(key)) { + if (isValidTry(a) && engine.getObjectPlacementKey(a.getX(), betterY, a.getZ()) != null && engine.getObjectPlacementKey(a.getX(), betterY, a.getZ()).equals(key)) { hits.add(a); new DustRevealer(engine, world, a, key, hits); return true; diff --git a/src/main/java/com/volmit/iris/core/edit/JigsawEditor.java b/src/main/java/com/volmit/iris/core/edit/JigsawEditor.java index 2c824bf4a..c75bc774b 100644 --- a/src/main/java/com/volmit/iris/core/edit/JigsawEditor.java +++ b/src/main/java/com/volmit/iris/core/edit/JigsawEditor.java @@ -61,13 +61,12 @@ public class JigsawEditor implements Listener { private Location target; public JigsawEditor(Player player, IrisJigsawPiece piece, IrisObject object, File saveLocation) { - if(editors.containsKey(player)) { + if (editors.containsKey(player)) { editors.get(player).close(); } editors.put(player, this); - if(object == null) - { + if (object == null) { throw new RuntimeException("Object is null! " + piece.getObject()); } this.object = object; @@ -85,20 +84,20 @@ public JigsawEditor(Player player, IrisJigsawPiece piece, IrisObject object, Fil @EventHandler public void on(PlayerMoveEvent e) { - if(e.getPlayer().equals(player)) { + if (e.getPlayer().equals(player)) { try { target = player.getTargetBlockExact(7).getLocation(); - } catch(Throwable ex) { + } catch (Throwable ex) { Iris.reportError(ex); target = player.getLocation(); return; } - if(cuboid.contains(target)) { - for(IrisPosition i : falling.k()) { + if (cuboid.contains(target)) { + for (IrisPosition i : falling.k()) { Location at = toLocation(i); - if(at.equals(target)) { + if (at.equals(target)) { falling.remove(i).run(); } } @@ -108,43 +107,43 @@ public void on(PlayerMoveEvent e) { public Location toLocation(IrisPosition i) { return origin.clone() - .add(new Vector(i.getX(), i.getY(), i.getZ())) - .add(object.getCenter()) - .getBlock() - .getLocation(); + .add(new Vector(i.getX(), i.getY(), i.getZ())) + .add(object.getCenter()) + .getBlock() + .getLocation(); } public IrisPosition toPosition(Location l) { return new IrisPosition(l.clone().getBlock().getLocation() - .subtract(origin.clone()) - .subtract(object.getCenter()) - .add(1, 1, 1) - .toVector()); + .subtract(origin.clone()) + .subtract(object.getCenter()) + .add(1, 1, 1) + .toVector()); } @EventHandler public void on(PlayerInteractEvent e) { - if(e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { - if(e.getClickedBlock() != null && cuboid.contains(e.getClickedBlock().getLocation()) && e.getPlayer().equals(player)) { + if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { + if (e.getClickedBlock() != null && cuboid.contains(e.getClickedBlock().getLocation()) && e.getPlayer().equals(player)) { IrisPosition pos = toPosition(e.getClickedBlock().getLocation()); IrisJigsawPieceConnector connector = null; - for(IrisJigsawPieceConnector i : piece.getConnectors()) { - if(i.getPosition().equals(pos)) { + for (IrisJigsawPieceConnector i : piece.getConnectors()) { + if (i.getPosition().equals(pos)) { connector = i; break; } } - if(!player.isSneaking() && connector == null) { + if (!player.isSneaking() && connector == null) { connector = new IrisJigsawPieceConnector(); connector.setDirection(IrisDirection.getDirection(e.getBlockFace())); connector.setPosition(pos); piece.getConnectors().add(connector); player.playSound(e.getClickedBlock().getLocation(), Sound.ENTITY_ITEM_FRAME_ADD_ITEM, 1f, 1f); - } else if(player.isSneaking() && connector != null) { + } else if (player.isSneaking() && connector != null) { piece.getConnectors().remove(connector); player.playSound(e.getClickedBlock().getLocation(), Sound.ENTITY_ITEM_FRAME_REMOVE_ITEM, 1f, 1f); - } else if(connector != null && !player.isSneaking()) { + } else if (connector != null && !player.isSneaking()) { connector.setDirection(IrisDirection.getDirection(e.getBlockFace())); player.playSound(e.getClickedBlock().getLocation(), Sound.ENTITY_ITEM_FRAME_ROTATE_ITEM, 1f, 1f); } @@ -152,10 +151,8 @@ public void on(PlayerInteractEvent e) { } } - private void removeKey(JSONObject o, String... path) - { - if(path.length == 1) - { + private void removeKey(JSONObject o, String... path) { + if (path.length == 1) { o.remove(path[0]); return; } @@ -165,12 +162,10 @@ private void removeKey(JSONObject o, String... path) removeKey(o.getJSONObject(path[0]), s.toArray(new String[0])); } - private List getObjectsInArray(JSONObject a, String key) - { + private List getObjectsInArray(JSONObject a, String key) { KList o = new KList<>(); - for(int i = 0; i < a.getJSONArray(key).length(); i++) - { + for (int i = 0; i < a.getJSONArray(key).length(); i++) { o.add(a.getJSONArray(key).getJSONObject(i)); } @@ -187,16 +182,15 @@ public void close() { // remove root key removeKey(j, "placementOptions"); // should work - j.remove("placementOptions"); // otherwise + j.remove("placementOptions"); // otherwise - // Remove key in all objects in array - for(JSONObject i : getObjectsInArray(j, "connectors")) - { - removeKey(i, "rotateConnector"); - } + // Remove key in all objects in array + for (JSONObject i : getObjectsInArray(j, "connectors")) { + removeKey(i, "rotateConnector"); + } IO.writeAll(targetSaveLocation, j.toString(4)); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -210,20 +204,20 @@ public void exit() { object.unplaceCenterY(origin); falling.v().forEach(Runnable::run); }).get(); - } catch(InterruptedException | ExecutionException e) { + } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } editors.remove(player); } public void onTick() { - if(cl.flip()) { + if (cl.flip()) { Iris.service(WandSVC.class).draw(cuboid, player); f: - for(IrisPosition i : falling.k()) { - for(IrisJigsawPieceConnector j : piece.getConnectors()) { - if(j.getPosition().equals(i)) { + for (IrisPosition i : falling.k()) { + for (IrisJigsawPieceConnector j : piece.getConnectors()) { + if (j.getPosition().equals(i)) { continue f; } } @@ -231,23 +225,23 @@ public void onTick() { falling.remove(i).run(); } - for(IrisJigsawPieceConnector i : piece.getConnectors()) { + for (IrisJigsawPieceConnector i : piece.getConnectors()) { IrisPosition pos = i.getPosition(); Location at = toLocation(pos); Vector dir = i.getDirection().toVector().clone(); - for(int ix = 0; ix < RNG.r.i(1, 3); ix++) { + for (int ix = 0; ix < RNG.r.i(1, 3); ix++) { at.getWorld().spawnParticle(Particle.SOUL_FIRE_FLAME, at.clone().getBlock().getLocation().add(0.25, 0.25, 0.25).add(RNG.r.d(0.5), RNG.r.d(0.5), RNG.r.d(0.5)), 0, dir.getX(), dir.getY(), dir.getZ(), 0.092 + RNG.r.d(-0.03, 0.08)); } - if(at.getBlock().getLocation().equals(target)) { + if (at.getBlock().getLocation().equals(target)) { continue; } - if(!falling.containsKey(pos)) { - if(at.getBlock().getType().isAir()) { + if (!falling.containsKey(pos)) { + if (at.getBlock().getType().isAir()) { at.getBlock().setType(Material.STONE); } diff --git a/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java b/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java index f7fb935f0..4ecf7d9fc 100644 --- a/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java +++ b/src/main/java/com/volmit/iris/core/gui/NoiseExplorerGUI.java @@ -118,10 +118,10 @@ private static void createAndShowGUI(Supplier> frame.add(pane); File file = Iris.getCached("Iris Icon", "https://raw.githubusercontent.com/VolmitSoftware/Iris/master/icon.png"); - if(file != null) { + if (file != null) { try { frame.setIconImage(ImageIO.read(file)); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } } @@ -152,10 +152,10 @@ private static void createAndShowGUI() { frame.add(pane); File file = Iris.getCached("Iris Icon", "https://raw.githubusercontent.com/VolmitSoftware/Iris/master/icon.png"); - if(file != null) { + if (file != null) { try { frame.setIconImage(ImageIO.read(file)); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } } @@ -179,14 +179,14 @@ public static void launch() { @EventHandler public void on(IrisEngineHotloadEvent e) { - if(generator != null) + if (generator != null) generator = loader.get(); } public void mouseWheelMoved(MouseWheelEvent e) { int notches = e.getWheelRotation(); - if(e.isControlDown()) { + if (e.isControlDown()) { t = t + ((0.0025 * t) * notches); return; } @@ -197,51 +197,51 @@ public void mouseWheelMoved(MouseWheelEvent e) { @Override public void paint(Graphics g) { - if(scale < ascale) { + if (scale < ascale) { ascale -= Math.abs(scale - ascale) * 0.16; } - if(scale > ascale) { + if (scale > ascale) { ascale += Math.abs(ascale - scale) * 0.16; } - if(t < tz) { + if (t < tz) { tz -= Math.abs(t - tz) * 0.29; } - if(t > tz) { + if (t > tz) { tz += Math.abs(tz - t) * 0.29; } - if(ox < oxp) { + if (ox < oxp) { oxp -= Math.abs(ox - oxp) * 0.16; } - if(ox > oxp) { + if (ox > oxp) { oxp += Math.abs(oxp - ox) * 0.16; } - if(oz < ozp) { + if (oz < ozp) { ozp -= Math.abs(oz - ozp) * 0.16; } - if(oz > ozp) { + if (oz > ozp) { ozp += Math.abs(ozp - oz) * 0.16; } - if(mx < mxx) { + if (mx < mxx) { mxx -= Math.abs(mx - mxx) * 0.16; } - if(mx > mxx) { + if (mx > mxx) { mxx += Math.abs(mxx - mx) * 0.16; } - if(mz < mzz) { + if (mz < mzz) { mzz -= Math.abs(mz - mzz) * 0.16; } - if(mz > mzz) { + if (mz > mzz) { mzz += Math.abs(mzz - mz) * 0.16; } @@ -250,26 +250,26 @@ public void paint(Graphics g) { accuracy = down ? accuracy * 4 : accuracy; int v = 1000; - if(g instanceof Graphics2D gg) { + if (g instanceof Graphics2D gg) { - if(getParent().getWidth() != w || getParent().getHeight() != h) { + if (getParent().getWidth() != w || getParent().getHeight() != h) { w = getParent().getWidth(); h = getParent().getHeight(); img = null; } - if(img == null) { + if (img == null) { img = new BufferedImage(w / accuracy, h / accuracy, BufferedImage.TYPE_INT_RGB); } BurstExecutor e = gx.burst(w); - for(int x = 0; x < w / accuracy; x++) { + for (int x = 0; x < w / accuracy; x++) { int xx = x; int finalAccuracy = accuracy; e.queue(() -> { - for(int z = 0; z < h / finalAccuracy; z++) { + for (int z = 0; z < h / finalAccuracy; z++) { double n = generator != null ? generator.apply(((xx * finalAccuracy) * ascale) + oxp, ((z * finalAccuracy) * ascale) + ozp) : cng.noise(((xx * finalAccuracy) * ascale) + oxp, ((z * finalAccuracy) * ascale) + ozp); n = n > 1 ? 1 : n < 0 ? 0 : n; @@ -277,7 +277,7 @@ public void paint(Graphics g) { Color color = colorMode ? Color.getHSBColor((float) (n), 1f - (float) (n * n * n * n * n * n), 1f - (float) n) : Color.getHSBColor(0f, 0f, (float) n); int rgb = color.getRGB(); img.setRGB(xx, z, rgb); - } catch(Throwable xxx) { + } catch (Throwable xxx) { } } @@ -293,15 +293,15 @@ public void paint(Graphics g) { t += 1D; r.put(p.getMilliseconds()); - if(!isVisible()) { + if (!isVisible()) { return; } - if(!getParent().isVisible()) { + if (!getParent().isVisible()) { return; } - if(!getParent().getParent().isVisible()) { + if (!getParent().getParent().isVisible()) { return; } diff --git a/src/main/java/com/volmit/iris/core/gui/PregeneratorJob.java b/src/main/java/com/volmit/iris/core/gui/PregeneratorJob.java index 8c94ad84d..a7449b72b 100644 --- a/src/main/java/com/volmit/iris/core/gui/PregeneratorJob.java +++ b/src/main/java/com/volmit/iris/core/gui/PregeneratorJob.java @@ -62,19 +62,19 @@ public class PregeneratorJob implements PregenListener { private final IrisPregenerator pregenerator; private final Position2 min; private final Position2 max; + private final ChronoLatch cl = new ChronoLatch(TimeUnit.MINUTES.toMillis(1)); + private final Engine engine; private JFrame frame; private PregenRenderer renderer; private int rgc = 0; - private final ChronoLatch cl = new ChronoLatch(TimeUnit.MINUTES.toMillis(1)); private String[] info; - private final Engine engine; public PregeneratorJob(PregenTask task, PregeneratorMethod method, Engine engine) { this.engine = engine; instance = this; monitor = new MemoryMonitor(50); saving = false; - info = new String[] {"Initializing..."}; + info = new String[]{"Initializing..."}; this.task = task; this.pregenerator = new IrisPregenerator(task, method, this); max = new Position2(0, 0); @@ -86,19 +86,15 @@ public PregeneratorJob(PregenTask task, PregeneratorMethod method, Engine engine max.setZ(Math.max((zz << 5) + 31, max.getZ())); }); - if(IrisSettings.get().getGui().isUseServerLaunchedGuis()) { + if (IrisSettings.get().getGui().isUseServerLaunchedGuis()) { open(); } J.a(this.pregenerator::start, 20); } - public Mantle getMantle() { - return pregenerator.getMantle(); - } - public static boolean shutdownInstance() { - if(instance == null) { + if (instance == null) { return false; } @@ -111,11 +107,11 @@ public static PregeneratorJob getInstance() { } public static boolean pauseResume() { - if(instance == null) { + if (instance == null) { return false; } - if(isPaused()) { + if (isPaused()) { instance.pregenerator.resume(); } else { instance.pregenerator.pause(); @@ -124,7 +120,7 @@ public static boolean pauseResume() { } public static boolean isPaused() { - if(instance == null) { + if (instance == null) { return true; } @@ -135,7 +131,7 @@ private static Color parseColor(String c) { String v = (c.startsWith("#") ? c : "#" + c).trim(); try { return Color.decode(v); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Error Parsing 'color', (" + c + ")"); } @@ -143,6 +139,10 @@ private static Color parseColor(String c) { return Color.RED; } + public Mantle getMantle() { + return pregenerator.getMantle(); + } + public PregeneratorJob onProgress(Consumer c) { onProgress.add(c); return this; @@ -164,10 +164,10 @@ public void drawRegion(int x, int z, Color color) { public void draw(int x, int z, Color color) { try { - if(renderer != null && frame != null && frame.isVisible()) { + if (renderer != null && frame != null && frame.isVisible()) { renderer.func.accept(new Position2(x, z), color); } - } catch(Throwable ignored) { + } catch (Throwable ignored) { } } @@ -186,7 +186,7 @@ public void close() { monitor.close(); J.sleep(3000); frame.setVisible(false); - } catch(Throwable e) { + } catch (Throwable e) { } }); @@ -209,7 +209,7 @@ public void open() { frame.add(renderer); frame.setSize(1000, 1000); frame.setVisible(true); - } catch(Throwable e) { + } catch (Throwable e) { } }); @@ -217,16 +217,16 @@ public void open() { @Override public void onTick(double chunksPerSecond, double chunksPerMinute, double regionsPerMinute, double percent, int generated, int totalChunks, int chunksRemaining, long eta, long elapsed, String method) { - info = new String[] { - (paused() ? "PAUSED" : (saving ? "Saving... " : "Generating")) + " " + Form.f(generated) + " of " + Form.f(totalChunks) + " (" + Form.pc(percent, 0) + " Complete)", - "Speed: " + Form.f(chunksPerSecond, 0) + " Chunks/s, " + Form.f(regionsPerMinute, 1) + " Regions/m, " + Form.f(chunksPerMinute, 0) + " Chunks/m", - Form.duration(eta, 2) + " Remaining " + " (" + Form.duration(elapsed, 2) + " Elapsed)", - "Generation Method: " + method, - "Memory: " + Form.memSize(monitor.getUsedBytes(), 2) + " (" + Form.pc(monitor.getUsagePercent(), 0) + ") Pressure: " + Form.memSize(monitor.getPressure(), 0) + "/s", + info = new String[]{ + (paused() ? "PAUSED" : (saving ? "Saving... " : "Generating")) + " " + Form.f(generated) + " of " + Form.f(totalChunks) + " (" + Form.pc(percent, 0) + " Complete)", + "Speed: " + Form.f(chunksPerSecond, 0) + " Chunks/s, " + Form.f(regionsPerMinute, 1) + " Regions/m, " + Form.f(chunksPerMinute, 0) + " Chunks/m", + Form.duration(eta, 2) + " Remaining " + " (" + Form.duration(elapsed, 2) + " Elapsed)", + "Generation Method: " + method, + "Memory: " + Form.memSize(monitor.getUsedBytes(), 2) + " (" + Form.pc(monitor.getUsagePercent(), 0) + ") Pressure: " + Form.memSize(monitor.getPressure(), 0) + "/s", }; - for(Consumer i : onProgress) { + for (Consumer i : onProgress) { i.accept(percent); } } @@ -238,7 +238,7 @@ public void onChunkGenerating(int x, int z) { @Override public void onChunkGenerated(int x, int z) { - if(engine != null) { + if (engine != null) { draw(x, z, engine.draw((x << 4) + 8, (z << 4) + 8)); return; } @@ -253,7 +253,7 @@ public void onRegionGenerated(int x, int z) { } private void shouldGc() { - if(cl.flip() && rgc > 16) { + if (cl.flip() && rgc > 16) { System.gc(); } } @@ -312,7 +312,7 @@ public void onSaving() { @Override public void onChunkExistsInRegionGen(int x, int z) { - if(engine != null) { + if (engine != null) { draw(x, z, engine.draw((x << 4) + 8, (z << 4) + 8)); return; } @@ -361,10 +361,10 @@ public void paint(Graphics gx) { bg = (Graphics2D) image.getGraphics(); l.lock(); - while(order.isNotEmpty()) { + while (order.isNotEmpty()) { try { order.pop().run(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -378,12 +378,12 @@ public void paint(Graphics gx) { int h = g.getFontMetrics().getHeight() + 5; int hh = 20; - if(job.paused()) { + if (job.paused()) { g.drawString("PAUSED", 20, hh += h); g.drawString("Press P to Resume", 20, hh += h); } else { - for(String i : prog) { + for (String i : prog) { g.drawString(i, 20, hh += h); } @@ -419,7 +419,7 @@ public void keyPressed(KeyEvent e) { @Override public void keyReleased(KeyEvent e) { - if(e.getKeyCode() == KeyEvent.VK_P) { + if (e.getKeyCode() == KeyEvent.VK_P) { PregeneratorJob.pauseResume(); } } diff --git a/src/main/java/com/volmit/iris/core/gui/VisionGUI.java b/src/main/java/com/volmit/iris/core/gui/VisionGUI.java index aabad54da..93c7c2009 100644 --- a/src/main/java/com/volmit/iris/core/gui/VisionGUI.java +++ b/src/main/java/com/volmit/iris/core/gui/VisionGUI.java @@ -137,7 +137,7 @@ public VisionGUI(JFrame frame) { J.a(() -> { J.sleep(10000); - if(!helpIgnored && help) { + if (!helpIgnored && help) { help = false; } }); @@ -161,11 +161,11 @@ private static void createAndShowGUI(Engine r, int s, IrisWorld world) { frame.setVisible(true); File file = Iris.getCached("Iris Icon", "https://raw.githubusercontent.com/VolmitSoftware/Iris/master/icon.png"); - if(file != null) { + if (file != null) { try { nv.texture = ImageIO.read(file); frame.setIconImage(ImageIO.read(file)); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } @@ -174,16 +174,16 @@ private static void createAndShowGUI(Engine r, int s, IrisWorld world) { public static void launch(Engine g, int i) { J.a(() -> - createAndShowGUI(g, i, g.getWorld())); + createAndShowGUI(g, i, g.getWorld())); } public boolean updateEngine() { - if(engine.isClosed()) { - if(world.hasRealWorld()) { + if (engine.isClosed()) { + if (world.hasRealWorld()) { try { engine = IrisToolbelt.access(world.realWorld()).getEngine(); return !engine.isClosed(); - } catch(Throwable e) { + } catch (Throwable e) { } } @@ -211,13 +211,19 @@ public void mouseDragged(MouseEvent e) { public int getColor(double wx, double wz) { BiFunction colorFunction = (d, dx) -> Color.black.getRGB(); - switch(currentType) { - case BIOME, DECORATOR_LOAD, OBJECT_LOAD, LAYER_LOAD -> colorFunction = (x, z) -> engine.getComplex().getTrueBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); - case BIOME_LAND -> colorFunction = (x, z) -> engine.getComplex().getLandBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); - case BIOME_SEA -> colorFunction = (x, z) -> engine.getComplex().getSeaBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); - case REGION -> colorFunction = (x, z) -> engine.getComplex().getRegionStream().get(x, z).getColor(engine.getComplex(), currentType).getRGB(); - case CAVE_LAND -> colorFunction = (x, z) -> engine.getComplex().getCaveBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); - case HEIGHT -> colorFunction = (x, z) -> Color.getHSBColor(engine.getComplex().getHeightStream().get(x, z).floatValue(), 100, 100).getRGB(); + switch (currentType) { + case BIOME, DECORATOR_LOAD, OBJECT_LOAD, LAYER_LOAD -> + colorFunction = (x, z) -> engine.getComplex().getTrueBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); + case BIOME_LAND -> + colorFunction = (x, z) -> engine.getComplex().getLandBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); + case BIOME_SEA -> + colorFunction = (x, z) -> engine.getComplex().getSeaBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); + case REGION -> + colorFunction = (x, z) -> engine.getComplex().getRegionStream().get(x, z).getColor(engine.getComplex(), currentType).getRGB(); + case CAVE_LAND -> + colorFunction = (x, z) -> engine.getComplex().getCaveBiomeStream().get(x, z).getColor(engine, currentType).getRGB(); + case HEIGHT -> + colorFunction = (x, z) -> Color.getHSBColor(engine.getComplex().getHeightStream().get(x, z).floatValue(), 100, 100).getRGB(); } return colorFunction.apply(wx, wz); @@ -234,51 +240,51 @@ public void keyTyped(KeyEvent e) { @Override public void keyPressed(KeyEvent e) { - if(e.getKeyCode() == KeyEvent.VK_SHIFT) { + if (e.getKeyCode() == KeyEvent.VK_SHIFT) { shift = true; } - if(e.getKeyCode() == KeyEvent.VK_CONTROL) { + if (e.getKeyCode() == KeyEvent.VK_CONTROL) { control = true; } - if(e.getKeyCode() == KeyEvent.VK_SEMICOLON) { + if (e.getKeyCode() == KeyEvent.VK_SEMICOLON) { debug = true; } - if(e.getKeyCode() == KeyEvent.VK_SLASH) { + if (e.getKeyCode() == KeyEvent.VK_SLASH) { help = true; helpIgnored = true; } - if(e.getKeyCode() == KeyEvent.VK_ALT) { + if (e.getKeyCode() == KeyEvent.VK_ALT) { alt = true; } } @Override public void keyReleased(KeyEvent e) { - if(e.getKeyCode() == KeyEvent.VK_SEMICOLON) { + if (e.getKeyCode() == KeyEvent.VK_SEMICOLON) { debug = false; } - if(e.getKeyCode() == KeyEvent.VK_SHIFT) { + if (e.getKeyCode() == KeyEvent.VK_SHIFT) { shift = false; } - if(e.getKeyCode() == KeyEvent.VK_CONTROL) { + if (e.getKeyCode() == KeyEvent.VK_CONTROL) { control = false; } - if(e.getKeyCode() == KeyEvent.VK_SLASH) { + if (e.getKeyCode() == KeyEvent.VK_SLASH) { help = false; helpIgnored = true; } - if(e.getKeyCode() == KeyEvent.VK_ALT) { + if (e.getKeyCode() == KeyEvent.VK_ALT) { alt = false; } // Pushes - if(e.getKeyCode() == KeyEvent.VK_F) { + if (e.getKeyCode() == KeyEvent.VK_F) { follow = !follow; - if(player != null && follow) { + if (player != null && follow) { notify("Following " + player.getName() + ". Press F to disable"); - } else if(follow) { + } else if (follow) { notify("Can't follow, no one is in the world"); follow = false; } else { @@ -288,38 +294,38 @@ public void keyReleased(KeyEvent e) { return; } - if(e.getKeyCode() == KeyEvent.VK_R) { + if (e.getKeyCode() == KeyEvent.VK_R) { dump(); notify("Refreshing Chunks"); return; } - if(e.getKeyCode() == KeyEvent.VK_P) { + if (e.getKeyCode() == KeyEvent.VK_P) { lowtile = !lowtile; dump(); notify("Rendering " + (lowtile ? "Low" : "High") + " Quality Tiles"); return; } - if(e.getKeyCode() == KeyEvent.VK_E) { + if (e.getKeyCode() == KeyEvent.VK_E) { eco = !eco; dump(); notify("Using " + (eco ? "60" : "Uncapped") + " FPS Limit"); return; } - if(e.getKeyCode() == KeyEvent.VK_EQUALS) { + if (e.getKeyCode() == KeyEvent.VK_EQUALS) { mscale = mscale + ((0.044 * mscale) * -3); mscale = Math.max(mscale, 0.00001); dump(); return; } - if(e.getKeyCode() == KeyEvent.VK_MINUS) { + if (e.getKeyCode() == KeyEvent.VK_MINUS) { mscale = mscale + ((0.044 * mscale) * 3); mscale = Math.max(mscale, 0.00001); dump(); return; } - if(e.getKeyCode() == KeyEvent.VK_BACK_SLASH) { + if (e.getKeyCode() == KeyEvent.VK_BACK_SLASH) { mscale = 1D; dump(); notify("Zoom Reset"); @@ -328,9 +334,9 @@ public void keyReleased(KeyEvent e) { int currentMode = currentType.ordinal(); - for(RenderType i : RenderType.values()) { - if(e.getKeyChar() == String.valueOf(i.ordinal() + 1).charAt(0)) { - if(i.ordinal() != currentMode) { + for (RenderType i : RenderType.values()) { + if (e.getKeyChar() == String.valueOf(i.ordinal() + 1).charAt(0)) { + if (i.ordinal() != currentMode) { currentType = i; dump(); notify("Rendering " + Form.capitalizeWords(currentType.name().toLowerCase().replaceAll("\\Q_\\E", " "))); @@ -339,7 +345,7 @@ public void keyReleased(KeyEvent e) { } } - if(e.getKeyCode() == KeyEvent.VK_M) { + if (e.getKeyCode() == KeyEvent.VK_M) { currentType = RenderType.values()[(currentMode + 1) % RenderType.values().length]; notify("Rendering " + Form.capitalizeWords(currentType.name().toLowerCase().replaceAll("\\Q_\\E", " "))); dump(); @@ -355,15 +361,15 @@ public BufferedImage getTile(KSet fg, int div, int x, int z, O= 0 && velocity < 50) { + if (m.get() >= 0 && velocity < 50) { working.add(key); double mk = mscale; double mkd = scale; @@ -374,7 +380,7 @@ public BufferedImage getTile(KSet fg, int div, int x, int z, O fg, int div, int x, int z, O Runtime.getRuntime().availableProcessors()) { + if (workingfast.contains(key) || workingfast.size() > Runtime.getRuntime().availableProcessors()) { return null; } @@ -398,7 +404,7 @@ public BufferedImage getTile(KSet fg, int div, int x, int z, O { - try - { + try { setVisible(false); - } - - catch(Throwable e) - { + } catch (Throwable e) { } }); @@ -441,49 +443,49 @@ public void paint(Graphics gx) { return; } - if(updateEngine()) { + if (updateEngine()) { dump(); } - if(ox < oxp) { + if (ox < oxp) { velocity = Math.abs(ox - oxp) * 0.36; oxp -= velocity; } - if(ox > oxp) { + if (ox > oxp) { velocity = Math.abs(oxp - ox) * 0.36; oxp += velocity; } - if(oz < ozp) { + if (oz < ozp) { velocity = Math.abs(oz - ozp) * 0.36; ozp -= velocity; } - if(oz > ozp) { + if (oz > ozp) { velocity = Math.abs(ozp - oz) * 0.36; ozp += velocity; } - if(lx < hx) { + if (lx < hx) { hx -= Math.abs(lx - hx) * 0.36; } - if(lx > hx) { + if (lx > hx) { hx += Math.abs(hx - lx) * 0.36; } - if(lz < hz) { + if (lz < hz) { hz -= Math.abs(lz - hz) * 0.36; } - if(lz > hz) { + if (lz > hz) { hz += Math.abs(hz - lz) * 0.36; } - if(centities.flip()) { + if (centities.flip()) { J.s(() -> { - synchronized(lastEntities) { + synchronized (lastEntities) { lastEntities.clear(); lastEntities.addAll(world.getEntitiesByClass(LivingEntity.class)); } @@ -497,7 +499,7 @@ public void paint(Graphics gx) { double vscale = scale; scale = w / 12D; - if(scale != vscale) { + if (scale != vscale) { positions.clear(); } @@ -509,15 +511,15 @@ public void paint(Graphics gx) { int posZ = (int) ozp; m.set(3); - for(int r = 0; r < Math.max(w, h); r += iscale) { - for(int i = -iscale; i < w + iscale; i += iscale) { - for(int j = -iscale; j < h + iscale; j += iscale) { + for (int r = 0; r < Math.max(w, h); r += iscale) { + for (int i = -iscale; i < w + iscale; i += iscale) { + for (int j = -iscale; j < h + iscale; j += iscale) { int a = i - (w / 2); int b = j - (h / 2); - if(a * a + b * b <= r * r) { + if (a * a + b * b <= r * r) { BufferedImage t = getTile(gg, iscale, Math.floorDiv((posX / iscale) + i, iscale) * iscale, Math.floorDiv((posZ / iscale) + j, iscale) * iscale, m); - if(t != null) { + if (t != null) { g.drawImage(t, i - ((posX / iscale) % (iscale)), j - ((posZ / iscale) % (iscale)), iscale, iscale, (img, infoflags, x, y, width, height) -> true); } } @@ -527,8 +529,8 @@ public void paint(Graphics gx) { p.end(); - for(BlockPosition i : positions.k()) { - if(!gg.contains(i)) { + for (BlockPosition i : positions.k()) { + if (!gg.contains(i)) { positions.remove(i); } } @@ -536,15 +538,15 @@ public void paint(Graphics gx) { hanleFollow(); renderOverlays(g); - if(!isVisible()) { + if (!isVisible()) { return; } - if(!getParent().isVisible()) { + if (!getParent().isVisible()) { return; } - if(!getParent().getParent().isVisible()) { + if (!getParent().getParent().isVisible()) { return; } @@ -556,7 +558,7 @@ public void paint(Graphics gx) { } private void hanleFollow() { - if(follow && player != null) { + if (follow && player != null) { animateTo(player.getLocation().getX(), player.getLocation().getZ()); } } @@ -564,16 +566,16 @@ private void hanleFollow() { private void renderOverlays(Graphics2D g) { renderPlayer(g); - if(help) { + if (help) { renderOverlayHelp(g); - } else if(debug) { + } else if (debug) { renderOverlayDebug(g); } renderOverlayLegend(g); renderHoverOverlay(g, shift); - if(!notifications.isEmpty()) { + if (!notifications.isEmpty()) { renderNotification(g); } } @@ -591,8 +593,8 @@ private void renderOverlayLegend(Graphics2D g) { private void renderNotification(Graphics2D g) { drawCardCB(g, notifications.k()); - for(String i : notifications.k()) { - if(M.ms() > notifications.get(i)) { + for (String i : notifications.k()) { + if (M.ms() > notifications.get(i)) { notifications.remove(i); } } @@ -601,32 +603,32 @@ private void renderNotification(Graphics2D g) { private void renderPlayer(Graphics2D g) { Player b = null; - for(Player i : world.getPlayers()) { + for (Player i : world.getPlayers()) { b = i; renderPosition(g, i.getLocation().getX(), i.getLocation().getZ()); } - synchronized(lastEntities) { + synchronized (lastEntities) { double dist = Double.MAX_VALUE; LivingEntity h = null; - for(LivingEntity i : lastEntities) { - if(i instanceof Player) { + for (LivingEntity i : lastEntities) { + if (i instanceof Player) { continue; } renderMobPosition(g, i, i.getLocation().getX(), i.getLocation().getZ()); - if(shift) { + if (shift) { double d = i.getLocation().distanceSquared(new Location(i.getWorld(), getWorldX(hx), i.getLocation().getY(), getWorldZ(hz))); - if(d < dist) { + if (d < dist) { dist = d; h = i; } } } - if(h != null && shift) { + if (h != null && shift) { g.setColor(Color.red); g.fillRoundRect((int) getScreenX(h.getLocation().getX()) - 10, (int) getScreenZ(h.getLocation().getZ()) - 10, 20, 20, 20, 20); KList k = new KList<>(); @@ -651,7 +653,7 @@ private void animateTo(double wx, double wz) { } private void renderPosition(Graphics2D g, double x, double z) { - if(texture != null) { + if (texture != null) { g.drawImage(texture, (int) getScreenX(x), (int) getScreenZ(z), 66, 66, (img, infoflags, xx, xy, width, height) -> true); } else { g.setColor(Color.darkGray); @@ -673,7 +675,7 @@ private void renderHoverOverlay(Graphics2D g, boolean detailed) { l.add("Biome: " + biome.getName()); l.add("Region: " + region.getName() + "(" + region.getLoadKey() + ")"); l.add("Block " + (int) getWorldX(hx) + ", " + (int) getWorldZ(hz)); - if(detailed) { + if (detailed) { l.add("Chunk " + ((int) getWorldX(hx) >> 4) + ", " + ((int) getWorldZ(hz) >> 4)); l.add("Region " + (((int) getWorldX(hx) >> 4) >> 5) + ", " + (((int) getWorldZ(hz) >> 4) >> 5)); l.add("Key: " + biome.getLoadKey()); @@ -702,7 +704,7 @@ private void renderOverlayHelp(Graphics2D g) { l.add("E to toggle Eco FPS Mode"); int ff = 0; - for(RenderType i : RenderType.values()) { + for (RenderType i : RenderType.values()) { ff++; l.add(ff + " to view " + Form.capitalizeWords(i.name().toLowerCase().replaceAll("\\Q_\\E", " "))); } @@ -732,8 +734,9 @@ private void drawCardTR(Graphics2D g, KList text) { private void open() { IrisComplex complex = engine.getComplex(); File r = null; - switch(currentType) { - case BIOME, LAYER_LOAD, DECORATOR_LOAD, OBJECT_LOAD, HEIGHT -> r = complex.getTrueBiomeStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode(); + switch (currentType) { + case BIOME, LAYER_LOAD, DECORATOR_LOAD, OBJECT_LOAD, HEIGHT -> + r = complex.getTrueBiomeStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode(); case BIOME_LAND -> r = complex.getLandBiomeStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode(); case BIOME_SEA -> r = complex.getSeaBiomeStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode(); case REGION -> r = complex.getRegionStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode(); @@ -745,7 +748,7 @@ private void open() { private void teleport() { J.s(() -> { - if(player != null) { + if (player != null) { int xx = (int) getWorldX(hx); int zz = (int) getWorldZ(hz); int h = engine.getComplex().getRoundedHeighteightStream().get(xx, zz); @@ -770,7 +773,7 @@ private void drawCardAt(float x, float y, double pushX, double pushZ, Graphics2D int h = 0; int w = 0; - for(String i : text) { + for (String i : text) { h += g.getFontMetrics().getHeight(); w = Math.max(w, g.getFontMetrics().stringWidth(i)); } @@ -790,14 +793,14 @@ private void drawCardAt(float x, float y, double pushX, double pushZ, Graphics2D g.setColor(Color.black); int m = 0; - for(String i : text) { + for (String i : text) { g.drawString(i, x + 14 - cw, y + 14 - ch + (++m * g.getFontMetrics().getHeight())); } } public void mouseWheelMoved(MouseWheelEvent e) { int notches = e.getWheelRotation(); - if(e.isControlDown()) { + if (e.isControlDown()) { return; } @@ -810,9 +813,9 @@ public void mouseWheelMoved(MouseWheelEvent e) { @Override public void mouseClicked(MouseEvent e) { - if(control) { + if (control) { teleport(); - } else if(alt) { + } else if (alt) { open(); } } diff --git a/src/main/java/com/volmit/iris/core/gui/components/IrisRenderer.java b/src/main/java/com/volmit/iris/core/gui/components/IrisRenderer.java index 5d0fee0a8..961e57d0d 100644 --- a/src/main/java/com/volmit/iris/core/gui/components/IrisRenderer.java +++ b/src/main/java/com/volmit/iris/core/gui/components/IrisRenderer.java @@ -37,21 +37,27 @@ public BufferedImage render(double sx, double sz, double size, int resolution, R BufferedImage image = new BufferedImage(resolution, resolution, BufferedImage.TYPE_INT_RGB); BiFunction colorFunction = (d, dx) -> Color.black.getRGB(); - switch(currentType) { - case BIOME, DECORATOR_LOAD, OBJECT_LOAD, LAYER_LOAD -> colorFunction = (x, z) -> renderer.getComplex().getTrueBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); - case BIOME_LAND -> colorFunction = (x, z) -> renderer.getComplex().getLandBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); - case BIOME_SEA -> colorFunction = (x, z) -> renderer.getComplex().getSeaBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); - case REGION -> colorFunction = (x, z) -> renderer.getComplex().getRegionStream().get(x, z).getColor(renderer.getComplex(), currentType).getRGB(); - case CAVE_LAND -> colorFunction = (x, z) -> renderer.getComplex().getCaveBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); - case HEIGHT -> colorFunction = (x, z) -> Color.getHSBColor(renderer.getComplex().getHeightStream().get(x, z).floatValue(), 100, 100).getRGB(); + switch (currentType) { + case BIOME, DECORATOR_LOAD, OBJECT_LOAD, LAYER_LOAD -> + colorFunction = (x, z) -> renderer.getComplex().getTrueBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); + case BIOME_LAND -> + colorFunction = (x, z) -> renderer.getComplex().getLandBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); + case BIOME_SEA -> + colorFunction = (x, z) -> renderer.getComplex().getSeaBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); + case REGION -> + colorFunction = (x, z) -> renderer.getComplex().getRegionStream().get(x, z).getColor(renderer.getComplex(), currentType).getRGB(); + case CAVE_LAND -> + colorFunction = (x, z) -> renderer.getComplex().getCaveBiomeStream().get(x, z).getColor(renderer, currentType).getRGB(); + case HEIGHT -> + colorFunction = (x, z) -> Color.getHSBColor(renderer.getComplex().getHeightStream().get(x, z).floatValue(), 100, 100).getRGB(); } double x, z; int i, j; - for(i = 0; i < resolution; i++) { + for (i = 0; i < resolution; i++) { x = IrisInterpolation.lerp(sx, sx + size, (double) i / (double) (resolution)); - for(j = 0; j < resolution; j++) { + for (j = 0; j < resolution; j++) { z = IrisInterpolation.lerp(sz, sz + size, (double) j / (double) (resolution)); image.setRGB(i, j, colorFunction.apply(x, z)); } diff --git a/src/main/java/com/volmit/iris/core/link/IrisPapiExpansion.java b/src/main/java/com/volmit/iris/core/link/IrisPapiExpansion.java index f0c6c1da5..1e5a1c3b9 100644 --- a/src/main/java/com/volmit/iris/core/link/IrisPapiExpansion.java +++ b/src/main/java/com/volmit/iris/core/link/IrisPapiExpansion.java @@ -53,55 +53,55 @@ public String onRequest(OfflinePlayer player, String p) { Location l = null; PlatformChunkGenerator a = null; - if(player.isOnline()) { + if (player.isOnline()) { l = player.getPlayer().getLocation(); a = IrisToolbelt.access(l.getWorld()); } - if(p.equalsIgnoreCase("biome_name")) { - if(a != null) { + if (p.equalsIgnoreCase("biome_name")) { + if (a != null) { return getBiome(a, l).getName(); } - } else if(p.equalsIgnoreCase("biome_id")) { - if(a != null) { + } else if (p.equalsIgnoreCase("biome_id")) { + if (a != null) { return getBiome(a, l).getLoadKey(); } - } else if(p.equalsIgnoreCase("biome_file")) { - if(a != null) { + } else if (p.equalsIgnoreCase("biome_file")) { + if (a != null) { return getBiome(a, l).getLoadFile().getPath(); } - } else if(p.equalsIgnoreCase("region_name")) { - if(a != null) { + } else if (p.equalsIgnoreCase("region_name")) { + if (a != null) { return a.getEngine().getRegion(l).getName(); } - } else if(p.equalsIgnoreCase("region_id")) { - if(a != null) { + } else if (p.equalsIgnoreCase("region_id")) { + if (a != null) { return a.getEngine().getRegion(l).getLoadKey(); } - } else if(p.equalsIgnoreCase("region_file")) { - if(a != null) { + } else if (p.equalsIgnoreCase("region_file")) { + if (a != null) { return a.getEngine().getRegion(l).getLoadFile().getPath(); } - } else if(p.equalsIgnoreCase("terrain_slope")) { - if(a != null) { + } else if (p.equalsIgnoreCase("terrain_slope")) { + if (a != null) { return (a.getEngine()) - .getComplex().getSlopeStream() - .get(l.getX(), l.getZ()) + ""; + .getComplex().getSlopeStream() + .get(l.getX(), l.getZ()) + ""; } - } else if(p.equalsIgnoreCase("terrain_height")) { - if(a != null) { + } else if (p.equalsIgnoreCase("terrain_height")) { + if (a != null) { return Math.round(a.getEngine().getHeight(l.getBlockX(), l.getBlockZ())) + ""; } - } else if(p.equalsIgnoreCase("world_mode")) { - if(a != null) { + } else if (p.equalsIgnoreCase("world_mode")) { + if (a != null) { return a.isStudio() ? "Studio" : "Production"; } - } else if(p.equalsIgnoreCase("world_seed")) { - if(a != null) { + } else if (p.equalsIgnoreCase("world_seed")) { + if (a != null) { return a.getEngine().getSeedManager().getSeed() + ""; } - } else if(p.equalsIgnoreCase("world_speed")) { - if(a != null) { + } else if (p.equalsIgnoreCase("world_speed")) { + if (a != null) { return a.getEngine().getGeneratedPerSecond() + "/s"; } } diff --git a/src/main/java/com/volmit/iris/core/link/ItemAdderDataProvider.java b/src/main/java/com/volmit/iris/core/link/ItemAdderDataProvider.java index d05ca3cf4..5005225eb 100644 --- a/src/main/java/com/volmit/iris/core/link/ItemAdderDataProvider.java +++ b/src/main/java/com/volmit/iris/core/link/ItemAdderDataProvider.java @@ -17,7 +17,8 @@ public ItemAdderDataProvider() { } @Override - public void init() { } + public void init() { + } @Override public BlockData getBlockData(NamespacedKey blockId) throws MissingResourceException { @@ -27,7 +28,7 @@ public BlockData getBlockData(NamespacedKey blockId) throws MissingResourceExcep @Override public ItemStack getItemStack(NamespacedKey itemId) throws MissingResourceException { CustomStack stack = CustomStack.getInstance(itemId.toString()); - if(stack == null) + if (stack == null) throw new MissingResourceException("Failed to find ItemData!", itemId.getNamespace(), itemId.getKey()); return stack.getItemStack(); } @@ -35,15 +36,15 @@ public ItemStack getItemStack(NamespacedKey itemId) throws MissingResourceExcept @Override public NamespacedKey[] getBlockTypes() { KList keys = new KList<>(); - for(String s : ItemsAdder.getNamespacedBlocksNamesInConfig()) + for (String s : ItemsAdder.getNamespacedBlocksNamesInConfig()) keys.add(NamespacedKey.fromString(s)); return keys.toArray(new NamespacedKey[0]); } @Override public boolean isValidProvider(NamespacedKey blockId) { - for(NamespacedKey k : getBlockTypes()) - if(k.equals(blockId)) { + for (NamespacedKey k : getBlockTypes()) + if (k.equals(blockId)) { return true; } return false; diff --git a/src/main/java/com/volmit/iris/core/link/MultiverseCoreLink.java b/src/main/java/com/volmit/iris/core/link/MultiverseCoreLink.java index 0a2d4f025..c483ce756 100644 --- a/src/main/java/com/volmit/iris/core/link/MultiverseCoreLink.java +++ b/src/main/java/com/volmit/iris/core/link/MultiverseCoreLink.java @@ -38,7 +38,7 @@ public MultiverseCoreLink() { } public boolean addWorld(String worldName, IrisDimension dim, String seed) { - if(!isSupported()) { + if (!isSupported()) { return false; } @@ -47,11 +47,11 @@ public boolean addWorld(String worldName, IrisDimension dim, String seed) { Object mvWorldManager = p.getClass().getDeclaredMethod("getMVWorldManager").invoke(p); Method m = mvWorldManager.getClass().getDeclaredMethod("addWorld", - String.class, World.Environment.class, String.class, WorldType.class, Boolean.class, String.class, boolean.class); + String.class, World.Environment.class, String.class, WorldType.class, Boolean.class, String.class, boolean.class); boolean b = (boolean) m.invoke(mvWorldManager, worldName, dim.getEnvironment(), seed, WorldType.NORMAL, false, "Iris", false); saveConfig(); return b; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -67,7 +67,7 @@ public boolean addWorld(String worldName, IrisDimension dim, String seed) { Field f = mvWorldManager.getClass().getDeclaredField("worldsFromTheConfig"); f.setAccessible(true); return (Map) f.get(mvWorldManager); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -76,7 +76,7 @@ public boolean addWorld(String worldName, IrisDimension dim, String seed) { } public void removeFromConfig(World world) { - if(!isSupported()) { + if (!isSupported()) { return; } @@ -85,7 +85,7 @@ public void removeFromConfig(World world) { } public void removeFromConfig(String world) { - if(!isSupported()) { + if (!isSupported()) { return; } @@ -98,7 +98,7 @@ public void saveConfig() { Plugin p = getMultiverse(); Object mvWorldManager = p.getClass().getDeclaredMethod("getMVWorldManager").invoke(p); mvWorldManager.getClass().getDeclaredMethod("saveWorldsConfig").invoke(mvWorldManager); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -112,7 +112,7 @@ public String getWorldNameType(String worldName, String defaultType) { try { String t = worldNameTypes.get(worldName); return t == null ? defaultType : t; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); return defaultType; } @@ -128,11 +128,11 @@ public Plugin getMultiverse() { } public String envName(World.Environment environment) { - if(environment == null) { + if (environment == null) { return "normal"; } - return switch(environment) { + return switch (environment) { case NORMAL -> "normal"; case NETHER -> "nether"; case THE_END -> "end"; diff --git a/src/main/java/com/volmit/iris/core/link/MythicMobsLink.java b/src/main/java/com/volmit/iris/core/link/MythicMobsLink.java index 96aabbb96..dea27c957 100644 --- a/src/main/java/com/volmit/iris/core/link/MythicMobsLink.java +++ b/src/main/java/com/volmit/iris/core/link/MythicMobsLink.java @@ -50,17 +50,15 @@ public Plugin getPlugin() { /** * Spawn a mythic mob at this location * - * @param mob - * The mob - * @param location - * The location + * @param mob The mob + * @param location The location * @return The mob, or null if it can't be spawned */ public @Nullable Entity spawnMob(String mob, Location location) { - if(!isEnabled()) return null; + if (!isEnabled()) return null; - if(spawnMobFunction != null) { + if (spawnMobFunction != null) { return spawnMobFunction.apply(mob, location); } @@ -75,14 +73,14 @@ Entity spawnMob(String mob, Location location) { spawnMobFunction = (str, loc) -> { try { return (Entity) spawnMobMethod.invoke(apiHelper, str, loc); - } catch(InvocationTargetException | IllegalAccessException e) { + } catch (InvocationTargetException | IllegalAccessException e) { e.printStackTrace(); } return null; }; return spawnMobFunction.apply(mob, location); - } catch(Exception e) { + } catch (Exception e) { e.printStackTrace(); } @@ -90,11 +88,11 @@ Entity spawnMob(String mob, Location location) { } public Collection getMythicMobTypes() { - if(mobs != null) { + if (mobs != null) { return mobs; } - if(isEnabled()) { + if (isEnabled()) { try { Class mythicMobClass = Class.forName("io.lumine.xikage.mythicmobs.MythicMobs"); @@ -105,7 +103,8 @@ public Collection getMythicMobTypes() { Method getMobNames = mobManager.getClass().getDeclaredMethod("getMobNames"); mobs = (Collection) getMobNames.invoke(mobManager); return mobs; - } catch(ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { + } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | + IllegalAccessException e) { e.printStackTrace(); } } diff --git a/src/main/java/com/volmit/iris/core/link/OraxenDataProvider.java b/src/main/java/com/volmit/iris/core/link/OraxenDataProvider.java index 138cecaa7..3b3282d79 100644 --- a/src/main/java/com/volmit/iris/core/link/OraxenDataProvider.java +++ b/src/main/java/com/volmit/iris/core/link/OraxenDataProvider.java @@ -46,7 +46,9 @@ public class OraxenDataProvider extends ExternalDataProvider { private Map factories; - public OraxenDataProvider() { super("Oraxen"); } + public OraxenDataProvider() { + super("Oraxen"); + } @Override public void init() { @@ -54,7 +56,7 @@ public void init() { Field f = MechanicsManager.class.getDeclaredField(FIELD_FACTORIES_MAP); f.setAccessible(true); factories = (Map) f.get(null); - } catch(NoSuchFieldException | IllegalAccessException e) { + } catch (NoSuchFieldException | IllegalAccessException e) { Iris.error("Failed to set up Oraxen Link:"); Iris.error("\t" + e.getClass().getSimpleName()); } @@ -63,11 +65,11 @@ public void init() { @Override public BlockData getBlockData(NamespacedKey blockId) throws MissingResourceException { MechanicFactory f = getFactory(blockId); - if(f instanceof NoteBlockMechanicFactory) - return ((NoteBlockMechanicFactory)f).createNoteBlockData(blockId.getKey()); - else if(f instanceof BlockMechanicFactory) { + if (f instanceof NoteBlockMechanicFactory) + return ((NoteBlockMechanicFactory) f).createNoteBlockData(blockId.getKey()); + else if (f instanceof BlockMechanicFactory) { MultipleFacing newBlockData = (MultipleFacing) Bukkit.createBlockData(Material.MUSHROOM_STEM); - Utils.setBlockFacing(newBlockData, ((BlockMechanic)f.getMechanic(blockId.getKey())).getCustomVariation()); + Utils.setBlockFacing(newBlockData, ((BlockMechanic) f.getMechanic(blockId.getKey())).getCustomVariation()); return newBlockData; } else throw new MissingResourceException("Failed to find BlockData!", blockId.getNamespace(), blockId.getKey()); @@ -82,12 +84,13 @@ public ItemStack getItemStack(NamespacedKey itemId) throws MissingResourceExcept @Override public NamespacedKey[] getBlockTypes() { KList names = new KList<>(); - for(String name : OraxenItems.getItemNames()) { + for (String name : OraxenItems.getItemNames()) { try { NamespacedKey key = new NamespacedKey("oraxen", name); - if(getBlockData(key) != null) + if (getBlockData(key) != null) names.add(key); - } catch(MissingResourceException ignored) { } + } catch (MissingResourceException ignored) { + } } return names.toArray(new NamespacedKey[0]); diff --git a/src/main/java/com/volmit/iris/core/link/WorldEditLink.java b/src/main/java/com/volmit/iris/core/link/WorldEditLink.java index 903842093..fe23dd3b3 100644 --- a/src/main/java/com/volmit/iris/core/link/WorldEditLink.java +++ b/src/main/java/com/volmit/iris/core/link/WorldEditLink.java @@ -5,10 +5,8 @@ import org.bukkit.entity.Player; public class WorldEditLink { - public static Cuboid getSelection(Player p) - { - try - { + public static Cuboid getSelection(Player p) { + try { Object instance = Class.forName("com.sk89q.worldedit.WorldEdit").getDeclaredMethod("getInstance").invoke(null); Object sessionManager = instance.getClass().getDeclaredMethod("getSessionManager").invoke(instance); Object player = Class.forName("com.sk89q.worldedit.bukkit.BukkitAdapter").getDeclaredMethod("adapt", Player.class).invoke(null, p); @@ -18,17 +16,14 @@ public static Cuboid getSelection(Player p) Object min = region.getClass().getDeclaredMethod("getMinimumPoint").invoke(region); Object max = region.getClass().getDeclaredMethod("getMaximumPoint").invoke(region); return new Cuboid(p.getWorld(), - (int)min.getClass().getDeclaredMethod("getX").invoke(min), - (int)min.getClass().getDeclaredMethod("getY").invoke(min), - (int)min.getClass().getDeclaredMethod("getZ").invoke(min), - (int)min.getClass().getDeclaredMethod("getX").invoke(max), - (int)min.getClass().getDeclaredMethod("getY").invoke(max), - (int)min.getClass().getDeclaredMethod("getZ").invoke(max) + (int) min.getClass().getDeclaredMethod("getX").invoke(min), + (int) min.getClass().getDeclaredMethod("getY").invoke(min), + (int) min.getClass().getDeclaredMethod("getZ").invoke(min), + (int) min.getClass().getDeclaredMethod("getX").invoke(max), + (int) min.getClass().getDeclaredMethod("getY").invoke(max), + (int) min.getClass().getDeclaredMethod("getZ").invoke(max) ); - } - - catch(Throwable e) - { + } catch (Throwable e) { } diff --git a/src/main/java/com/volmit/iris/core/loader/ImageResourceLoader.java b/src/main/java/com/volmit/iris/core/loader/ImageResourceLoader.java index 142b3a2dd..92b103e5b 100644 --- a/src/main/java/com/volmit/iris/core/loader/ImageResourceLoader.java +++ b/src/main/java/com/volmit/iris/core/loader/ImageResourceLoader.java @@ -59,7 +59,7 @@ protected IrisImage loadFile(File j, String name) { logLoad(j, img); tlt.addAndGet(p.getMilliseconds()); return img; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Couldn't read " + resourceTypeName + " file: " + j.getPath() + ": " + e.getMessage()); return null; @@ -67,24 +67,24 @@ protected IrisImage loadFile(File j, String name) { } public String[] getPossibleKeys() { - if(possibleKeys != null) { + if (possibleKeys != null) { return possibleKeys; } Iris.debug("Building " + resourceTypeName + " Possibility Lists"); KSet m = new KSet<>(); - for(File i : getFolders()) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".png")) { + for (File i : getFolders()) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".png")) { m.add(j.getName().replaceAll("\\Q.png\\E", "")); - } else if(j.isDirectory()) { - for(File k : j.listFiles()) { - if(k.isFile() && k.getName().endsWith(".png")) { + } else if (j.isDirectory()) { + for (File k : j.listFiles()) { + if (k.isFile() && k.getName().endsWith(".png")) { m.add(j.getName() + "/" + k.getName().replaceAll("\\Q.png\\E", "")); - } else if(k.isDirectory()) { - for(File l : k.listFiles()) { - if(l.isFile() && l.getName().endsWith(".png")) { + } else if (k.isDirectory()) { + for (File l : k.listFiles()) { + if (l.isFile() && l.getName().endsWith(".png")) { m.add(j.getName() + "/" + k.getName() + "/" + l.getName().replaceAll("\\Q.png\\E", "")); } } @@ -100,16 +100,16 @@ public String[] getPossibleKeys() { } public File findFile(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".png") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".png") && j.getName().split("\\Q.\\E")[0].equals(name)) { return j; } } File file = new File(i, name + ".png"); - if(file.exists()) { + if (file.exists()) { return file; } } @@ -124,16 +124,16 @@ public IrisImage load(String name) { } private IrisImage loadRaw(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".png") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".png") && j.getName().split("\\Q.\\E")[0].equals(name)) { return loadFile(j, name); } } File file = new File(i, name + ".png"); - if(file.exists()) { + if (file.exists()) { return loadFile(file, name); } } diff --git a/src/main/java/com/volmit/iris/core/loader/IrisData.java b/src/main/java/com/volmit/iris/core/loader/IrisData.java index b6f7833c6..db8e13360 100644 --- a/src/main/java/com/volmit/iris/core/loader/IrisData.java +++ b/src/main/java/com/volmit/iris/core/loader/IrisData.java @@ -97,8 +97,8 @@ public static void dereference() { public static int cacheSize() { int m = 0; - for(IrisData i : dataLoaders.values()) { - for(ResourceLoader j : i.getLoaders().values()) { + for (IrisData i : dataLoaders.values()) { + for (ResourceLoader j : i.getLoaders().values()) { m += j.getLoadCache().getSize(); } } @@ -113,6 +113,7 @@ private static void printData(ResourceLoader rl) { public static IrisObject loadAnyObject(String key) { return loadAny(key, (dm) -> dm.getObjectLoader().load(key, false)); } + public static IrisMatterObject loadAnyMatter(String key) { return loadAny(key, (dm) -> dm.getMatterLoader().load(key, false)); } @@ -191,17 +192,17 @@ public static IrisGenerator loadAnyGenerator(String key) { public static T loadAny(String key, Function v) { try { - for(File i : Objects.requireNonNull(Iris.instance.getDataFolder("packs").listFiles())) { - if(i.isDirectory()) { + for (File i : Objects.requireNonNull(Iris.instance.getDataFolder("packs").listFiles())) { + if (i.isDirectory()) { IrisData dm = get(i); T t = v.apply(dm); - if(t != null) { + if (t != null) { return t; } } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -212,9 +213,9 @@ public static T loadAny(String key, Function getTypedLoaderFor(File f) { String[] k = f.getPath().split("\\Q" + File.separator + "\\E"); - for(String i : k) { - for(ResourceLoader j : loaders.values()) { - if(j.getFolderName().equals(i)) { + for (String i : k) { + for (ResourceLoader j : loaders.values()) { + if (j.getFolderName().equals(i)) { return j; } } @@ -224,7 +225,7 @@ public ResourceLoader getTypedLoaderFor(File f) { } public void cleanupEngine() { - if(engine != null && engine.isClosed()) { + if (engine != null && engine.isClosed()) { engine = null; Iris.debug("Dereferenced Data " + getId() + " " + getDataFolder()); } @@ -235,30 +236,30 @@ public void preprocessObject(IrisRegistrant t) { IrisContext ctx = IrisContext.get(); Engine engine = this.engine; - if(engine == null && ctx != null && ctx.getEngine() != null) { + if (engine == null && ctx != null && ctx.getEngine() != null) { engine = ctx.getEngine(); } - if(engine == null && t.getPreprocessors().isNotEmpty()) { + if (engine == null && t.getPreprocessors().isNotEmpty()) { Iris.error("Failed to preprocess object " + t.getLoadKey() + " because there is no engine context here. (See stack below)"); try { throw new RuntimeException(); - } catch(Throwable ex) { + } catch (Throwable ex) { ex.printStackTrace(); } } - if(engine != null && t.getPreprocessors().isNotEmpty()) { - synchronized(this) { + if (engine != null && t.getPreprocessors().isNotEmpty()) { + synchronized (this) { engine.getExecution().getAPI().setPreprocessorObject(t); - for(String i : t.getPreprocessors()) { + for (String i : t.getPreprocessors()) { engine.getExecution().execute(i); Iris.debug("Loader<" + C.GREEN + t.getTypeName() + C.LIGHT_PURPLE + "> iprocess " + C.YELLOW + t.getLoadKey() + C.LIGHT_PURPLE + " in " + i); } } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("Failed to preprocess object!"); e.printStackTrace(); } @@ -277,18 +278,18 @@ private ResourceLoader registerLoader(Class reg try { IrisRegistrant rr = registrant.getConstructor().newInstance(); ResourceLoader r = null; - if(registrant.equals(IrisObject.class)) { + if (registrant.equals(IrisObject.class)) { r = (ResourceLoader) new ObjectResourceLoader(dataFolder, this, rr.getFolderName(), - rr.getTypeName()); - } else if(registrant.equals(IrisMatterObject.class)) { + rr.getTypeName()); + } else if (registrant.equals(IrisMatterObject.class)) { r = (ResourceLoader) new MatterObjectResourceLoader(dataFolder, this, rr.getFolderName(), rr.getTypeName()); - } else if(registrant.equals(IrisScript.class)) { + } else if (registrant.equals(IrisScript.class)) { r = (ResourceLoader) new ScriptResourceLoader(dataFolder, this, rr.getFolderName(), rr.getTypeName()); - } else if(registrant.equals(IrisImage.class)) { + } else if (registrant.equals(IrisImage.class)) { r = (ResourceLoader) new ImageResourceLoader(dataFolder, this, rr.getFolderName(), - rr.getTypeName()); + rr.getTypeName()); } else { J.attempt(() -> registrant.getConstructor().newInstance().registerTypeAdapters(builder)); r = new ResourceLoader<>(dataFolder, this, rr.getFolderName(), rr.getTypeName(), registrant); @@ -297,7 +298,7 @@ private ResourceLoader registerLoader(Class reg loaders.put(registrant, r); return r; - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.error("Failed to create loader! " + registrant.getCanonicalName()); } @@ -308,11 +309,11 @@ private ResourceLoader registerLoader(Class reg public synchronized void hotloaded() { possibleSnippets = new KMap<>(); builder = new GsonBuilder() - .addDeserializationExclusionStrategy(this) - .addSerializationExclusionStrategy(this) - .setLenient() - .registerTypeAdapterFactory(this) - .setPrettyPrinting(); + .addDeserializationExclusionStrategy(this) + .addSerializationExclusionStrategy(this) + .setLenient() + .registerTypeAdapterFactory(this) + .setPrettyPrinting(); loaders.clear(); File packs = dataFolder; packs.mkdirs(); @@ -340,26 +341,26 @@ public synchronized void hotloaded() { } public void dump() { - for(ResourceLoader i : loaders.values()) { + for (ResourceLoader i : loaders.values()) { i.clearCache(); } } public void clearLists() { - for(ResourceLoader i : loaders.values()) { + for (ResourceLoader i : loaders.values()) { i.clearList(); } } public String toLoadKey(File f) { - if(f.getPath().startsWith(getDataFolder().getPath())) { + if (f.getPath().startsWith(getDataFolder().getPath())) { String[] full = f.getPath().split("\\Q" + File.separator + "\\E"); String[] df = getDataFolder().getPath().split("\\Q" + File.separator + "\\E"); StringBuilder g = new StringBuilder(); boolean m = true; - for(int i = 0; i < full.length; i++) { - if(i >= df.length) { - if(m) { + for (int i = 0; i < full.length; i++) { + if (i >= df.length) { + if (m) { m = false; continue; } @@ -386,14 +387,14 @@ public boolean shouldSkipField(FieldAttributes f) { @Override public boolean shouldSkipClass(Class c) { - if(c.equals(AtomicCache.class)) { + if (c.equals(AtomicCache.class)) { return true; } else return c.equals(ChronoLatch.class); } @Override public TypeAdapter create(Gson gson, TypeToken typeToken) { - if(!typeToken.getRawType().isAnnotationPresent(Snippet.class)) { + if (!typeToken.getRawType().isAnnotationPresent(Snippet.class)) { return null; } @@ -409,17 +410,17 @@ public void write(JsonWriter jsonWriter, T t) throws IOException { public T read(JsonReader reader) throws IOException { TypeAdapter adapter = gson.getDelegateAdapter(IrisData.this, typeToken); - if(reader.peek().equals(JsonToken.STRING)) { + if (reader.peek().equals(JsonToken.STRING)) { String r = reader.nextString(); - if(r.startsWith("snippet/" + snippetType + "/")) { + if (r.startsWith("snippet/" + snippetType + "/")) { File f = new File(getDataFolder(), r + ".json"); - if(f.exists()) { + if (f.exists()) { try { JsonReader snippetReader = new JsonReader(new FileReader(f)); return adapter.read(snippetReader); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("Couldn't read snippet " + r + " in " + reader.getPath() + " (" + e.getMessage() + ")"); } } else { @@ -432,11 +433,11 @@ public T read(JsonReader reader) throws IOException { try { return adapter.read(reader); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("Failed to read " + typeToken.getRawType().getCanonicalName() + "... faking objects a little to load the file at least."); try { return (T) typeToken.getRawType().getConstructor().newInstance(); - } catch(Throwable ignored) { + } catch (Throwable ignored) { } } @@ -451,8 +452,8 @@ public KList getPossibleSnippets(String f) { File snippetFolder = new File(getDataFolder(), "snippet/" + f); - if(snippetFolder.exists() && snippetFolder.isDirectory()) { - for(File i : snippetFolder.listFiles()) { + if (snippetFolder.exists() && snippetFolder.isDirectory()) { + for (File i : snippetFolder.listFiles()) { l.add("snippet/" + f + "/" + i.getName().split("\\Q.\\E")[0]); } } @@ -468,11 +469,11 @@ public boolean isClosed() { public void savePrefetch(Engine engine) { BurstExecutor b = MultiBurst.burst.burst(loaders.size()); - for(ResourceLoader i : loaders.values()) { + for (ResourceLoader i : loaders.values()) { b.queue(() -> { try { i.saveFirstAccess(engine); - } catch(IOException e) { + } catch (IOException e) { throw new RuntimeException(e); } }); @@ -485,11 +486,11 @@ public void savePrefetch(Engine engine) { public void loadPrefetch(Engine engine) { BurstExecutor b = MultiBurst.burst.burst(loaders.size()); - for(ResourceLoader i : loaders.values()) { + for (ResourceLoader i : loaders.values()) { b.queue(() -> { try { i.loadFirstAccess(engine); - } catch(IOException e) { + } catch (IOException e) { throw new RuntimeException(e); } }); diff --git a/src/main/java/com/volmit/iris/core/loader/IrisRegistrant.java b/src/main/java/com/volmit/iris/core/loader/IrisRegistrant.java index 1c97ecde1..eabba9d1c 100644 --- a/src/main/java/com/volmit/iris/core/loader/IrisRegistrant.java +++ b/src/main/java/com/volmit/iris/core/loader/IrisRegistrant.java @@ -56,7 +56,7 @@ public void registerTypeAdapters(GsonBuilder builder) { public File openInVSCode() { try { Desktop.getDesktop().open(getLoadFile()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/core/loader/MatterObjectResourceLoader.java b/src/main/java/com/volmit/iris/core/loader/MatterObjectResourceLoader.java index 28ee0d1f6..341a8d972 100644 --- a/src/main/java/com/volmit/iris/core/loader/MatterObjectResourceLoader.java +++ b/src/main/java/com/volmit/iris/core/loader/MatterObjectResourceLoader.java @@ -56,7 +56,7 @@ protected IrisMatterObject loadFile(File j, String name) { logLoad(j, t); tlt.addAndGet(p.getMilliseconds()); return t; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Couldn't read " + resourceTypeName + " file: " + j.getPath() + ": " + e.getMessage()); return null; @@ -64,24 +64,24 @@ protected IrisMatterObject loadFile(File j, String name) { } public String[] getPossibleKeys() { - if(possibleKeys != null) { + if (possibleKeys != null) { return possibleKeys; } Iris.debug("Building " + resourceTypeName + " Possibility Lists"); KSet m = new KSet<>(); - for(File i : getFolders()) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".mat")) { + for (File i : getFolders()) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".mat")) { m.add(j.getName().replaceAll("\\Q.mat\\E", "")); - } else if(j.isDirectory()) { - for(File k : j.listFiles()) { - if(k.isFile() && k.getName().endsWith(".mat")) { + } else if (j.isDirectory()) { + for (File k : j.listFiles()) { + if (k.isFile() && k.getName().endsWith(".mat")) { m.add(j.getName() + "/" + k.getName().replaceAll("\\Q.mat\\E", "")); - } else if(k.isDirectory()) { - for(File l : k.listFiles()) { - if(l.isFile() && l.getName().endsWith(".mat")) { + } else if (k.isDirectory()) { + for (File l : k.listFiles()) { + if (l.isFile() && l.getName().endsWith(".mat")) { m.add(j.getName() + "/" + k.getName() + "/" + l.getName().replaceAll("\\Q.mat\\E", "")); } } @@ -97,16 +97,16 @@ public String[] getPossibleKeys() { } public File findFile(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".mat") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".mat") && j.getName().split("\\Q.\\E")[0].equals(name)) { return j; } } File file = new File(i, name + ".mat"); - if(file.exists()) { + if (file.exists()) { return file; } } @@ -121,16 +121,16 @@ public IrisMatterObject load(String name) { } private IrisMatterObject loadRaw(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".mat") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".mat") && j.getName().split("\\Q.\\E")[0].equals(name)) { return loadFile(j, name); } } File file = new File(i, name + ".mat"); - if(file.exists()) { + if (file.exists()) { return loadFile(file, name); } } diff --git a/src/main/java/com/volmit/iris/core/loader/ObjectResourceLoader.java b/src/main/java/com/volmit/iris/core/loader/ObjectResourceLoader.java index bc1f1e9b5..37f3f43b5 100644 --- a/src/main/java/com/volmit/iris/core/loader/ObjectResourceLoader.java +++ b/src/main/java/com/volmit/iris/core/loader/ObjectResourceLoader.java @@ -57,7 +57,7 @@ protected IrisObject loadFile(File j, String name) { logLoad(j, t); tlt.addAndGet(p.getMilliseconds()); return t; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Couldn't read " + resourceTypeName + " file: " + j.getPath() + ": " + e.getMessage()); return null; @@ -65,12 +65,12 @@ protected IrisObject loadFile(File j, String name) { } public String[] getPossibleKeys() { - if(possibleKeys != null) { + if (possibleKeys != null) { return possibleKeys; } Iris.debug("Building " + resourceTypeName + " Possibility Lists"); KSet m = new KSet<>(); - for(File i : getFolders()) { + for (File i : getFolders()) { m.addAll(getFiles(i, ".iob", true)); } possibleKeys = m.toArray(new String[0]); @@ -80,10 +80,10 @@ public String[] getPossibleKeys() { private KList getFiles(File dir, String ext, boolean skipDirName) { KList paths = new KList<>(); String name = skipDirName ? "" : dir.getName() + "/"; - for(File f : dir.listFiles()) { - if(f.isFile() && f.getName().endsWith(ext)) { + for (File f : dir.listFiles()) { + if (f.isFile() && f.getName().endsWith(ext)) { paths.add(name + f.getName().replaceAll("\\Q" + ext + "\\E", "")); - } else if(f.isDirectory()) { + } else if (f.isDirectory()) { getFiles(f, ext, false).forEach(e -> paths.add(name + e)); } } @@ -91,16 +91,16 @@ private KList getFiles(File dir, String ext, boolean skipDirName) { } public File findFile(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".iob") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".iob") && j.getName().split("\\Q.\\E")[0].equals(name)) { return j; } } File file = new File(i, name + ".iob"); - if(file.exists()) { + if (file.exists()) { return file; } } @@ -115,16 +115,16 @@ public IrisObject load(String name) { } private IrisObject loadRaw(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".iob") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".iob") && j.getName().split("\\Q.\\E")[0].equals(name)) { return loadFile(j, name); } } File file = new File(i, name + ".iob"); - if(file.exists()) { + if (file.exists()) { return loadFile(file, name); } } diff --git a/src/main/java/com/volmit/iris/core/loader/ResourceLoader.java b/src/main/java/com/volmit/iris/core/loader/ResourceLoader.java index 505fba67c..8b4900972 100644 --- a/src/main/java/com/volmit/iris/core/loader/ResourceLoader.java +++ b/src/main/java/com/volmit/iris/core/loader/ResourceLoader.java @@ -55,12 +55,12 @@ public class ResourceLoader implements MeteredCache { public static final AtomicDouble tlt = new AtomicDouble(0); private static final int CACHE_SIZE = 100000; + protected final AtomicReference> folderCache; protected KSet firstAccess; protected File root; protected String folderName; protected String resourceTypeName; protected KCache loadCache; - protected final AtomicReference> folderCache; protected Class objectClass; protected String cname; protected String[] possibleKeys = null; @@ -89,7 +89,7 @@ public JSONObject buildSchema() { JSONObject o = new JSONObject(); KList fm = new KList<>(); - for(int g = 1; g < 8; g++) { + for (int g = 1; g < 8; g++) { fm.add("/" + folderName + Form.repeat("/*", g) + ".json"); } @@ -102,16 +102,16 @@ public JSONObject buildSchema() { } public File findFile(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".json") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".json") && j.getName().split("\\Q.\\E")[0].equals(name)) { return j; } } File file = new File(i, name + ".json"); - if(file.exists()) { + if (file.exists()) { return file; } } @@ -124,11 +124,11 @@ public File findFile(String name) { public void logLoad(File path, T t) { loads.getAndIncrement(); - if(loads.get() == 1) { + if (loads.get() == 1) { sec.flip(); } - if(sec.flip()) { + if (sec.flip()) { J.a(() -> { Iris.verbose("Loaded " + C.WHITE + loads.get() + " " + resourceTypeName + (loads.get() == 1 ? "" : "s") + C.GRAY + " (" + Form.f(getLoadCache().getSize()) + " " + resourceTypeName + (loadCache.getSize() == 1 ? "" : "s") + " Loaded)"); loads.set(0); @@ -149,32 +149,32 @@ private KList matchAllFiles(File root, Predicate f) { } private void matchFiles(File at, KList files, Predicate f) { - if(at.isDirectory()) { - for(File i : at.listFiles()) { + if (at.isDirectory()) { + for (File i : at.listFiles()) { matchFiles(i, files, f); } } else { - if(f.test(at)) { + if (f.test(at)) { files.add(at); } } } public String[] getPossibleKeys() { - if(possibleKeys != null) { + if (possibleKeys != null) { return possibleKeys; } KSet m = new KSet<>(); KList files = getFolders(); - if(files == null) { + if (files == null) { possibleKeys = new String[0]; return possibleKeys; } - for(File i : files) { - for(File j : matchAllFiles(i, (f) -> f.getName().endsWith(".json"))) { + for (File i : files) { + for (File j : matchAllFiles(i, (f) -> f.getName().endsWith(".json"))) { m.add(i.toURI().relativize(j.toURI()).getPath().replaceAll("\\Q.json\\E", "")); } } @@ -192,7 +192,7 @@ protected T loadFile(File j, String name) { try { PrecisionStopwatch p = PrecisionStopwatch.start(); T t = getManager().getGson() - .fromJson(preprocess(new JSONObject(IO.readAll(j))).toString(0), objectClass); + .fromJson(preprocess(new JSONObject(IO.readAll(j))).toString(0), objectClass); t.setLoadKey(name); t.setLoadFile(j); t.setLoader(manager); @@ -200,7 +200,7 @@ protected T loadFile(File j, String name) { logLoad(j, t); tlt.addAndGet(p.getMilliseconds()); return t; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); failLoad(j, e); return null; @@ -218,10 +218,10 @@ public Stream streamAll(Stream s) { public KList loadAll(KList s) { KList m = new KList<>(); - for(String i : s) { + for (String i : s) { T t = load(i); - if(t != null) { + if (t != null) { m.add(t); } } @@ -233,11 +233,11 @@ public KList loadAllParallel(KList s) { KList m = new KList<>(); BurstExecutor burst = MultiBurst.burst.burst(s.size()); - for(String i : s) { + for (String i : s) { burst.queue(() -> { T t = load(i); - if(t != null) { + if (t != null) { m.add(t); } }); @@ -250,10 +250,10 @@ public KList loadAllParallel(KList s) { public KList loadAll(KList s, Consumer postLoad) { KList m = new KList<>(); - for(String i : s) { + for (String i : s) { T t = load(i); - if(t != null) { + if (t != null) { m.add(t); postLoad.accept(t); } @@ -265,10 +265,10 @@ public KList loadAll(KList s, Consumer postLoad) { public KList loadAll(String[] s) { KList m = new KList<>(); - for(String i : s) { + for (String i : s) { T t = load(i); - if(t != null) { + if (t != null) { m.add(t); } } @@ -281,17 +281,17 @@ public T load(String name) { } private T loadRaw(String name) { - for(File i : getFolders(name)) { + for (File i : getFolders(name)) { //noinspection ConstantConditions - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".json") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".json") && j.getName().split("\\Q.\\E")[0].equals(name)) { return loadFile(j, name); } } File file = new File(i, name + ".json"); - if(file.exists()) { + if (file.exists()) { return loadFile(file, name); } } @@ -300,11 +300,11 @@ private T loadRaw(String name) { } public T load(String name, boolean warn) { - if(name == null) { + if (name == null) { return null; } - if(name.trim().isEmpty()) { + if (name.trim().isEmpty()) { return null; } @@ -312,12 +312,11 @@ public T load(String name, boolean warn) { return loadCache.get(name); } - public void loadFirstAccess(Engine engine) throws IOException - { + public void loadFirstAccess(Engine engine) throws IOException { String id = "DIM" + Math.abs(engine.getSeedManager().getSeed() + engine.getDimension().getVersion() + engine.getDimension().getLoadKey().hashCode()); File file = Iris.instance.getDataFile("prefetch/" + id + "/" + Math.abs(getFolderName().hashCode()) + ".ipfch"); - if(!file.exists()) { + if (!file.exists()) { return; } @@ -327,7 +326,7 @@ public void loadFirstAccess(Engine engine) throws IOException int m = din.readInt(); KList s = new KList<>(); - for(int i = 0; i < m; i++) { + for (int i = 0; i < m; i++) { s.add(din.readUTF()); } @@ -336,6 +335,7 @@ public void loadFirstAccess(Engine engine) throws IOException Iris.info("Loading " + s.size() + " prefetch " + getFolderName()); loadAllParallel(s); } + public void saveFirstAccess(Engine engine) throws IOException { String id = "DIM" + Math.abs(engine.getSeedManager().getSeed() + engine.getDimension().getVersion() + engine.getDimension().getLoadKey().hashCode()); File file = Iris.instance.getDataFile("prefetch/" + id + "/" + Math.abs(getFolderName().hashCode()) + ".ipfch"); @@ -345,7 +345,7 @@ public void saveFirstAccess(Engine engine) throws IOException { DataOutputStream dos = new DataOutputStream(gzo); dos.writeInt(firstAccess.size()); - for(String i : firstAccess) { + for (String i : firstAccess) { dos.writeUTF(i); } @@ -354,13 +354,13 @@ public void saveFirstAccess(Engine engine) throws IOException { } public KList getFolders() { - synchronized(folderCache) { - if(folderCache.get() == null) { + synchronized (folderCache) { + if (folderCache.get() == null) { KList fc = new KList<>(); - for(File i : root.listFiles()) { - if(i.isDirectory()) { - if(i.getName().equals(folderName)) { + for (File i : root.listFiles()) { + if (i.isDirectory()) { + if (i.getName().equals(folderName)) { fc.add(i); break; } @@ -377,9 +377,9 @@ public KList getFolders() { public KList getFolders(String rc) { KList folders = getFolders().copy(); - if(rc.contains(":")) { - for(File i : folders.copy()) { - if(!rc.startsWith(i.getName() + ":")) { + if (rc.contains(":")) { + for (File i : folders.copy()) { + if (!rc.startsWith(i.getName() + ":")) { folders.remove(i); } } @@ -395,16 +395,16 @@ public void clearCache() { } public File fileFor(T b) { - for(File i : getFolders()) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".json") && j.getName().split("\\Q.\\E")[0].equals(b.getLoadKey())) { + for (File i : getFolders()) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".json") && j.getName().split("\\Q.\\E")[0].equals(b.getLoadKey())) { return j; } } File file = new File(i, b.getLoadKey() + ".json"); - if(file.exists()) { + if (file.exists()) { return file; } } @@ -424,8 +424,8 @@ public void clearList() { public KList getPossibleKeys(String arg) { KList f = new KList<>(); - for(String i : getPossibleKeys()) { - if(i.equalsIgnoreCase(arg) || i.toLowerCase(Locale.ROOT).startsWith(arg.toLowerCase(Locale.ROOT)) || i.toLowerCase(Locale.ROOT).contains(arg.toLowerCase(Locale.ROOT)) || arg.toLowerCase(Locale.ROOT).contains(i.toLowerCase(Locale.ROOT))) { + for (String i : getPossibleKeys()) { + if (i.equalsIgnoreCase(arg) || i.toLowerCase(Locale.ROOT).startsWith(arg.toLowerCase(Locale.ROOT)) || i.toLowerCase(Locale.ROOT).contains(arg.toLowerCase(Locale.ROOT)) || arg.toLowerCase(Locale.ROOT).contains(i.toLowerCase(Locale.ROOT))) { f.add(i); } } diff --git a/src/main/java/com/volmit/iris/core/loader/ScriptResourceLoader.java b/src/main/java/com/volmit/iris/core/loader/ScriptResourceLoader.java index b68d15162..cfb9b9026 100644 --- a/src/main/java/com/volmit/iris/core/loader/ScriptResourceLoader.java +++ b/src/main/java/com/volmit/iris/core/loader/ScriptResourceLoader.java @@ -53,7 +53,7 @@ protected IrisScript loadFile(File j, String name) { logLoad(j, t); tlt.addAndGet(p.getMilliseconds()); return t; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Couldn't read " + resourceTypeName + " file: " + j.getPath() + ": " + e.getMessage()); return null; @@ -61,24 +61,24 @@ protected IrisScript loadFile(File j, String name) { } public String[] getPossibleKeys() { - if(possibleKeys != null) { + if (possibleKeys != null) { return possibleKeys; } Iris.debug("Building " + resourceTypeName + " Possibility Lists"); KSet m = new KSet<>(); - for(File i : getFolders()) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".js")) { + for (File i : getFolders()) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".js")) { m.add(j.getName().replaceAll("\\Q.js\\E", "")); - } else if(j.isDirectory()) { - for(File k : j.listFiles()) { - if(k.isFile() && k.getName().endsWith(".js")) { + } else if (j.isDirectory()) { + for (File k : j.listFiles()) { + if (k.isFile() && k.getName().endsWith(".js")) { m.add(j.getName() + "/" + k.getName().replaceAll("\\Q.js\\E", "")); - } else if(k.isDirectory()) { - for(File l : k.listFiles()) { - if(l.isFile() && l.getName().endsWith(".js")) { + } else if (k.isDirectory()) { + for (File l : k.listFiles()) { + if (l.isFile() && l.getName().endsWith(".js")) { m.add(j.getName() + "/" + k.getName() + "/" + l.getName().replaceAll("\\Q.js\\E", "")); } } @@ -94,16 +94,16 @@ public String[] getPossibleKeys() { } public File findFile(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".js") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".js") && j.getName().split("\\Q.\\E")[0].equals(name)) { return j; } } File file = new File(i, name + ".js"); - if(file.exists()) { + if (file.exists()) { return file; } } @@ -114,16 +114,16 @@ public File findFile(String name) { } private IrisScript loadRaw(String name) { - for(File i : getFolders(name)) { - for(File j : i.listFiles()) { - if(j.isFile() && j.getName().endsWith(".js") && j.getName().split("\\Q.\\E")[0].equals(name)) { + for (File i : getFolders(name)) { + for (File j : i.listFiles()) { + if (j.isFile() && j.getName().endsWith(".js") && j.getName().split("\\Q.\\E")[0].equals(name)) { return loadFile(j, name); } } File file = new File(i, name + ".js"); - if(file.exists()) { + if (file.exists()) { return loadFile(file, name); } } diff --git a/src/main/java/com/volmit/iris/core/nms/INMS.java b/src/main/java/com/volmit/iris/core/nms/INMS.java index a1b95d08f..21923af86 100644 --- a/src/main/java/com/volmit/iris/core/nms/INMS.java +++ b/src/main/java/com/volmit/iris/core/nms/INMS.java @@ -28,7 +28,7 @@ public class INMS { //@builder private static final KMap> bindings = new KMap>() - .qput("v1_19_R1", NMSBinding19_2.class); + .qput("v1_19_R1", NMSBinding19_2.class); //@done private static final INMSBinding binding = bind(); @@ -37,13 +37,13 @@ public static INMSBinding get() { } public static String getNMSTag() { - if(IrisSettings.get().getGeneral().isDisableNMS()) { + if (IrisSettings.get().getGeneral().isDisableNMS()) { return "BUKKIT"; } try { return Bukkit.getServer().getClass().getCanonicalName().split("\\Q.\\E")[3]; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Failed to determine server nms version!"); e.printStackTrace(); @@ -56,13 +56,13 @@ private static INMSBinding bind() { String code = getNMSTag(); Iris.info("Locating NMS Binding for " + code); - if(bindings.containsKey(code)) { + if (bindings.containsKey(code)) { try { INMSBinding b = bindings.get(code).getConstructor().newInstance(); Iris.info("Craftbukkit " + code + " <-> " + b.getClass().getSimpleName() + " Successfully Bound"); return b; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/core/nms/INMSBinding.java b/src/main/java/com/volmit/iris/core/nms/INMSBinding.java index 2420cc6eb..0f8f0e44a 100644 --- a/src/main/java/com/volmit/iris/core/nms/INMSBinding.java +++ b/src/main/java/com/volmit/iris/core/nms/INMSBinding.java @@ -56,6 +56,7 @@ public interface INMSBinding { String getTrueBiomeBaseKey(Location location); Object getCustomBiomeBaseFor(String mckey); + Object getCustomBiomeBaseHolderFor(String mckey); int getBiomeBaseIdForKey(String key); diff --git a/src/main/java/com/volmit/iris/core/nms/NMSVersion.java b/src/main/java/com/volmit/iris/core/nms/NMSVersion.java index 532562b20..58677097d 100644 --- a/src/main/java/com/volmit/iris/core/nms/NMSVersion.java +++ b/src/main/java/com/volmit/iris/core/nms/NMSVersion.java @@ -49,61 +49,61 @@ public static NMSVersion getMaximum() { } public static NMSVersion current() { - if(tryVersion("1_8_R3")) { + if (tryVersion("1_8_R3")) { return R1_8; } - if(tryVersion("1_9_R1")) { + if (tryVersion("1_9_R1")) { return R1_9_2; } - if(tryVersion("1_9_R2")) { + if (tryVersion("1_9_R2")) { return R1_9_4; } - if(tryVersion("1_10_R1")) { + if (tryVersion("1_10_R1")) { return R1_10; } - if(tryVersion("1_11_R1")) { + if (tryVersion("1_11_R1")) { return R1_11; } - if(tryVersion("1_12_R1")) { + if (tryVersion("1_12_R1")) { return R1_12; } - if(tryVersion("1_13_R1")) { + if (tryVersion("1_13_R1")) { return R1_13; } - if(tryVersion("1_13_R2")) { + if (tryVersion("1_13_R2")) { return R1_13_1; } - if(tryVersion("1_14_R1")) { + if (tryVersion("1_14_R1")) { return R1_14; } - if(tryVersion("1_15_R1")) { + if (tryVersion("1_15_R1")) { return R1_15; } - if(tryVersion("1_16_R1")) { + if (tryVersion("1_16_R1")) { return R1_16; } - if(tryVersion("1_17_R1")) { + if (tryVersion("1_17_R1")) { return R1_17; } - if(tryVersion("1_18_R1")) { + if (tryVersion("1_18_R1")) { return R1_18; } - if(tryVersion("1_18_R2")) { + if (tryVersion("1_18_R2")) { return R1_18_2; } - if(tryVersion("1_19_R1")) { + if (tryVersion("1_19_R1")) { return R1_19_1; } return null; @@ -113,7 +113,7 @@ private static boolean tryVersion(String v) { try { Class.forName("org.bukkit.craftbukkit.v" + v + ".CraftWorld"); return true; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -124,8 +124,8 @@ private static boolean tryVersion(String v) { public List getAboveInclusive() { List n = new ArrayList<>(); - for(NMSVersion i : values()) { - if(i.ordinal() >= ordinal()) { + for (NMSVersion i : values()) { + if (i.ordinal() >= ordinal()) { n.add(i); } } @@ -136,8 +136,8 @@ public List getAboveInclusive() { public List betweenInclusive(NMSVersion other) { List n = new ArrayList<>(); - for(NMSVersion i : values()) { - if(i.ordinal() <= Math.max(other.ordinal(), ordinal()) && i.ordinal() >= Math.min(ordinal(), other.ordinal())) { + for (NMSVersion i : values()) { + if (i.ordinal() <= Math.max(other.ordinal(), ordinal()) && i.ordinal() >= Math.min(ordinal(), other.ordinal())) { n.add(i); } } @@ -148,8 +148,8 @@ public List betweenInclusive(NMSVersion other) { public List getBelowInclusive() { List n = new ArrayList<>(); - for(NMSVersion i : values()) { - if(i.ordinal() <= ordinal()) { + for (NMSVersion i : values()) { + if (i.ordinal() <= ordinal()) { n.add(i); } } diff --git a/src/main/java/com/volmit/iris/core/nms/v19_2/CustomBiomeSource.java b/src/main/java/com/volmit/iris/core/nms/v19_2/CustomBiomeSource.java index 82c3b6217..a5cf3ccf1 100644 --- a/src/main/java/com/volmit/iris/core/nms/v19_2/CustomBiomeSource.java +++ b/src/main/java/com/volmit/iris/core/nms/v19_2/CustomBiomeSource.java @@ -37,10 +37,10 @@ public class CustomBiomeSource extends BiomeSource { public CustomBiomeSource(long seed, Engine engine, World world) { super(getAllBiomes( - ((RegistryAccess) getFor(RegistryAccess.Frozen.class, ((CraftServer) Bukkit.getServer()).getHandle().getServer())) - .registry(Registry.BIOME_REGISTRY).orElse(null), - ((CraftWorld) world).getHandle().registryAccess().registry(Registry.BIOME_REGISTRY).orElse(null), - engine)); + ((RegistryAccess) getFor(RegistryAccess.Frozen.class, ((CraftServer) Bukkit.getServer()).getHandle().getServer())) + .registry(Registry.BIOME_REGISTRY).orElse(null), + ((CraftWorld) world).getHandle().registryAccess().registry(Registry.BIOME_REGISTRY).orElse(null), + engine)); this.engine = engine; this.seed = seed; this.biomeCustomRegistry = registry().registry(Registry.BIOME_REGISTRY).orElse(null); @@ -49,29 +49,14 @@ public CustomBiomeSource(long seed, Engine engine, World world) { this.customBiomes = fillCustomBiomes(biomeCustomRegistry, engine); } - private KMap> fillCustomBiomes(Registry customRegistry, Engine engine) { - KMap> m = new KMap<>(); - - for(IrisBiome i : engine.getAllBiomes()) { - if(i.isCustom()) { - for(IrisBiomeCustom j : i.getCustomDerivitives()) { - m.put(j.getId(), customRegistry.getHolder(customRegistry.getResourceKey(customRegistry - .get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get()); - } - } - } - - return m; - } - private static List> getAllBiomes(Registry customRegistry, Registry registry, Engine engine) { List> b = new ArrayList<>(); - for(IrisBiome i : engine.getAllBiomes()) { - if(i.isCustom()) { - for(IrisBiomeCustom j : i.getCustomDerivitives()) { + for (IrisBiome i : engine.getAllBiomes()) { + if (i.isCustom()) { + for (IrisBiomeCustom j : i.getCustomDerivitives()) { b.add(customRegistry.getHolder(customRegistry.getResourceKey(customRegistry - .get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get()); + .get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get()); } } else { b.add(CraftBlock.biomeToBiomeBase(registry, i.getVanillaDerivative())); @@ -81,14 +66,10 @@ private static List> getAllBiomes(Registry customRegistry, return b; } - private RegistryAccess registry() { - return registryAccess.aquire(() -> (RegistryAccess) getFor(RegistryAccess.Frozen.class, ((CraftServer) Bukkit.getServer()).getHandle().getServer())); - } - private static Object getFor(Class type, Object source) { Object o = fieldFor(type, source); - if(o != null) { + if (o != null) { return o; } @@ -99,15 +80,14 @@ private static Object fieldFor(Class returns, Object in) { return fieldForClass(returns, in.getClass(), in); } - private static Object invokeFor(Class returns, Object in) { - for(Method i : in.getClass().getMethods()) { - if(i.getReturnType().equals(returns)) { + for (Method i : in.getClass().getMethods()) { + if (i.getReturnType().equals(returns)) { i.setAccessible(true); try { Iris.debug("[NMS] Found " + returns.getSimpleName() + " in " + in.getClass().getSimpleName() + "." + i.getName() + "()"); return i.invoke(in); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -118,13 +98,13 @@ private static Object invokeFor(Class returns, Object in) { @SuppressWarnings("unchecked") private static T fieldForClass(Class returnType, Class sourceType, Object in) { - for(Field i : sourceType.getDeclaredFields()) { - if(i.getType().equals(returnType)) { + for (Field i : sourceType.getDeclaredFields()) { + if (i.getType().equals(returnType)) { i.setAccessible(true); try { Iris.debug("[NMS] Found " + returnType.getSimpleName() + " in " + sourceType.getSimpleName() + "." + i.getName()); return (T) i.get(in); - } catch(IllegalAccessException e) { + } catch (IllegalAccessException e) { e.printStackTrace(); } } @@ -132,6 +112,25 @@ private static T fieldForClass(Class returnType, Class sourceType, Obj return null; } + private KMap> fillCustomBiomes(Registry customRegistry, Engine engine) { + KMap> m = new KMap<>(); + + for (IrisBiome i : engine.getAllBiomes()) { + if (i.isCustom()) { + for (IrisBiomeCustom j : i.getCustomDerivitives()) { + m.put(j.getId(), customRegistry.getHolder(customRegistry.getResourceKey(customRegistry + .get(new ResourceLocation(engine.getDimension().getLoadKey() + ":" + j.getId()))).get()).get()); + } + } + } + + return m; + } + + private RegistryAccess registry() { + return registryAccess.aquire(() -> (RegistryAccess) getFor(RegistryAccess.Frozen.class, ((CraftServer) Bukkit.getServer()).getHandle().getServer())); + } + @Override protected Codec codec() { throw new UnsupportedOperationException("Not supported"); @@ -141,7 +140,7 @@ protected Codec codec() { public Holder getNoiseBiome(int x, int y, int z, Climate.Sampler sampler) { int m = (y - engine.getMinHeight()) << 2; IrisBiome ib = engine.getComplex().getTrueBiomeStream().get(x << 2, z << 2); - if(ib.isCustom()) { + if (ib.isCustom()) { return customBiomes.get(ib.getCustomBiome(rng, x << 2, m, z << 2).getId()); } else { org.bukkit.block.Biome v = ib.getSkyBiome(rng, x << 2, m, z << 2); diff --git a/src/main/java/com/volmit/iris/core/nms/v19_2/NMSBinding19_2.java b/src/main/java/com/volmit/iris/core/nms/v19_2/NMSBinding19_2.java index 76b5a8f50..23b4b83b5 100644 --- a/src/main/java/com/volmit/iris/core/nms/v19_2/NMSBinding19_2.java +++ b/src/main/java/com/volmit/iris/core/nms/v19_2/NMSBinding19_2.java @@ -74,6 +74,56 @@ public class NMSBinding19_2 implements INMSBinding { private final AtomicCache byIdRef = new AtomicCache<>(); private Field biomeStorageCache = null; + private static Object getFor(Class type, Object source) { + Object o = fieldFor(type, source); + + if (o != null) { + return o; + } + + return invokeFor(type, source); + } + + private static Object invokeFor(Class returns, Object in) { + for (Method i : in.getClass().getMethods()) { + if (i.getReturnType().equals(returns)) { + i.setAccessible(true); + try { + Iris.debug("[NMS] Found " + returns.getSimpleName() + " in " + in.getClass().getSimpleName() + "." + i.getName() + "()"); + return i.invoke(in); + } catch (Throwable e) { + e.printStackTrace(); + } + } + } + + return null; + } + + private static Object fieldFor(Class returns, Object in) { + return fieldForClass(returns, in.getClass(), in); + } + + @SuppressWarnings("unchecked") + private static T fieldForClass(Class returnType, Class sourceType, Object in) { + for (Field i : sourceType.getDeclaredFields()) { + if (i.getType().equals(returnType)) { + i.setAccessible(true); + try { + Iris.debug("[NMS] Found " + returnType.getSimpleName() + " in " + sourceType.getSimpleName() + "." + i.getName()); + return (T) i.get(in); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + return null; + } + + private static Class getClassType(Class type, int ordinal) { + return type.getDeclaredClasses()[ordinal]; + } + @Override public boolean hasTile(Location l) { return ((CraftWorld) l.getWorld()).getHandle().getBlockEntity(new BlockPos(l.getBlockX(), l.getBlockY(), l.getBlockZ()), false) != null; @@ -83,7 +133,7 @@ public boolean hasTile(Location l) { public CompoundTag serializeTile(Location location) { BlockEntity e = ((CraftWorld) location.getWorld()).getHandle().getBlockEntity(new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()), true); - if(e == null) { + if (e == null) { return null; } @@ -98,7 +148,7 @@ private CompoundTag convert(net.minecraft.nbt.CompoundTag tag) { tag.write(dos); dos.close(); return (CompoundTag) NBTUtil.read(new ByteArrayInputStream(boas.toByteArray()), false).getTag(); - } catch(Throwable ex) { + } catch (Throwable ex) { ex.printStackTrace(); } @@ -113,7 +163,7 @@ private net.minecraft.nbt.CompoundTag convert(CompoundTag tag) { net.minecraft.nbt.CompoundTag c = NbtIo.read(din); din.close(); return c; - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } @@ -187,6 +237,7 @@ public String getTrueBiomeBaseKey(Location location) { public Object getCustomBiomeBaseFor(String mckey) { return getCustomBiomeRegistry().get(new ResourceLocation(mckey)); } + @Override public Object getCustomBiomeBaseHolderFor(String mckey) { return getCustomBiomeRegistry().getHolder(getTrueBiomeBaseId(getCustomBiomeRegistry().get(new ResourceLocation(mckey)))).get(); @@ -204,19 +255,19 @@ public String getKeyForBiomeBase(Object biomeBase) { @Override public Object getBiomeBase(World world, Biome biome) { return org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock.biomeToBiomeBase(((CraftWorld) world).getHandle() - .registryAccess().registry(Registry.BIOME_REGISTRY).orElse(null), biome); + .registryAccess().registry(Registry.BIOME_REGISTRY).orElse(null), biome); } @Override public Object getBiomeBase(Object registry, Biome biome) { Object v = baseBiomeCache.get(biome); - if(v != null) { + if (v != null) { return v; } //noinspection unchecked v = org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock.biomeToBiomeBase((Registry) registry, biome); - if(v == null) { + if (v == null) { // Ok so there is this new biome name called "CUSTOM" in Paper's new releases. // But, this does NOT exist within CraftBukkit which makes it return an error. // So, we will just return the ID that the plains biome returns instead. @@ -234,8 +285,8 @@ public boolean isBukkit() { @Override public int getBiomeId(Biome biome) { - for(World i : Bukkit.getWorlds()) { - if(i.getEnvironment().equals(World.Environment.NORMAL)) { + for (World i : Bukkit.getWorlds()) { + if (i.getEnvironment().equals(World.Environment.NORMAL)) { Registry registry = ((CraftWorld) i).getHandle().registryAccess().registry(Registry.BIOME_REGISTRY).orElse(null); return registry.getId((net.minecraft.world.level.biome.Biome) getBiomeBase(registry, biome)); } @@ -301,7 +352,7 @@ public int countCustomBiomes() { AtomicInteger a = new AtomicInteger(0); getCustomBiomeRegistry().keySet().forEach((i) -> { - if(i.getNamespace().equals("minecraft")) { + if (i.getNamespace().equals("minecraft")) { return; } @@ -317,8 +368,8 @@ public boolean supportsDataPacks() { } public void setBiomes(int cx, int cz, World world, Hunk biomes) { - LevelChunk c = ((CraftWorld)world).getHandle().getChunk(cx, cz); - biomes.iterateSync((x,y,z,b) -> c.setBiome(x, y, z, (Holder)b)); + LevelChunk c = ((CraftWorld) world).getHandle().getChunk(cx, cz); + biomes.iterateSync((x, y, z, b) -> c.setBiome(x, y, z, (Holder) b)); c.setUnsaved(true); } @@ -328,7 +379,7 @@ public void forceBiomeInto(int x, int y, int z, Object somethingVeryDirty, Chunk ChunkAccess s = (ChunkAccess) getFieldForBiomeStorage(chunk).get(chunk); Holder biome = (Holder) somethingVeryDirty; s.setBiome(x, y, z, biome); - } catch(IllegalAccessException e) { + } catch (IllegalAccessException e) { Iris.reportError(e); e.printStackTrace(); } @@ -337,7 +388,7 @@ public void forceBiomeInto(int x, int y, int z, Object somethingVeryDirty, Chunk private Field getFieldForBiomeStorage(Object storage) { Field f = biomeStorageCache; - if(f != null) { + if (f != null) { return f; } try { @@ -345,7 +396,7 @@ private Field getFieldForBiomeStorage(Object storage) { f = storage.getClass().getDeclaredField("biome"); f.setAccessible(true); return f; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); Iris.error(storage.getClass().getCanonicalName()); @@ -372,81 +423,29 @@ public MCAPaletteAccess createPalette() { }); MCAPalette global = globalCache.aquireNasty(() -> new MCAGlobalPalette<>(registry, ((CraftBlockData) AIR).getState())); MCAPalettedContainer container = new MCAPalettedContainer<>(global, registry, - i -> ((CraftBlockData) NBTWorld.getBlockData(i)).getState(), - i -> NBTWorld.getCompound(CraftBlockData.fromData(i)), - ((CraftBlockData) AIR).getState()); + i -> ((CraftBlockData) NBTWorld.getBlockData(i)).getState(), + i -> NBTWorld.getCompound(CraftBlockData.fromData(i)), + ((CraftBlockData) AIR).getState()); return new MCAWrappedPalettedContainer<>(container, - i -> NBTWorld.getCompound(CraftBlockData.fromData(i)), - i -> ((CraftBlockData) NBTWorld.getBlockData(i)).getState()); + i -> NBTWorld.getCompound(CraftBlockData.fromData(i)), + i -> ((CraftBlockData) NBTWorld.getBlockData(i)).getState()); } @Override public void injectBiomesFromMantle(Chunk e, Mantle mantle) { - LevelChunk chunk = ((CraftChunk)e).getHandle(); + LevelChunk chunk = ((CraftChunk) e).getHandle(); AtomicInteger c = new AtomicInteger(); AtomicInteger r = new AtomicInteger(); - mantle.iterateChunk(e.getX(), e.getZ(), MatterBiomeInject.class, (x,y,z,b) -> { - if(b != null) { - if(b.isCustom()) { + mantle.iterateChunk(e.getX(), e.getZ(), MatterBiomeInject.class, (x, y, z, b) -> { + if (b != null) { + if (b.isCustom()) { chunk.setBiome(x, y, z, getCustomBiomeRegistry().getHolder(b.getBiomeId()).get()); c.getAndIncrement(); - } - - else { + } else { chunk.setBiome(x, y, z, (Holder) getBiomeBase(e.getWorld(), b.getBiome())); r.getAndIncrement(); } } }); } - - private static Object getFor(Class type, Object source) { - Object o = fieldFor(type, source); - - if(o != null) { - return o; - } - - return invokeFor(type, source); - } - - private static Object invokeFor(Class returns, Object in) { - for(Method i : in.getClass().getMethods()) { - if(i.getReturnType().equals(returns)) { - i.setAccessible(true); - try { - Iris.debug("[NMS] Found " + returns.getSimpleName() + " in " + in.getClass().getSimpleName() + "." + i.getName() + "()"); - return i.invoke(in); - } catch(Throwable e) { - e.printStackTrace(); - } - } - } - - return null; - } - - private static Object fieldFor(Class returns, Object in) { - return fieldForClass(returns, in.getClass(), in); - } - - @SuppressWarnings("unchecked") - private static T fieldForClass(Class returnType, Class sourceType, Object in) { - for(Field i : sourceType.getDeclaredFields()) { - if(i.getType().equals(returnType)) { - i.setAccessible(true); - try { - Iris.debug("[NMS] Found " + returnType.getSimpleName() + " in " + sourceType.getSimpleName() + "." + i.getName()); - return (T) i.get(in); - } catch(IllegalAccessException e) { - e.printStackTrace(); - } - } - } - return null; - } - - private static Class getClassType(Class type, int ordinal) { - return type.getDeclaredClasses()[ordinal]; - } } diff --git a/src/main/java/com/volmit/iris/core/nms/v1X/NMSBinding1X.java b/src/main/java/com/volmit/iris/core/nms/v1X/NMSBinding1X.java index 15bf05294..c874b5db5 100644 --- a/src/main/java/com/volmit/iris/core/nms/v1X/NMSBinding1X.java +++ b/src/main/java/com/volmit/iris/core/nms/v1X/NMSBinding1X.java @@ -37,12 +37,12 @@ public class NMSBinding1X implements INMSBinding { @SuppressWarnings("ConstantConditions") private static boolean testCustomHeight() { try { - if(World.class.getDeclaredMethod("getMaxHeight") != null && World.class.getDeclaredMethod("getMinHeight") != null) + if (World.class.getDeclaredMethod("getMaxHeight") != null && World.class.getDeclaredMethod("getMinHeight") != null) ; { return true; } - } catch(Throwable ignored) { + } catch (Throwable ignored) { } diff --git a/src/main/java/com/volmit/iris/core/pack/IrisPack.java b/src/main/java/com/volmit/iris/core/pack/IrisPack.java index 83f2193be..f67fb507e 100644 --- a/src/main/java/com/volmit/iris/core/pack/IrisPack.java +++ b/src/main/java/com/volmit/iris/core/pack/IrisPack.java @@ -54,8 +54,7 @@ public class IrisPack { * Create an iris pack backed by a data folder * the data folder is assumed to be in the Iris/packs/NAME folder * - * @param name - * the name + * @param name the name */ public IrisPack(String name) { this(packsPack(name)); @@ -64,17 +63,16 @@ public IrisPack(String name) { /** * Create an iris pack backed by a data folder * - * @param folder - * the folder of the pack. Must be a directory + * @param folder the folder of the pack. Must be a directory */ public IrisPack(File folder) { this.folder = folder; - if(!folder.exists()) { + if (!folder.exists()) { throw new RuntimeException("Cannot open Pack " + folder.getPath() + " (directory doesnt exist)"); } - if(!folder.isDirectory()) { + if (!folder.isDirectory()) { throw new RuntimeException("Cannot open Pack " + folder.getPath() + " (not a directory)"); } @@ -84,23 +82,20 @@ public IrisPack(File folder) { /** * Create a new pack from the input url * - * @param sender - * the sender - * @param url - * the url, or name, or really anything see IrisPackRepository.from(String) + * @param sender the sender + * @param url the url, or name, or really anything see IrisPackRepository.from(String) * @return the iris pack - * @throws IrisException - * fails + * @throws IrisException fails */ public static Future from(VolmitSender sender, String url) throws IrisException { IrisPackRepository repo = IrisPackRepository.from(url); - if(repo == null) { + if (repo == null) { throw new IrisException("Null Repo"); } try { return from(sender, repo); - } catch(MalformedURLException e) { + } catch (MalformedURLException e) { throw new IrisException("Malformed URL " + e.getMessage()); } } @@ -108,13 +103,10 @@ public static Future from(VolmitSender sender, String url) throws Iris /** * Create a pack from a repo * - * @param sender - * the sender - * @param repo - * the repo + * @param sender the sender + * @param repo the repo * @return the pack - * @throws MalformedURLException - * shit happens + * @throws MalformedURLException shit happens */ public static Future from(VolmitSender sender, IrisPackRepository repo) throws MalformedURLException { CompletableFuture pack = new CompletableFuture<>(); @@ -127,16 +119,14 @@ public static Future from(VolmitSender sender, IrisPackRepository repo /** * Create a blank pack with a given name * - * @param name - * the name of the pack + * @param name the name of the pack * @return the pack - * @throws IrisException - * if the pack already exists or another error + * @throws IrisException if the pack already exists or another error */ public static IrisPack blank(String name) throws IrisException { File f = packsPack(name); - if(f.exists()) { + if (f.exists()) { throw new IrisException("Already exists"); } @@ -144,10 +134,10 @@ public static IrisPack blank(String name) throws IrisException { fd.getParentFile().mkdirs(); try { IO.writeAll(fd, "{\n" + - " \"name\": \"" + Form.capitalize(name) + "\",\n" + - " \"version\": 1\n" + - "}\n"); - } catch(IOException e) { + " \"name\": \"" + Form.capitalize(name) + "\",\n" + + " \"version\": 1\n" + + "}\n"); + } catch (IOException e) { throw new IrisException(e.getMessage(), e); } @@ -159,8 +149,7 @@ public static IrisPack blank(String name) throws IrisException { /** * Get a packs pack folder for a name. Such that overworld would resolve as Iris/packs/overworld * - * @param name - * the name + * @param name the name * @return the file path */ public static File packsPack(String name) { @@ -170,11 +159,11 @@ public static File packsPack(String name) { private static KList collectFiles(File f, String fileExtension) { KList l = new KList<>(); - if(f.isDirectory()) { - for(File i : f.listFiles()) { + if (f.isDirectory()) { + for (File i : f.listFiles()) { l.addAll(collectFiles(i, fileExtension)); } - } else if(f.getName().endsWith("." + fileExtension)) { + } else if (f.getName().endsWith("." + fileExtension)) { l.add(f); } @@ -225,13 +214,13 @@ public boolean updateWorkspace() { p.end(); Iris.debug("Building Workspace: " + ws.getPath() + " took " + Form.duration(p.getMilliseconds(), 2)); return true; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Pack invalid: " + ws.getAbsolutePath() + " Re-creating. You may loose some vs-code workspace settings! But not your actual project!"); ws.delete(); try { IO.writeAll(ws, generateWorkspaceConfig()); - } catch(IOException e1) { + } catch (IOException e1) { Iris.reportError(e1); e1.printStackTrace(); } @@ -243,8 +232,7 @@ public boolean updateWorkspace() { /** * Install this pack into a world * - * @param world - * the world to install into (world/iris/pack) + * @param world the world to install into (world/iris/pack) * @return the installed pack */ public IrisPack install(World world) throws IrisException { @@ -254,8 +242,7 @@ public IrisPack install(World world) throws IrisException { /** * Install this pack into a world * - * @param world - * the world to install into (world/iris/pack) + * @param world the world to install into (world/iris/pack) * @return the installed pack */ public IrisPack install(IrisWorld world) throws IrisException { @@ -265,12 +252,11 @@ public IrisPack install(IrisWorld world) throws IrisException { /** * Install this pack into a world * - * @param folder - * the folder to install this pack into + * @param folder the folder to install this pack into * @return the installed pack */ public IrisPack install(File folder) throws IrisException { - if(folder.exists()) { + if (folder.exists()) { throw new IrisException("Cannot install new pack because the folder " + folder.getName() + " already exists!"); } @@ -278,7 +264,7 @@ public IrisPack install(File folder) throws IrisException { try { FileUtils.copyDirectory(getFolder(), folder); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } @@ -289,20 +275,19 @@ public IrisPack install(File folder) throws IrisException { * Create a new pack using this pack as a template. The new pack will be renamed & have a renamed dimension * to match it. * - * @param newName - * the new pack name + * @param newName the new pack name * @return the new IrisPack */ public IrisPack install(String newName) throws IrisException { File newPack = packsPack(newName); - if(newPack.exists()) { + if (newPack.exists()) { throw new IrisException("Cannot install new pack because the folder " + newName + " already exists!"); } try { FileUtils.copyDirectory(getFolder(), newPack); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } @@ -314,7 +299,7 @@ public IrisPack install(String newName) throws IrisException { try { FileUtils.moveFile(from, to); new File(newPack, getWorkspaceFile().getName()).delete(); - } catch(Throwable e) { + } catch (Throwable e) { throw new IrisException(e); } @@ -345,8 +330,7 @@ public IrisDimension getDimension() { /** * Find all files in this pack with the given extension * - * @param fileExtension - * the extension + * @param fileExtension the extension * @return the list of files */ public KList collectFiles(String fileExtension) { @@ -386,8 +370,8 @@ private JSONObject generateWorkspaceConfig() { JSONArray schemas = new JSONArray(); IrisData dm = IrisData.get(getFolder()); - for(ResourceLoader r : dm.getLoaders().v()) { - if(r.supportsSchemas()) { + for (ResourceLoader r : dm.getLoaders().v()) { + if (r.supportsSchemas()) { schemas.put(r.buildSchema()); } } diff --git a/src/main/java/com/volmit/iris/core/pack/IrisPackRepository.java b/src/main/java/com/volmit/iris/core/pack/IrisPackRepository.java index fcf25d458..71a68908b 100644 --- a/src/main/java/com/volmit/iris/core/pack/IrisPackRepository.java +++ b/src/main/java/com/volmit/iris/core/pack/IrisPackRepository.java @@ -55,34 +55,34 @@ public class IrisPackRepository { */ public static IrisPackRepository from(String g) { // https://github.com/IrisDimensions/overworld - if(g.startsWith("https://github.com/")) { + if (g.startsWith("https://github.com/")) { String sub = g.split("\\Qgithub.com/\\E")[1]; IrisPackRepository r = IrisPackRepository.builder() - .user(sub.split("\\Q/\\E")[0]) - .repo(sub.split("\\Q/\\E")[1]).build(); + .user(sub.split("\\Q/\\E")[0]) + .repo(sub.split("\\Q/\\E")[1]).build(); - if(g.contains("/tree/")) { + if (g.contains("/tree/")) { r.setBranch(g.split("/tree/")[1]); } return r; - } else if(g.contains("/")) { + } else if (g.contains("/")) { String[] f = g.split("\\Q/\\E"); - if(f.length == 1) { + if (f.length == 1) { return from(g); - } else if(f.length == 2) { + } else if (f.length == 2) { return IrisPackRepository.builder() - .user(f[0]) - .repo(f[1]) - .build(); - } else if(f.length >= 3) { + .user(f[0]) + .repo(f[1]) + .build(); + } else if (f.length >= 3) { IrisPackRepository r = IrisPackRepository.builder() - .user(f[0]) - .repo(f[1]) - .build(); + .user(f[0]) + .repo(f[1]) + .build(); - if(f[2].startsWith("#")) { + if (f[2].startsWith("#")) { r.setTag(f[2].substring(1)); } else { r.setBranch(f[2]); @@ -92,17 +92,17 @@ public static IrisPackRepository from(String g) { } } else { return IrisPackRepository.builder() - .user("IrisDimensions") - .repo(g) - .branch(g.equals("overworld") ? "stable" : "master") - .build(); + .user("IrisDimensions") + .repo(g) + .branch(g.equals("overworld") ? "stable" : "master") + .build(); } return null; } public String toURL() { - if(!tag.trim().isEmpty()) { + if (!tag.trim().isEmpty()) { return "https://codeload.github.com/" + user + "/" + repo + "/zip/refs/tags/" + tag; } @@ -112,19 +112,19 @@ public String toURL() { public void install(VolmitSender sender, Runnable whenComplete) throws MalformedURLException { File pack = Iris.instance.getDataFolderNoCreate(StudioSVC.WORKSPACE_NAME, getRepo()); - if(!pack.exists()) { + if (!pack.exists()) { File dl = new File(Iris.getTemp(), "dltk-" + UUID.randomUUID() + ".zip"); File work = new File(Iris.getTemp(), "extk-" + UUID.randomUUID()); new JobCollection(Form.capitalize(getRepo()), - new DownloadJob(toURL(), pack), - new SingleJob("Extracting", () -> ZipUtil.unpack(dl, work)), - new SingleJob("Installing", () -> { - try { - FileUtils.copyDirectory(work.listFiles()[0], pack); - } catch(IOException e) { - e.printStackTrace(); - } - })).execute(sender, whenComplete); + new DownloadJob(toURL(), pack), + new SingleJob("Extracting", () -> ZipUtil.unpack(dl, work)), + new SingleJob("Installing", () -> { + try { + FileUtils.copyDirectory(work.listFiles()[0], pack); + } catch (IOException e) { + e.printStackTrace(); + } + })).execute(sender, whenComplete); } else { sender.sendMessage("Pack already exists!"); } diff --git a/src/main/java/com/volmit/iris/core/pregenerator/IrisPregenerator.java b/src/main/java/com/volmit/iris/core/pregenerator/IrisPregenerator.java index ff44310b0..19c1fe965 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/IrisPregenerator.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/IrisPregenerator.java @@ -86,7 +86,7 @@ protected long loop() { generatedLast.set(generated.get()); chunksPerSecond.put(secondGenerated); - if(minuteLatch.flip()) { + if (minuteLatch.flip()) { int minuteGenerated = generated.get() - generatedLastMinute.get(); generatedLastMinute.set(generated.get()); chunksPerMinute.put(minuteGenerated); @@ -94,13 +94,13 @@ protected long loop() { } listener.onTick(chunksPerSecond.getAverage(), chunksPerMinute.getAverage(), - regionsPerMinute.getAverage(), - (double) generated.get() / (double) totalChunks.get(), - generated.get(), totalChunks.get(), - totalChunks.get() - generated.get(), - eta, M.ms() - startTime.get(), currentGeneratorMethod.get()); + regionsPerMinute.getAverage(), + (double) generated.get() / (double) totalChunks.get(), + generated.get(), totalChunks.get(), + totalChunks.get() - generated.get(), + eta, M.ms() - startTime.get(), currentGeneratorMethod.get()); - if(cl.flip()) { + if (cl.flip()) { Iris.info("Pregen: " + Form.f(generated.get()) + " of " + Form.f(totalChunks.get()) + " (" + Form.pc((double) generated.get() / (double) totalChunks.get(), 0) + ") " + Form.f((int) chunksPerSecond.getAverage()) + "/s ETA: " + Form.duration((double) eta, 2)); } @@ -111,7 +111,7 @@ protected long loop() { private long computeETA() { return (long) ((totalChunks.get() - generated.get()) * - ((double) (M.ms() - startTime.get()) / (double) generated.get())); + ((double) (M.ms() - startTime.get()) / (double) generated.get())); } public void close() { @@ -145,42 +145,43 @@ private void shutdown() { } private void visitRegion(int x, int z, boolean regions) { - while(paused.get() && !shutdown.get()) { + while (paused.get() && !shutdown.get()) { J.sleep(50); } - if(shutdown.get()) { + if (shutdown.get()) { listener.onRegionSkipped(x, z); return; } Position2 pos = new Position2(x, z); - if(generatedRegions.contains(pos)) { + if (generatedRegions.contains(pos)) { return; } currentGeneratorMethod.set(generator.getMethod(x, z)); boolean hit = false; - if(generator.supportsRegions(x, z, listener) && regions) { + if (generator.supportsRegions(x, z, listener) && regions) { hit = true; listener.onRegionGenerating(x, z); generator.generateRegion(x, z, listener); - } else if(!regions) { + } else if (!regions) { hit = true; listener.onRegionGenerating(x, z); PregenTask.iterateRegion(x, z, (xx, zz) -> { - while(paused.get() && !shutdown.get()) { + while (paused.get() && !shutdown.get()) { J.sleep(50); } - generator.generateChunk(xx, zz, listener);}); + generator.generateChunk(xx, zz, listener); + }); } - if(hit) { + if (hit) { listener.onRegionGenerated(x, z); - if(saveLatch.flip()) { + if (saveLatch.flip()) { listener.onSaving(); generator.save(); } @@ -191,7 +192,7 @@ private void visitRegion(int x, int z, boolean regions) { } private void checkRegion(int x, int z) { - if(generatedRegions.contains(new Position2(x, z))) { + if (generatedRegions.contains(new Position2(x, z))) { return; } diff --git a/src/main/java/com/volmit/iris/core/pregenerator/LazyPregenerator.java b/src/main/java/com/volmit/iris/core/pregenerator/LazyPregenerator.java index 9d7f2aa25..065d03169 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/LazyPregenerator.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/LazyPregenerator.java @@ -21,8 +21,7 @@ import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; -public class LazyPregenerator extends Thread implements Listener -{ +public class LazyPregenerator extends Thread implements Listener { private final LazyPregenJob job; private final File destination; private final int maxPosition; @@ -30,11 +29,11 @@ public class LazyPregenerator extends Thread implements Listener private final long rate; private final ChronoLatch latch; - public LazyPregenerator(LazyPregenJob job, File destination) - { + public LazyPregenerator(LazyPregenJob job, File destination) { this.job = job; this.destination = destination; - this.maxPosition = new Spiraler(job.getRadiusBlocks() * 2, job.getRadiusBlocks() * 2, (x, z) -> {}).count(); + this.maxPosition = new Spiraler(job.getRadiusBlocks() * 2, job.getRadiusBlocks() * 2, (x, z) -> { + }).count(); this.world = Bukkit.getWorld(job.getWorld()); this.rate = Math.round((1D / (job.chunksPerMinute / 60D)) * 1000D); this.latch = new ChronoLatch(60000); @@ -44,17 +43,31 @@ public LazyPregenerator(File file) throws IOException { this(new Gson().fromJson(IO.readAll(file), LazyPregenJob.class), file); } + public static void loadLazyGenerators() { + for (World i : Bukkit.getWorlds()) { + File lazygen = new File(i.getWorldFolder(), "lazygen.json"); + + if (lazygen.exists()) { + try { + LazyPregenerator p = new LazyPregenerator(lazygen); + p.start(); + Iris.info("Started Lazy Pregenerator: " + p.job); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + } + } + @EventHandler - public void on(WorldUnloadEvent e) - { - if(e.getWorld().equals(world)) { + public void on(WorldUnloadEvent e) { + if (e.getWorld().equals(world)) { interrupt(); } } - public void run() - { - while(!interrupted()) { + public void run() { + while (!interrupted()) { J.sleep(rate); tick(); } @@ -67,30 +80,21 @@ public void run() } public void tick() { - if(latch.flip()) - { + if (latch.flip()) { save(); Iris.info("LazyGen: " + world.getName() + " RTT: " + Form.duration((Math.pow((job.radiusBlocks / 16D), 2) / job.chunksPerMinute) * 60 * 1000, 2)); } - if(job.getPosition() >= maxPosition) - { - if(job.isHealing()) - { + if (job.getPosition() >= maxPosition) { + if (job.isHealing()) { int pos = (job.getHealingPosition() + 1) % maxPosition; job.setHealingPosition(pos); tickRegenerate(getChunk(pos)); - } - - else - { + } else { Iris.verbose("Completed Lazy Gen!"); interrupt(); } - } - - else - { + } else { int pos = job.getPosition() + 1; job.setPosition(pos); tickGenerate(getChunk(pos)); @@ -98,10 +102,9 @@ public void tick() { } private void tickGenerate(Position2 chunk) { - if(PaperLib.isPaper()) { + if (PaperLib.isPaper()) { PaperLib.getChunkAtAsync(world, chunk.getX(), chunk.getZ(), true).thenAccept((i) -> Iris.verbose("Generated Async " + chunk)); - } - else { + } else { J.s(() -> world.getChunkAt(chunk.getX(), chunk.getZ())); Iris.verbose("Generated " + chunk); } @@ -112,8 +115,7 @@ private void tickRegenerate(Position2 chunk) { Iris.verbose("Regenerated " + chunk); } - public Position2 getChunk(int position) - { + public Position2 getChunk(int position) { int p = -1; AtomicInteger xx = new AtomicInteger(); AtomicInteger zz = new AtomicInteger(); @@ -122,21 +124,18 @@ public Position2 getChunk(int position) zz.set(z); }); - while(s.hasNext() && p++ < position) { + while (s.hasNext() && p++ < position) { s.next(); } return new Position2(xx.get(), zz.get()); } - public void save() - { + public void save() { J.a(() -> { try { saveNow(); - } - - catch (Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } }); @@ -146,33 +145,19 @@ public void saveNow() throws IOException { IO.writeAll(this.destination, new Gson().toJson(job)); } - public static void loadLazyGenerators() - { - for(World i : Bukkit.getWorlds()) - { - File lazygen = new File(i.getWorldFolder(), "lazygen.json"); - - if(lazygen.exists()) { - try { - LazyPregenerator p = new LazyPregenerator(lazygen); - p.start(); - Iris.info("Started Lazy Pregenerator: " + p.job); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } - } - @Data @Builder - public static class LazyPregenJob - { + public static class LazyPregenJob { private String world; - @Builder.Default private int healingPosition = 0; - @Builder.Default private boolean healing = false; - @Builder.Default private int chunksPerMinute = 32; // 48 hours is roughly 5000 radius - @Builder.Default private int radiusBlocks = 5000; - @Builder.Default private int position = 0; + @Builder.Default + private int healingPosition = 0; + @Builder.Default + private boolean healing = false; + @Builder.Default + private int chunksPerMinute = 32; // 48 hours is roughly 5000 radius + @Builder.Default + private int radiusBlocks = 5000; + @Builder.Default + private int position = 0; } } diff --git a/src/main/java/com/volmit/iris/core/pregenerator/PregenTask.java b/src/main/java/com/volmit/iris/core/pregenerator/PregenTask.java index 810973567..4abe057f8 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/PregenTask.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/PregenTask.java @@ -43,7 +43,7 @@ public class PregenTask { private int height = 1; public static void iterateRegion(int xr, int zr, Spiraled s, Position2 pull) { - for(Position2 i : ORDERS.computeIfAbsent(pull, PregenTask::computeOrder)) { + for (Position2 i : ORDERS.computeIfAbsent(pull, PregenTask::computeOrder)) { s.on(i.getX() + (xr << 5), i.getZ() + (zr << 5)); } } @@ -57,7 +57,7 @@ private static KList computeOrder(Position2 pull) { new Spiraler(33, 33, (x, z) -> { int xx = (x + 15); int zz = (z + 15); - if(xx < 0 || xx > 31 || zz < 0 || zz > 31) { + if (xx < 0 || xx > 31 || zz < 0 || zz > 31) { return; } @@ -74,7 +74,7 @@ private static KList computeChunkOrder() { new Spiraler(33, 33, (x, z) -> { int xx = x + 15; int zz = z + 15; - if(xx < 0 || xx > 31 || zz < 0 || zz > 31) { + if (xx < 0 || xx > 31 || zz < 0 || zz > 31) { return; } @@ -86,11 +86,11 @@ private static KList computeChunkOrder() { public void iterateRegions(Spiraled s) { new Spiraler(getWidth() * 2, getHeight() * 2, s) - .setOffset(center.getX(), center.getZ()).drain(); + .setOffset(center.getX(), center.getZ()).drain(); } public void iterateAllChunks(Spiraled s) { new Spiraler(getWidth() * 2, getHeight() * 2, (x, z) -> iterateRegion(x, z, s)) - .setOffset(center.getX(), center.getZ()).drain(); + .setOffset(center.getX(), center.getZ()).drain(); } } diff --git a/src/main/java/com/volmit/iris/core/pregenerator/PregeneratorMethod.java b/src/main/java/com/volmit/iris/core/pregenerator/PregeneratorMethod.java index 2205d83de..282f2d2c1 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/PregeneratorMethod.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/PregeneratorMethod.java @@ -43,10 +43,8 @@ public interface PregeneratorMethod { /** * Return true if regions can be generated * - * @param x - * the x region - * @param z - * the z region + * @param x the x region + * @param z the z region * @return true if they can be */ boolean supportsRegions(int x, int z, PregenListener listener); @@ -54,10 +52,8 @@ public interface PregeneratorMethod { /** * Return the name of the method being used * - * @param x - * the x region - * @param z - * the z region + * @param x the x region + * @param z the z region * @return the name */ String getMethod(int x, int z); @@ -66,22 +62,17 @@ public interface PregeneratorMethod { * Called to generate a region. Execute sync, if multicore internally, wait * for the task to complete * - * @param x - * the x - * @param z - * the z - * @param listener - * signal chunks generating & generated. Parallel capable. + * @param x the x + * @param z the z + * @param listener signal chunks generating & generated. Parallel capable. */ void generateRegion(int x, int z, PregenListener listener); /** * Called to generate a chunk. You can go async so long as save will wait on the threads to finish * - * @param x - * the x - * @param z - * the z + * @param x the x + * @param z the z */ void generateChunk(int x, int z, PregenListener listener); diff --git a/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java b/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java index 6d76d29a4..a7469cd5c 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/methods/AsyncPregenMethod.java @@ -39,7 +39,7 @@ public class AsyncPregenMethod implements PregeneratorMethod { private final KList> future; public AsyncPregenMethod(World world, int threads) { - if(!PaperLib.isPaper()) { + if (!PaperLib.isPaper()) { throw new UnsupportedOperationException("Cannot use PaperAsync on non paper!"); } @@ -51,17 +51,17 @@ public AsyncPregenMethod(World world, int threads) { private void unloadAndSaveAllChunks() { try { J.sfut(() -> { - if(world == null) { + if (world == null) { Iris.warn("World was null somehow..."); return; } - for(Chunk i : world.getLoadedChunks()) { + for (Chunk i : world.getLoadedChunks()) { i.unload(true); } world.save(); }).get(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -69,7 +69,7 @@ private void unloadAndSaveAllChunks() { private void completeChunk(int x, int z, PregenListener listener) { try { future.add(PaperLib.getChunkAtAsync(world, x, z, true).thenApply((i) -> { - if(i == null) { + if (i == null) { } @@ -77,7 +77,7 @@ private void completeChunk(int x, int z, PregenListener listener) { listener.onChunkCleaned(x, z); return 0; })); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -85,31 +85,31 @@ private void completeChunk(int x, int z, PregenListener listener) { private void waitForChunksPartial(int maxWaiting) { future.removeWhere(Objects::isNull); - while(future.size() > maxWaiting) { + while (future.size() > maxWaiting) { try { Future i = future.remove(0); - if(i == null) { + if (i == null) { continue; } i.get(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } } private void waitForChunks() { - for(Future i : future.copy()) { - if(i == null) { + for (Future i : future.copy()) { + if (i == null) { continue; } try { i.get(); future.remove(i); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -152,7 +152,7 @@ public void generateRegion(int x, int z, PregenListener listener) { @Override public void generateChunk(int x, int z, PregenListener listener) { listener.onChunkGenerating(x, z); - if(future.size() > 256) { + if (future.size() > 256) { waitForChunksPartial(256); } future.add(burst.complete(() -> completeChunk(x, z, listener))); @@ -160,7 +160,7 @@ public void generateChunk(int x, int z, PregenListener listener) { @Override public Mantle getMantle() { - if(IrisToolbelt.isIrisWorld(world)) { + if (IrisToolbelt.isIrisWorld(world)) { return IrisToolbelt.access(world).getEngine().getMantle().getMantle(); } diff --git a/src/main/java/com/volmit/iris/core/pregenerator/methods/HybridPregenMethod.java b/src/main/java/com/volmit/iris/core/pregenerator/methods/HybridPregenMethod.java index 6a091fe9b..8ae773641 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/methods/HybridPregenMethod.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/methods/HybridPregenMethod.java @@ -54,7 +54,7 @@ public void save() { @Override public boolean supportsRegions(int x, int z, PregenListener listener) { - return inWorld.supportsRegions(x, z, listener); + return inWorld.supportsRegions(x, z, listener); } @Override diff --git a/src/main/java/com/volmit/iris/core/pregenerator/methods/MedievalPregenMethod.java b/src/main/java/com/volmit/iris/core/pregenerator/methods/MedievalPregenMethod.java index 5fdc77613..c27fefaa7 100644 --- a/src/main/java/com/volmit/iris/core/pregenerator/methods/MedievalPregenMethod.java +++ b/src/main/java/com/volmit/iris/core/pregenerator/methods/MedievalPregenMethod.java @@ -40,10 +40,10 @@ public MedievalPregenMethod(World world) { } private void waitForChunks() { - for(CompletableFuture i : futures) { + for (CompletableFuture i : futures) { try { i.get(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -55,12 +55,12 @@ private void unloadAndSaveAllChunks() { waitForChunks(); try { J.sfut(() -> { - for(Chunk i : world.getLoadedChunks()) { + for (Chunk i : world.getLoadedChunks()) { i.unload(true); } world.save(); }).get(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -97,7 +97,7 @@ public String getMethod(int x, int z) { @Override public void generateChunk(int x, int z, PregenListener listener) { - if(futures.size() > IrisSettings.getThreadCount(IrisSettings.get().getConcurrency().getParallelism())) { + if (futures.size() > IrisSettings.getThreadCount(IrisSettings.get().getConcurrency().getParallelism())) { waitForChunks(); } @@ -111,7 +111,7 @@ public void generateChunk(int x, int z, PregenListener listener) { @Override public Mantle getMantle() { - if(IrisToolbelt.isIrisWorld(world)) { + if (IrisToolbelt.isIrisWorld(world)) { return IrisToolbelt.access(world).getEngine().getMantle().getMantle(); } diff --git a/src/main/java/com/volmit/iris/core/project/IrisProject.java b/src/main/java/com/volmit/iris/core/project/IrisProject.java index 9dc1597c8..d094c82ff 100644 --- a/src/main/java/com/volmit/iris/core/project/IrisProject.java +++ b/src/main/java/com/volmit/iris/core/project/IrisProject.java @@ -72,14 +72,14 @@ public IrisProject(File path) { public static int clean(VolmitSender s, File clean) { int c = 0; - if(clean.isDirectory()) { - for(File i : clean.listFiles()) { + if (clean.isDirectory()) { + for (File i : clean.listFiles()) { c += clean(s, i); } - } else if(clean.getName().endsWith(".json")) { + } else if (clean.getName().endsWith(".json")) { try { clean(clean); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Failed to beautify " + clean.getAbsolutePath() + " You may have errors in your json!"); } @@ -98,29 +98,29 @@ public static void clean(File clean) throws IOException { } public static void fixBlocks(JSONObject obj, File f) { - for(String i : obj.keySet()) { + for (String i : obj.keySet()) { Object o = obj.get(i); - if(i.equals("block") && o instanceof String && !o.toString().trim().isEmpty() && !o.toString().contains(":")) { + if (i.equals("block") && o instanceof String && !o.toString().trim().isEmpty() && !o.toString().contains(":")) { obj.put(i, "minecraft:" + o); Iris.debug("Updated Block Key: " + o + " to " + obj.getString(i) + " in " + f.getPath()); } - if(o instanceof JSONObject) { + if (o instanceof JSONObject) { fixBlocks((JSONObject) o, f); - } else if(o instanceof JSONArray) { + } else if (o instanceof JSONArray) { fixBlocks((JSONArray) o, f); } } } public static void fixBlocks(JSONArray obj, File f) { - for(int i = 0; i < obj.length(); i++) { + for (int i = 0; i < obj.length(); i++) { Object o = obj.get(i); - if(o instanceof JSONObject) { + if (o instanceof JSONObject) { fixBlocks((JSONObject) o, f); - } else if(o instanceof JSONArray) { + } else if (o instanceof JSONArray) { fixBlocks((JSONArray) o, f); } } @@ -133,11 +133,11 @@ public boolean isOpen() { public KList collectFiles(File f, String fileExtension) { KList l = new KList<>(); - if(f.isDirectory()) { - for(File i : f.listFiles()) { + if (f.isDirectory()) { + for (File i : f.listFiles()) { l.addAll(collectFiles(i, fileExtension)); } - } else if(f.getName().endsWith("." + fileExtension)) { + } else if (f.getName().endsWith("." + fileExtension)) { l.add(f); } @@ -160,28 +160,28 @@ public void openVSCode(VolmitSender sender) { J.attemptAsync(() -> { try { - if(d.getLoader() == null) { + if (d.getLoader() == null) { sender.sendMessage("Could not get dimension loader"); return; } File f = d.getLoader().getDataFolder(); - if(!doOpenVSCode(f)) { + if (!doOpenVSCode(f)) { File ff = new File(d.getLoader().getDataFolder(), d.getLoadKey() + ".code-workspace"); Iris.warn("Project missing code-workspace: " + ff.getAbsolutePath() + " Re-creating code workspace."); try { IO.writeAll(ff, createCodeWorkspaceConfig()); - } catch(IOException e1) { + } catch (IOException e1) { Iris.reportError(e1); e1.printStackTrace(); } updateWorkspace(); - if(!doOpenVSCode(f)) { + if (!doOpenVSCode(f)) { Iris.warn("Tried creating code workspace but failed a second time. Your project is likely corrupt."); } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -190,16 +190,16 @@ public void openVSCode(VolmitSender sender) { private boolean doOpenVSCode(File f) throws IOException { boolean foundWork = false; - for(File i : Objects.requireNonNull(f.listFiles())) { - if(i.getName().endsWith(".code-workspace")) { + for (File i : Objects.requireNonNull(f.listFiles())) { + if (i.getName().endsWith(".code-workspace")) { foundWork = true; J.a(() -> { updateWorkspace(); }); - if(IrisSettings.get().getStudio().isOpenVSCode()) { - if(!GraphicsEnvironment.isHeadless()) { + if (IrisSettings.get().getStudio().isOpenVSCode()) { + if (!GraphicsEnvironment.isHeadless()) { Iris.msg("Opening VSCode. You may see the output from VSCode."); Iris.msg("VSCode output always starts with: '(node:#####) electron'"); Desktop.getDesktop().open(i); @@ -213,21 +213,21 @@ private boolean doOpenVSCode(File f) throws IOException { } public void open(VolmitSender sender, long seed, Consumer onDone) throws IrisException { - if(isOpen()) { + if (isOpen()) { close(); } boolean hasError = false; - if(hasError) { + if (hasError) { return; } IrisDimension d = IrisData.loadAnyDimension(getName()); - if(d == null) { + if (d == null) { sender.sendMessage("Can't find dimension: " + getName()); return; - } else if(sender.isPlayer()) { + } else if (sender.isPlayer()) { sender.player().setGameMode(GameMode.SPECTATOR); } @@ -237,14 +237,14 @@ public void open(VolmitSender sender, long seed, Consumer onDone) throws J.a(() -> { try { activeProvider = (PlatformChunkGenerator) IrisToolbelt.createWorld() - .seed(seed) - .sender(sender) - .studio(true) - .name("iris/" + UUID.randomUUID()) - .dimension(d.getLoadKey()) - .create().getGenerator(); + .seed(seed) + .sender(sender) + .studio(true) + .name("iris/" + UUID.randomUUID()) + .dimension(d.getLoadKey()) + .create().getGenerator(); onDone.accept(activeProvider.getTarget().getWorld().realWorld()); - } catch(IrisException e) { + } catch (IrisException e) { e.printStackTrace(); } }); @@ -276,13 +276,13 @@ public boolean updateWorkspace() { IO.writeAll(ws, j.toString(4)); p.end(); return true; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Project invalid: " + ws.getAbsolutePath() + " Re-creating. You may loose some vs-code workspace settings! But not your actual project!"); ws.delete(); try { IO.writeAll(ws, createCodeWorkspaceConfig()); - } catch(IOException e1) { + } catch (IOException e1) { Iris.reportError(e1); e1.printStackTrace(); } @@ -324,19 +324,19 @@ public JSONObject createCodeWorkspaceConfig() { JSONArray schemas = new JSONArray(); IrisData dm = IrisData.get(getPath()); - for(ResourceLoader r : dm.getLoaders().v()) { - if(r.supportsSchemas()) { + for (ResourceLoader r : dm.getLoaders().v()) { + if (r.supportsSchemas()) { schemas.put(r.buildSchema()); } } - for(Class i : Iris.getClasses("com.volmit.iris.engine.object.", Snippet.class)) { + for (Class i : Iris.getClasses("com.volmit.iris.engine.object.", Snippet.class)) { try { String snipType = i.getDeclaredAnnotation(Snippet.class).value(); JSONObject o = new JSONObject(); KList fm = new KList<>(); - for(int g = 1; g < 8; g++) { + for (int g = 1; g < 8; g++) { fm.add("/snippet/" + snipType + Form.repeat("/*", g) + ".json"); } @@ -347,11 +347,11 @@ public JSONObject createCodeWorkspaceConfig() { J.attemptAsync(() -> { try { IO.writeAll(a, new SchemaBuilder(i, dm).construct().toString(4)); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } }); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -377,7 +377,7 @@ public File compilePackage(VolmitSender sender, boolean obfuscate, boolean minif KSet loot = new KSet<>(); KSet blocks = new KSet<>(); - for(String i : dm.getDimensionLoader().getPossibleKeys()) { + for (String i : dm.getDimensionLoader().getPossibleKeys()) { blocks.add(dm.getBlockLoader().load(i)); } @@ -397,13 +397,13 @@ public File compilePackage(VolmitSender sender, boolean obfuscate, boolean minif StringBuilder c = new StringBuilder(); sender.sendMessage("Serializing Objects"); - for(IrisBiome i : biomes) { - for(IrisObjectPlacement j : i.getObjects()) { + for (IrisBiome i : biomes) { + for (IrisObjectPlacement j : i.getObjects()) { b.append(j.hashCode()); KList newNames = new KList<>(); - for(String k : j.getPlace()) { - if(renameObjects.containsKey(k)) { + for (String k : j.getPlace()) { + if (renameObjects.containsKey(k)) { newNames.add(renameObjects.get(k)); continue; } @@ -431,12 +431,12 @@ public File compilePackage(VolmitSender sender, boolean obfuscate, boolean minif gb.append(IO.hash(f)); ggg.set(ggg.get() + 1); - if(cl.flip()) { + if (cl.flip()) { int g = ggg.get(); ggg.set(0); sender.sendMessage("Wrote another " + g + " Objects"); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } }))); @@ -452,7 +452,7 @@ public File compilePackage(VolmitSender sender, boolean obfuscate, boolean minif IO.writeAll(new File(folder, "dimensions/" + dimension.getLoadKey() + ".json"), a); b.append(IO.hash(a)); - for(IrisGenerator i : generators) { + for (IrisGenerator i : generators) { a = new JSONObject(new Gson().toJson(i)).toString(minify ? 0 : 4); IO.writeAll(new File(folder, "generators/" + i.getLoadKey() + ".json"), a); b.append(IO.hash(a)); @@ -461,31 +461,31 @@ public File compilePackage(VolmitSender sender, boolean obfuscate, boolean minif c.append(IO.hash(b.toString())); b = new StringBuilder(); - for(IrisRegion i : regions) { + for (IrisRegion i : regions) { a = new JSONObject(new Gson().toJson(i)).toString(minify ? 0 : 4); IO.writeAll(new File(folder, "regions/" + i.getLoadKey() + ".json"), a); b.append(IO.hash(a)); } - for(IrisBlockData i : blocks) { + for (IrisBlockData i : blocks) { a = new JSONObject(new Gson().toJson(i)).toString(minify ? 0 : 4); IO.writeAll(new File(folder, "blocks/" + i.getLoadKey() + ".json"), a); b.append(IO.hash(a)); } - for(IrisBiome i : biomes) { + for (IrisBiome i : biomes) { a = new JSONObject(new Gson().toJson(i)).toString(minify ? 0 : 4); IO.writeAll(new File(folder, "biomes/" + i.getLoadKey() + ".json"), a); b.append(IO.hash(a)); } - for(IrisEntity i : entities) { + for (IrisEntity i : entities) { a = new JSONObject(new Gson().toJson(i)).toString(minify ? 0 : 4); IO.writeAll(new File(folder, "entities/" + i.getLoadKey() + ".json"), a); b.append(IO.hash(a)); } - for(IrisLootTable i : loot) { + for (IrisLootTable i : loot) { a = new JSONObject(new Gson().toJson(i)).toString(minify ? 0 : 4); IO.writeAll(new File(folder, "loot/" + i.getLoadKey() + ".json"), a); b.append(IO.hash(a)); @@ -505,7 +505,7 @@ public File compilePackage(VolmitSender sender, boolean obfuscate, boolean minif sender.sendMessage("Package Compiled!"); return p; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -528,18 +528,18 @@ public void execute(File f) { IrisObject o = new IrisObject(0, 0, 0); o.read(f); - if(o.getBlocks().isEmpty()) { + if (o.getBlocks().isEmpty()) { sender.sendMessageRaw("" + f.getPath() + - "'>- IOB " + f.getName() + " has 0 blocks!"); + "" + f.getPath() + + "'>- IOB " + f.getName() + " has 0 blocks!"); } - if(o.getW() == 0 || o.getH() == 0 || o.getD() == 0) { + if (o.getW() == 0 || o.getH() == 0 || o.getD() == 0) { sender.sendMessageRaw("" + f.getPath() + "\nThe width height or depth has a zero in it (bad format)" + - "'>- IOB " + f.getName() + " is not 3D!"); + "" + f.getPath() + "\nThe width height or depth has a zero in it (bad format)" + + "'>- IOB " + f.getName() + " is not 3D!"); } - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } } @@ -559,11 +559,11 @@ public void execute(File f) { scanForErrors(data, f, p, sender); IO.writeAll(f, p.toString(4)); - } catch(Throwable e) { + } catch (Throwable e) { sender.sendMessageRaw("" + f.getPath() + - "\n" + e.getMessage() + - "'>- JSON Error " + f.getName()); + "" + f.getPath() + + "\n" + e.getMessage() + + "'>- JSON Error " + f.getName()); } } @@ -580,7 +580,7 @@ private void scanForErrors(IrisData data, File f, JSONObject p, VolmitSender sen String key = data.toLoadKey(f); ResourceLoader loader = data.getTypedLoaderFor(f); - if(loader == null) { + if (loader == null) { sender.sendMessageBasic("Can't find loader for " + f.getPath()); return; } @@ -593,62 +593,62 @@ private void scanForErrors(IrisData data, File f, JSONObject p, VolmitSender sen public void compare(Class c, JSONObject j, VolmitSender sender, KList path) { try { Object o = c.getClass().getConstructor().newInstance(); - } catch(Throwable e) { + } catch (Throwable e) { } } public void files(File clean, KList files) { - if(clean.isDirectory()) { - for(File i : clean.listFiles()) { + if (clean.isDirectory()) { + for (File i : clean.listFiles()) { files(i, files); } - } else if(clean.getName().endsWith(".json")) { + } else if (clean.getName().endsWith(".json")) { try { files.add(clean); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } } } public void filesObjects(File clean, KList files) { - if(clean.isDirectory()) { - for(File i : clean.listFiles()) { + if (clean.isDirectory()) { + for (File i : clean.listFiles()) { filesObjects(i, files); } - } else if(clean.getName().endsWith(".iob")) { + } else if (clean.getName().endsWith(".iob")) { try { files.add(clean); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } } } private void fixBlocks(JSONObject obj) { - for(String i : obj.keySet()) { + for (String i : obj.keySet()) { Object o = obj.get(i); - if(i.equals("block") && o instanceof String && !o.toString().trim().isEmpty() && !o.toString().contains(":")) { + if (i.equals("block") && o instanceof String && !o.toString().trim().isEmpty() && !o.toString().contains(":")) { obj.put(i, "minecraft:" + o); } - if(o instanceof JSONObject) { + if (o instanceof JSONObject) { fixBlocks((JSONObject) o); - } else if(o instanceof JSONArray) { + } else if (o instanceof JSONArray) { fixBlocks((JSONArray) o); } } } private void fixBlocks(JSONArray obj) { - for(int i = 0; i < obj.length(); i++) { + for (int i = 0; i < obj.length(); i++) { Object o = obj.get(i); - if(o instanceof JSONObject) { + if (o instanceof JSONObject) { fixBlocks((JSONObject) o); - } else if(o instanceof JSONArray) { + } else if (o instanceof JSONArray) { fixBlocks((JSONArray) o); } } diff --git a/src/main/java/com/volmit/iris/core/project/SchemaBuilder.java b/src/main/java/com/volmit/iris/core/project/SchemaBuilder.java index f39095fdf..7cdf4dd76 100644 --- a/src/main/java/com/volmit/iris/core/project/SchemaBuilder.java +++ b/src/main/java/com/volmit/iris/core/project/SchemaBuilder.java @@ -60,7 +60,7 @@ public SchemaBuilder(Class root, IrisData data) { private static JSONArray getPotionTypes() { JSONArray a = new JSONArray(); - for(PotionEffectType gg : PotionEffectType.values()) { + for (PotionEffectType gg : PotionEffectType.values()) { a.put(gg.getName().toUpperCase().replaceAll("\\Q \\E", "_")); } @@ -69,7 +69,7 @@ private static JSONArray getPotionTypes() { private static JSONArray getEnchantTypes() { JSONArray array = new JSONArray(); - for(Enchantment e : Enchantment.values()) { + for (Enchantment e : Enchantment.values()) { array.put(e.getKey().getKey()); } return array; @@ -82,21 +82,21 @@ public JSONObject construct() { JSONObject props = buildProperties(root); - for(String i : props.keySet()) { - if(!schema.has(i)) { + for (String i : props.keySet()) { + if (!schema.has(i)) { schema.put(i, props.get(i)); } } JSONObject defs = new JSONObject(); - for(Map.Entry entry : definitions.entrySet()) { + for (Map.Entry entry : definitions.entrySet()) { defs.put(entry.getKey(), entry.getValue()); } schema.put("definitions", defs); - for(String i : warnings) { + for (String i : warnings) { Iris.warn(root.getSimpleName() + ": " + i); } @@ -110,17 +110,17 @@ private JSONObject buildProperties(Class c) { o.put("type", getType(c)); JSONArray required = new JSONArray(); - if(c.isAssignableFrom(IrisRegistrant.class) || IrisRegistrant.class.isAssignableFrom(c)) { - for(Field k : IrisRegistrant.class.getDeclaredFields()) { + if (c.isAssignableFrom(IrisRegistrant.class) || IrisRegistrant.class.isAssignableFrom(c)) { + for (Field k : IrisRegistrant.class.getDeclaredFields()) { k.setAccessible(true); - if(Modifier.isStatic(k.getModifiers()) || Modifier.isFinal(k.getModifiers()) || Modifier.isTransient(k.getModifiers())) { + if (Modifier.isStatic(k.getModifiers()) || Modifier.isFinal(k.getModifiers()) || Modifier.isTransient(k.getModifiers())) { continue; } JSONObject property = buildProperty(k, c); - if(property.getBoolean("!required")) { + if (property.getBoolean("!required")) { required.put(k.getName()); } @@ -129,10 +129,10 @@ private JSONObject buildProperties(Class c) { } } - for(Field k : c.getDeclaredFields()) { + for (Field k : c.getDeclaredFields()) { k.setAccessible(true); - if(Modifier.isStatic(k.getModifiers()) || Modifier.isFinal(k.getModifiers()) || Modifier.isTransient(k.getModifiers())) { + if (Modifier.isStatic(k.getModifiers()) || Modifier.isFinal(k.getModifiers()) || Modifier.isTransient(k.getModifiers())) { continue; } @@ -142,14 +142,14 @@ private JSONObject buildProperties(Class c) { properties.put(k.getName(), property); } - if(required.length() > 0) { + if (required.length() > 0) { o.put("required", required); } o.put("properties", properties); - if(c.isAnnotationPresent(Snippet.class)) { + if (c.isAnnotationPresent(Snippet.class)) { JSONObject anyOf = new JSONObject(); JSONArray arr = new JSONArray(); JSONObject str = new JSONObject(); @@ -172,16 +172,16 @@ private JSONObject buildProperty(Field k, Class cl) { prop.put("type", type); String fancyType = "Unknown Type"; - switch(type) { + switch (type) { case "boolean" -> fancyType = "Boolean"; case "integer" -> { fancyType = "Integer"; - if(k.isAnnotationPresent(MinNumber.class)) { + if (k.isAnnotationPresent(MinNumber.class)) { int min = (int) k.getDeclaredAnnotation(MinNumber.class).value(); prop.put("minimum", min); description.add(SYMBOL_LIMIT__N + " Minimum allowed is " + min); } - if(k.isAnnotationPresent(MaxNumber.class)) { + if (k.isAnnotationPresent(MaxNumber.class)) { int max = (int) k.getDeclaredAnnotation(MaxNumber.class).value(); prop.put("maximum", max); description.add(SYMBOL_LIMIT__N + " Maximum allowed is " + max); @@ -189,12 +189,12 @@ private JSONObject buildProperty(Field k, Class cl) { } case "number" -> { fancyType = "Number"; - if(k.isAnnotationPresent(MinNumber.class)) { + if (k.isAnnotationPresent(MinNumber.class)) { double min = k.getDeclaredAnnotation(MinNumber.class).value(); prop.put("minimum", min); description.add(SYMBOL_LIMIT__N + " Minimum allowed is " + min); } - if(k.isAnnotationPresent(MaxNumber.class)) { + if (k.isAnnotationPresent(MaxNumber.class)) { double max = k.getDeclaredAnnotation(MaxNumber.class).value(); prop.put("maximum", max); description.add(SYMBOL_LIMIT__N + " Maximum allowed is " + max); @@ -202,26 +202,26 @@ private JSONObject buildProperty(Field k, Class cl) { } case "string" -> { fancyType = "Text"; - if(k.isAnnotationPresent(MinNumber.class)) { + if (k.isAnnotationPresent(MinNumber.class)) { int min = (int) k.getDeclaredAnnotation(MinNumber.class).value(); prop.put("minLength", min); description.add(SYMBOL_LIMIT__N + " Minimum Length allowed is " + min); } - if(k.isAnnotationPresent(MaxNumber.class)) { + if (k.isAnnotationPresent(MaxNumber.class)) { int max = (int) k.getDeclaredAnnotation(MaxNumber.class).value(); prop.put("maxLength", max); description.add(SYMBOL_LIMIT__N + " Maximum Length allowed is " + max); } - if(k.isAnnotationPresent(RegistryListResource.class)) { + if (k.isAnnotationPresent(RegistryListResource.class)) { RegistryListResource rr = k.getDeclaredAnnotation(RegistryListResource.class); ResourceLoader loader = data.getLoaders().get(rr.value()); - if(loader != null) { + if (loader != null) { String key = "erz" + loader.getFolderName(); - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", new JSONArray(loader.getPossibleKeys())); definitions.put(key, j); @@ -233,18 +233,18 @@ private JSONObject buildProperty(Field k, Class cl) { } else { Iris.error("Cannot find Registry Loader for type " + rr.value() + " used in " + k.getDeclaringClass().getCanonicalName() + " in field " + k.getName()); } - } else if(k.isAnnotationPresent(RegistryListBlockType.class)) { + } else if (k.isAnnotationPresent(RegistryListBlockType.class)) { String key = "enum-block-type"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); JSONArray ja = new JSONArray(); - for(String i : data.getBlockLoader().getPossibleKeys()) { + for (String i : data.getBlockLoader().getPossibleKeys()) { ja.put(i); } - for(String i : B.getBlockTypes()) { + for (String i : B.getBlockTypes()) { ja.put(i); } @@ -256,10 +256,10 @@ private JSONObject buildProperty(Field k, Class cl) { prop.put("$ref", "#/definitions/" + key); description.add(SYMBOL_TYPE__N + " Must be a valid Block Type (use ctrl+space for auto complete!)"); - } else if(k.isAnnotationPresent(RegistryListItemType.class)) { + } else if (k.isAnnotationPresent(RegistryListItemType.class)) { String key = "enum-item-type"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", ITEM_TYPES); definitions.put(key, j); @@ -269,10 +269,10 @@ private JSONObject buildProperty(Field k, Class cl) { prop.put("$ref", "#/definitions/" + key); description.add(SYMBOL_TYPE__N + " Must be a valid Item Type (use ctrl+space for auto complete!)"); - } else if(k.isAnnotationPresent(RegistryListSpecialEntity.class)) { + } else if (k.isAnnotationPresent(RegistryListSpecialEntity.class)) { String key = "enum-reg-specialentity"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); KList list = new KList<>(); list.addAll(Iris.linkMythicMobs.getMythicMobTypes().stream().map(s -> "MythicMobs:" + s).collect(Collectors.toList())); @@ -284,10 +284,10 @@ private JSONObject buildProperty(Field k, Class cl) { fancyType = "Mythic Mob Type"; prop.put("$ref", "#/definitions/" + key); description.add(SYMBOL_TYPE__N + " Must be a valid Mythic Mob Type (use ctrl+space for auto complete!) Define mythic mobs with the mythic mobs plugin configuration files."); - } else if(k.isAnnotationPresent(RegistryListFont.class)) { + } else if (k.isAnnotationPresent(RegistryListFont.class)) { String key = "enum-font"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", FONT_TYPES); definitions.put(key, j); @@ -297,10 +297,10 @@ private JSONObject buildProperty(Field k, Class cl) { prop.put("$ref", "#/definitions/" + key); description.add(SYMBOL_TYPE__N + " Must be a valid Font Family (use ctrl+space for auto complete!)"); - } else if(k.isAnnotationPresent(RegistryListEnchantment.class)) { + } else if (k.isAnnotationPresent(RegistryListEnchantment.class)) { String key = "enum-enchantment"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", ENCHANT_TYPES); definitions.put(key, j); @@ -309,10 +309,10 @@ private JSONObject buildProperty(Field k, Class cl) { fancyType = "Enchantment Type"; prop.put("$ref", "#/definitions/" + key); description.add(SYMBOL_TYPE__N + " Must be a valid Enchantment Type (use ctrl+space for auto complete!)"); - } else if(k.getType().equals(PotionEffectType.class)) { + } else if (k.getType().equals(PotionEffectType.class)) { String key = "enum-potion-effect-type"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", POTION_TYPES); definitions.put(key, j); @@ -322,12 +322,12 @@ private JSONObject buildProperty(Field k, Class cl) { prop.put("$ref", "#/definitions/" + key); description.add(SYMBOL_TYPE__N + " Must be a valid Potion Effect Type (use ctrl+space for auto complete!)"); - } else if(k.getType().isEnum()) { + } else if (k.getType().isEnum()) { fancyType = k.getType().getSimpleName().replaceAll("\\QIris\\E", ""); JSONArray a = new JSONArray(); boolean advanced = k.getType().isAnnotationPresent(Desc.class); - for(Object gg : k.getType().getEnumConstants()) { - if(advanced) { + for (Object gg : k.getType().getEnumConstants()) { + if (advanced) { try { JSONObject j = new JSONObject(); String name = ((Enum) gg).name(); @@ -335,7 +335,7 @@ private JSONObject buildProperty(Field k, Class cl) { Desc dd = k.getType().getField(name).getAnnotation(Desc.class); j.put("description", dd == null ? ("No Description for " + name) : dd.value()); a.put(j); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -346,7 +346,7 @@ private JSONObject buildProperty(Field k, Class cl) { String key = (advanced ? "oneof-" : "") + "enum-" + k.getType().getCanonicalName().replaceAll("\\Q.\\E", "-").toLowerCase(); - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put(advanced ? "oneOf" : "enum", a); definitions.put(key, j); @@ -360,7 +360,7 @@ private JSONObject buildProperty(Field k, Class cl) { case "object" -> { fancyType = k.getType().getSimpleName().replaceAll("\\QIris\\E", "") + " (Object)"; String key = "obj-" + k.getType().getCanonicalName().replaceAll("\\Q.\\E", "-").toLowerCase(); - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { definitions.put(key, new JSONObject()); definitions.put(key, buildProperties(k.getType())); } @@ -369,10 +369,10 @@ private JSONObject buildProperty(Field k, Class cl) { case "array" -> { fancyType = "List of Something...?"; ArrayType t = k.getDeclaredAnnotation(ArrayType.class); - if(t != null) { - if(t.min() > 0) { + if (t != null) { + if (t.min() > 0) { prop.put("minItems", t.min()); - if(t.min() == 1) { + if (t.min() == 1) { description.add(SYMBOL_LIMIT__N + " At least one entry must be defined, or just remove this list."); } else { description.add(SYMBOL_LIMIT__N + " Requires at least " + t.min() + " entries."); @@ -381,13 +381,13 @@ private JSONObject buildProperty(Field k, Class cl) { String arrayType = getType(t.type()); - switch(arrayType) { + switch (arrayType) { case "integer" -> fancyType = "List of Integers"; case "number" -> fancyType = "List of Numbers"; case "object" -> { fancyType = "List of " + t.type().getSimpleName().replaceAll("\\QIris\\E", "") + "s (Objects)"; String key = "obj-" + t.type().getCanonicalName().replaceAll("\\Q.\\E", "-").toLowerCase(); - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { definitions.put(key, new JSONObject()); definitions.put(key, buildProperties(t.type())); } @@ -398,15 +398,15 @@ private JSONObject buildProperty(Field k, Class cl) { case "string" -> { fancyType = "List of Text"; - if(k.isAnnotationPresent(RegistryListResource.class)) { + if (k.isAnnotationPresent(RegistryListResource.class)) { RegistryListResource rr = k.getDeclaredAnnotation(RegistryListResource.class); ResourceLoader loader = data.getLoaders().get(rr.value()); - if(loader != null) { + if (loader != null) { fancyType = "List<" + loader.getResourceTypeName() + ">"; String key = "erz" + loader.getFolderName(); - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", new JSONArray(loader.getPossibleKeys())); definitions.put(key, j); @@ -419,19 +419,19 @@ private JSONObject buildProperty(Field k, Class cl) { } else { Iris.error("Cannot find Registry Loader for type (list schema) " + rr.value() + " used in " + k.getDeclaringClass().getCanonicalName() + " in field " + k.getName()); } - } else if(k.isAnnotationPresent(RegistryListBlockType.class)) { + } else if (k.isAnnotationPresent(RegistryListBlockType.class)) { fancyType = "List of Block Types"; String key = "enum-block-type"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); JSONArray ja = new JSONArray(); - for(String i : data.getBlockLoader().getPossibleKeys()) { + for (String i : data.getBlockLoader().getPossibleKeys()) { ja.put(i); } - for(String i : B.getBlockTypes()) { + for (String i : B.getBlockTypes()) { ja.put(i); } @@ -443,11 +443,11 @@ private JSONObject buildProperty(Field k, Class cl) { items.put("$ref", "#/definitions/" + key); prop.put("items", items); description.add(SYMBOL_TYPE__N + " Must be a valid Block Type (use ctrl+space for auto complete!)"); - } else if(k.isAnnotationPresent(RegistryListItemType.class)) { + } else if (k.isAnnotationPresent(RegistryListItemType.class)) { fancyType = "List of Item Types"; String key = "enum-item-type"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", ITEM_TYPES); definitions.put(key, j); @@ -457,11 +457,11 @@ private JSONObject buildProperty(Field k, Class cl) { items.put("$ref", "#/definitions/" + key); prop.put("items", items); description.add(SYMBOL_TYPE__N + " Must be a valid Item Type (use ctrl+space for auto complete!)"); - } else if(k.isAnnotationPresent(RegistryListFont.class)) { + } else if (k.isAnnotationPresent(RegistryListFont.class)) { String key = "enum-font"; fancyType = "List of Font Families"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", FONT_TYPES); definitions.put(key, j); @@ -471,11 +471,11 @@ private JSONObject buildProperty(Field k, Class cl) { items.put("$ref", "#/definitions/" + key); prop.put("items", items); description.add(SYMBOL_TYPE__N + " Must be a valid Font Family (use ctrl+space for auto complete!)"); - } else if(k.isAnnotationPresent(RegistryListEnchantment.class)) { + } else if (k.isAnnotationPresent(RegistryListEnchantment.class)) { fancyType = "List of Enchantment Types"; String key = "enum-enchantment"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", ENCHANT_TYPES); definitions.put(key, j); @@ -485,11 +485,11 @@ private JSONObject buildProperty(Field k, Class cl) { items.put("$ref", "#/definitions/" + key); prop.put("items", items); description.add(SYMBOL_TYPE__N + " Must be a valid Enchantment Type (use ctrl+space for auto complete!)"); - } else if(t.type().equals(PotionEffectType.class)) { + } else if (t.type().equals(PotionEffectType.class)) { fancyType = "List of Potion Effect Types"; String key = "enum-potion-effect-type"; - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put("enum", POTION_TYPES); definitions.put(key, j); @@ -499,12 +499,12 @@ private JSONObject buildProperty(Field k, Class cl) { items.put("$ref", "#/definitions/" + key); prop.put("items", items); description.add(SYMBOL_TYPE__N + " Must be a valid Potion Effect Type (use ctrl+space for auto complete!)"); - } else if(t.type().isEnum()) { + } else if (t.type().isEnum()) { fancyType = "List of " + t.type().getSimpleName().replaceAll("\\QIris\\E", "") + "s"; JSONArray a = new JSONArray(); boolean advanced = t.type().isAnnotationPresent(Desc.class); - for(Object gg : t.type().getEnumConstants()) { - if(advanced) { + for (Object gg : t.type().getEnumConstants()) { + if (advanced) { try { JSONObject j = new JSONObject(); String name = ((Enum) gg).name(); @@ -512,7 +512,7 @@ private JSONObject buildProperty(Field k, Class cl) { Desc dd = t.type().getField(name).getAnnotation(Desc.class); j.put("description", dd == null ? ("No Description for " + name) : dd.value()); a.put(j); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -523,7 +523,7 @@ private JSONObject buildProperty(Field k, Class cl) { String key = (advanced ? "oneof-" : "") + "enum-" + t.type().getCanonicalName().replaceAll("\\Q.\\E", "-").toLowerCase(); - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); j.put(advanced ? "oneOf" : "enum", a); definitions.put(key, j); @@ -540,7 +540,8 @@ private JSONObject buildProperty(Field k, Class cl) { warnings.add("Undefined array type for field " + k.getName() + " (" + k.getType().getSimpleName() + ") in class " + cl.getSimpleName()); } } - default -> warnings.add("Unexpected Schema Type: " + type + " for field " + k.getName() + " (" + k.getType().getSimpleName() + ") in class " + cl.getSimpleName()); + default -> + warnings.add("Unexpected Schema Type: " + type + " for field " + k.getName() + " (" + k.getType().getSimpleName() + ") in class " + cl.getSimpleName()); } KList d = new KList<>(); @@ -550,7 +551,7 @@ private JSONObject buildProperty(Field k, Class cl) { d.add(fancyType); d.add(getDescription(k.getType())); - if(k.getType().isAnnotationPresent(Snippet.class)) { + if (k.getType().isAnnotationPresent(Snippet.class)) { String sm = k.getType().getDeclaredAnnotation(Snippet.class).value(); d.add(" "); d.add("You can instead specify \"snippet/" + sm + "/some-name.json\" to use a snippet file instead of specifying it here."); @@ -560,11 +561,11 @@ private JSONObject buildProperty(Field k, Class cl) { k.setAccessible(true); Object value = k.get(cl.newInstance()); - if(value != null) { - if(value instanceof List) { + if (value != null) { + if (value instanceof List) { d.add(" "); d.add("* Default Value is an empty list"); - } else if(!cl.isPrimitive() && !(value instanceof Number) && !(value instanceof String) && !(cl.isEnum())) { + } else if (!cl.isPrimitive() && !(value instanceof Number) && !(value instanceof String) && !(cl.isEnum())) { d.add(" "); d.add("* Default Value is a default object (create this object to see default properties)"); } else { @@ -572,7 +573,7 @@ private JSONObject buildProperty(Field k, Class cl) { d.add("* Default Value is " + value); } } - } catch(Throwable ignored) { + } catch (Throwable ignored) { } @@ -580,7 +581,7 @@ private JSONObject buildProperty(Field k, Class cl) { prop.put("type", type); prop.put("description", d.toString("\n")); - if(k.getType().isAnnotationPresent(Snippet.class)) { + if (k.getType().isAnnotationPresent(Snippet.class)) { JSONObject anyOf = new JSONObject(); JSONArray arr = new JSONArray(); JSONObject str = new JSONObject(); @@ -588,7 +589,7 @@ private JSONObject buildProperty(Field k, Class cl) { String key = "enum-snippet-" + k.getType().getDeclaredAnnotation(Snippet.class).value(); str.put("$ref", "#/definitions/" + key); - if(!definitions.containsKey(key)) { + if (!definitions.containsKey(key)) { JSONObject j = new JSONObject(); JSONArray snl = new JSONArray(); data.getPossibleSnippets(k.getType().getDeclaredAnnotation(Snippet.class).value()).forEach(snl::put); @@ -611,31 +612,31 @@ private JSONObject buildProperty(Field k, Class cl) { } private String getType(Class c) { - if(c.equals(int.class) || c.equals(Integer.class) || c.equals(long.class) || c.equals(Long.class)) { + if (c.equals(int.class) || c.equals(Integer.class) || c.equals(long.class) || c.equals(Long.class)) { return "integer"; } - if(c.equals(float.class) || c.equals(double.class) || c.equals(Float.class) || c.equals(Double.class)) { + if (c.equals(float.class) || c.equals(double.class) || c.equals(Float.class) || c.equals(Double.class)) { return "number"; } - if(c.equals(boolean.class) || c.equals(Boolean.class)) { + if (c.equals(boolean.class) || c.equals(Boolean.class)) { return "boolean"; } - if(c.equals(String.class) || c.isEnum() || c.equals(Enchantment.class) || c.equals(PotionEffectType.class)) { + if (c.equals(String.class) || c.isEnum() || c.equals(Enchantment.class) || c.equals(PotionEffectType.class)) { return "string"; } - if(c.equals(KList.class)) { + if (c.equals(KList.class)) { return "array"; } - if(c.equals(KMap.class)) { + if (c.equals(KMap.class)) { return "object"; } - if(!c.isAnnotationPresent(Desc.class) && c.getCanonicalName().startsWith("com.volmit.iris.")) { + if (!c.isAnnotationPresent(Desc.class) && c.getCanonicalName().startsWith("com.volmit.iris.")) { warnings.addIfMissing("Unsupported Type: " + c.getCanonicalName() + " Did you forget @Desc?"); } @@ -644,12 +645,12 @@ private String getType(Class c) { private String getFieldDescription(Field r) { - if(r.isAnnotationPresent(Desc.class)) { + if (r.isAnnotationPresent(Desc.class)) { return r.getDeclaredAnnotation(Desc.class).value(); } // suppress warnings on bukkit classes - if(r.getDeclaringClass().getName().startsWith("org.bukkit.")) { + if (r.getDeclaringClass().getName().startsWith("org.bukkit.")) { return "Bukkit package classes and enums have no descriptions"; } @@ -658,11 +659,11 @@ private String getFieldDescription(Field r) { } private String getDescription(Class r) { - if(r.isAnnotationPresent(Desc.class)) { + if (r.isAnnotationPresent(Desc.class)) { return r.getDeclaredAnnotation(Desc.class).value(); } - if(!r.isPrimitive() && !r.equals(KList.class) && !r.equals(KMap.class) && r.getCanonicalName().startsWith("com.volmit.")) { + if (!r.isPrimitive() && !r.equals(KList.class) && !r.equals(KMap.class) && r.getCanonicalName().startsWith("com.volmit.")) { warnings.addIfMissing("Missing @Desc on " + r.getSimpleName() + " in " + (r.getDeclaringClass() != null ? r.getDeclaringClass().getCanonicalName() : " NOSRC")); } return ""; diff --git a/src/main/java/com/volmit/iris/core/service/BoardSVC.java b/src/main/java/com/volmit/iris/core/service/BoardSVC.java index 66850f3e2..4fa115cdd 100644 --- a/src/main/java/com/volmit/iris/core/service/BoardSVC.java +++ b/src/main/java/com/volmit/iris/core/service/BoardSVC.java @@ -48,9 +48,9 @@ public class BoardSVC implements IrisService, BoardProvider { public void onEnable() { J.ar(this::tick, 20); manager = new BoardManager(Iris.instance, BoardSettings.builder() - .boardProvider(this) - .scoreDirection(ScoreDirection.DOWN) - .build()); + .boardProvider(this) + .scoreDirection(ScoreDirection.DOWN) + .build()); } @Override @@ -70,7 +70,7 @@ public void on(PlayerJoinEvent e) { } public void updatePlayer(Player p) { - if(IrisToolbelt.isIrisStudioWorld(p.getWorld())) { + if (IrisToolbelt.isIrisStudioWorld(p.getWorld())) { manager.remove(p); manager.setup(p); } else { @@ -85,7 +85,7 @@ public String getTitle(Player player) { } public void tick() { - if(!Iris.service(StudioSVC.class).isProjectOpen()) { + if (!Iris.service(StudioSVC.class).isProjectOpen()) { return; } @@ -95,7 +95,7 @@ public void tick() { @Override public List getLines(Player player) { PlayerBoard pb = boards.computeIfAbsent(player, PlayerBoard::new); - synchronized(pb.lines) { + synchronized (pb.lines) { return pb.lines; } } @@ -112,10 +112,10 @@ public PlayerBoard(Player player) { } public void update() { - synchronized(lines) { + synchronized (lines) { lines.clear(); - if(!IrisToolbelt.isIrisStudioWorld(player.getWorld())) { + if (!IrisToolbelt.isIrisStudioWorld(player.getWorld())) { return; } diff --git a/src/main/java/com/volmit/iris/core/service/CommandSVC.java b/src/main/java/com/volmit/iris/core/service/CommandSVC.java index 2ee2c3807..d2e56d587 100644 --- a/src/main/java/com/volmit/iris/core/service/CommandSVC.java +++ b/src/main/java/com/volmit/iris/core/service/CommandSVC.java @@ -38,8 +38,8 @@ public class CommandSVC implements IrisService, DecreeSystem { private final KMap> futures = new KMap<>(); - private CompletableFuture consoleFuture = null; private final transient AtomicCache commandCache = new AtomicCache<>(); + private CompletableFuture consoleFuture = null; @Override public void onEnable() { @@ -56,18 +56,18 @@ public void onDisable() { public void on(PlayerCommandPreprocessEvent e) { String msg = e.getMessage().startsWith("/") ? e.getMessage().substring(1) : e.getMessage(); - if(msg.startsWith("irisdecree ")) { + if (msg.startsWith("irisdecree ")) { String[] args = msg.split("\\Q \\E"); CompletableFuture future = futures.get(args[1]); - if(future != null) { + if (future != null) { future.complete(args[2]); e.setCancelled(true); return; } } - if((msg.startsWith("locate ") || msg.startsWith("locatebiome ")) && IrisToolbelt.isIrisWorld(e.getPlayer().getWorld())) { + if ((msg.startsWith("locate ") || msg.startsWith("locatebiome ")) && IrisToolbelt.isIrisWorld(e.getPlayer().getWorld())) { new VolmitSender(e.getPlayer()).sendMessage(C.RED + "Locating biomes & objects is disabled in Iris Worlds. Use /iris studio goto "); e.setCancelled(true); } @@ -75,8 +75,8 @@ public void on(PlayerCommandPreprocessEvent e) { @EventHandler public void on(ServerCommandEvent e) { - if(consoleFuture != null && !consoleFuture.isCancelled() && !consoleFuture.isDone()) { - if(!e.getCommand().contains(" ")) { + if (consoleFuture != null && !consoleFuture.isCancelled() && !consoleFuture.isDone()) { + if (!e.getCommand().contains(" ")) { String pick = e.getCommand().trim().toLowerCase(Locale.ROOT); consoleFuture.complete(pick); e.setCancelled(true); diff --git a/src/main/java/com/volmit/iris/core/service/ConversionSVC.java b/src/main/java/com/volmit/iris/core/service/ConversionSVC.java index 29db2e48c..7786e5aed 100644 --- a/src/main/java/com/volmit/iris/core/service/ConversionSVC.java +++ b/src/main/java/com/volmit/iris/core/service/ConversionSVC.java @@ -55,10 +55,10 @@ public void onEnable() { converters = new KList<>(); J.s(() -> - J.attemptAsync(() -> - { + J.attemptAsync(() -> + { - }), 5); + }), 5); } @Override @@ -79,13 +79,13 @@ public void convertStructures(File in, File out, VolmitSender s) { destPools.mkdirs(); findAllNBT(in, (folder, file) -> { total.getAndIncrement(); - if(roots.addIfMissing(folder)) { + if (roots.addIfMissing(folder)) { String b = in.toURI().relativize(folder.toURI()).getPath(); - if(b.startsWith("/")) { + if (b.startsWith("/")) { b = b.substring(1); } - if(b.endsWith("/")) { + if (b.endsWith("/")) { b = b.substring(0, b.length() - 1); } @@ -95,11 +95,11 @@ public void convertStructures(File in, File out, VolmitSender s) { findAllNBT(in, (folder, file) -> { at.getAndIncrement(); String b = in.toURI().relativize(folder.toURI()).getPath(); - if(b.startsWith("/")) { + if (b.startsWith("/")) { b = b.substring(1); } - if(b.endsWith("/")) { + if (b.endsWith("/")) { b = b.substring(0, b.length() - 1); } IrisJigsawPool jpool = pools.get(b); @@ -112,7 +112,7 @@ public void convertStructures(File in, File out, VolmitSender s) { NamedTag tag = NBTUtil.read(file); CompoundTag compound = (CompoundTag) tag.getTag(); - if(compound.containsKey("blocks") && compound.containsKey("palette") && compound.containsKey("size")) { + if (compound.containsKey("blocks") && compound.containsKey("palette") && compound.containsKey("size")) { String id = in.toURI().relativize(folder.toURI()).getPath() + file.getName().split("\\Q.\\E")[0]; @SuppressWarnings("unchecked") ListTag size = (ListTag) compound.getListTag("size"); int w = size.get(0).asInt(); @@ -120,14 +120,14 @@ public void convertStructures(File in, File out, VolmitSender s) { int d = size.get(2).asInt(); KList palette = new KList<>(); @SuppressWarnings("unchecked") ListTag paletteList = (ListTag) compound.getListTag("palette"); - for(int i = 0; i < paletteList.size(); i++) { + for (int i = 0; i < paletteList.size(); i++) { CompoundTag cp = paletteList.get(i); palette.add(NBTWorld.getBlockData(cp)); } IrisJigsawPiece piece = new IrisJigsawPiece(); IrisObject object = new IrisObject(w, h, d); @SuppressWarnings("unchecked") ListTag blockList = (ListTag) compound.getListTag("blocks"); - for(int i = 0; i < blockList.size(); i++) { + for (int i = 0; i < blockList.size(); i++) { CompoundTag cp = blockList.get(i); @SuppressWarnings("unchecked") ListTag pos = (ListTag) cp.getListTag("pos"); int x = pos.get(0).asInt(); @@ -135,7 +135,7 @@ public void convertStructures(File in, File out, VolmitSender s) { int z = pos.get(2).asInt(); BlockData bd = palette.get(cp.getInt("state")).clone(); - if(bd.getMaterial().equals(Material.JIGSAW) && cp.containsKey("nbt")) { + if (bd.getMaterial().equals(Material.JIGSAW) && cp.containsKey("nbt")) { piece.setObject(in.toURI().relativize(folder.toURI()).getPath() + file.getName().split("\\Q.\\E")[0]); IrisPosition spos = new IrisPosition(object.getSigned(x, y, z)); CompoundTag nbt = cp.getCompoundTag("nbt"); @@ -157,14 +157,14 @@ public void convertStructures(File in, File out, VolmitSender s) { connector.getPools().add(poolId); connector.setDirection(IrisDirection.getDirection(((Jigsaw) jd).getOrientation())); - if(target.equals("minecraft:building_entrance")) { + if (target.equals("minecraft:building_entrance")) { connector.setInnerConnector(true); } piece.getConnectors().add(connector); } - if(!bd.getMaterial().equals(Material.STRUCTURE_VOID) && !bd.getMaterial().equals(Material.AIR)) { + if (!bd.getMaterial().equals(Material.STRUCTURE_VOID) && !bd.getMaterial().equals(Material.AIR)) { object.setUnsigned(x, y, z, bd); } } @@ -174,16 +174,16 @@ public void convertStructures(File in, File out, VolmitSender s) { IO.writeAll(new File(destPieces, file.getName().split("\\Q.\\E")[0] + ".json"), new JSONObject(new Gson().toJson(piece)).toString(4)); Iris.info("[Jigsaw]: (" + Form.pc((double) at.get() / (double) total.get(), 0) + ") Exported Piece: " + id); } - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } }); - for(String i : pools.k()) { + for (String i : pools.k()) { try { IO.writeAll(new File(destPools, i + ".json"), new JSONObject(new Gson().toJson(pools.get(i))).toString(4)); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); Iris.reportError(e); } @@ -193,19 +193,19 @@ public void convertStructures(File in, File out, VolmitSender s) { } public void findAllNBT(File path, Consumer2 inFile) { - if(path == null) { + if (path == null) { return; } - if(path.isFile() && path.getName().endsWith(".nbt")) { + if (path.isFile() && path.getName().endsWith(".nbt")) { inFile.accept(path.getParentFile(), path); return; } - for(File i : path.listFiles()) { - if(i.isDirectory()) { + for (File i : path.listFiles()) { + if (i.isDirectory()) { findAllNBT(i, inFile); - } else if(i.isFile() && i.getName().endsWith(".nbt")) { + } else if (i.isFile() && i.getName().endsWith(".nbt")) { inFile.accept(path, i); } } @@ -215,9 +215,9 @@ public void check(VolmitSender s) { int m = 0; Iris.instance.getDataFolder("convert"); - for(File i : folder.listFiles()) { - for(Converter j : converters) { - if(i.getName().endsWith("." + j.getInExtension())) { + for (File i : folder.listFiles()) { + for (Converter j : converters) { + if (i.getName().endsWith("." + j.getInExtension())) { File out = new File(folder, i.getName().replaceAll("\\Q." + j.getInExtension() + "\\E", "." + j.getOutExtension())); m++; j.convert(i, out); @@ -225,10 +225,10 @@ public void check(VolmitSender s) { } } - if(i.isDirectory() && i.getName().equals("structures")) { + if (i.isDirectory() && i.getName().equals("structures")) { File f = new File(folder, "jigsaw"); - if(!f.exists()) { + if (!f.exists()) { s.sendMessage("Converting NBT Structures into Iris Jigsaw Structures..."); f.mkdirs(); J.a(() -> convertStructures(i, f, s)); diff --git a/src/main/java/com/volmit/iris/core/service/DolphinSVC.java b/src/main/java/com/volmit/iris/core/service/DolphinSVC.java index ba5b625ca..e1a853c73 100644 --- a/src/main/java/com/volmit/iris/core/service/DolphinSVC.java +++ b/src/main/java/com/volmit/iris/core/service/DolphinSVC.java @@ -18,9 +18,7 @@ package com.volmit.iris.core.service; -import com.volmit.iris.Iris; import com.volmit.iris.core.tools.IrisToolbelt; -import com.volmit.iris.engine.IrisEngine; import com.volmit.iris.engine.framework.Engine; import com.volmit.iris.util.documentation.ChunkCoordinates; import com.volmit.iris.util.function.Consumer4; @@ -39,7 +37,6 @@ import org.bukkit.generator.structure.StructureType; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; public class DolphinSVC implements IrisService { @@ -55,17 +52,17 @@ public void onDisable() { @EventHandler public void on(PlayerInteractEntityEvent event) { - if(!IrisToolbelt.isIrisWorld(event.getPlayer().getWorld())) { + if (!IrisToolbelt.isIrisWorld(event.getPlayer().getWorld())) { return; } Material hand = event.getPlayer().getInventory().getItem(event.getHand()).getType(); - if(event.getRightClicked().getType().equals(EntityType.DOLPHIN) && (hand.equals(Material.TROPICAL_FISH) || hand.equals(Material.PUFFERFISH) || hand.equals(Material.COD) || hand.equals(Material.SALMON))) { + if (event.getRightClicked().getType().equals(EntityType.DOLPHIN) && (hand.equals(Material.TROPICAL_FISH) || hand.equals(Material.PUFFERFISH) || hand.equals(Material.COD) || hand.equals(Material.SALMON))) { Engine e = IrisToolbelt.access(event.getPlayer().getWorld()).getEngine(); searchNearestTreasure(e, event.getPlayer().getLocation().getBlockX() >> 4, event.getPlayer().getLocation().getBlockZ() >> 4, e.getMantle().getRadius() - 1, StructureType.BURIED_TREASURE, (x, y, z, p) -> { event.setCancelled(true); - Dolphin d = (Dolphin)event.getRightClicked(); - CraftDolphin cd = (CraftDolphin)d; + Dolphin d = (Dolphin) event.getRightClicked(); + CraftDolphin cd = (CraftDolphin) d; d.getWorld().playSound(d, Sound.ENTITY_DOLPHIN_EAT, SoundCategory.NEUTRAL, 1, 1); cd.getHandle().setTreasurePos(new BlockPos(x, y, z)); cd.getHandle().setGotFish(true); @@ -78,11 +75,12 @@ public void on(PlayerInteractEntityEvent event) { public void findTreasure(Engine engine, int chunkX, int chunkY, StructureType type, Consumer4 consumer) { AtomicReference ref = new AtomicReference<>(); engine.getMantle().getMantle().iterateChunk(chunkX, chunkY, MatterStructurePOI.class, ref.get() == null ? (x, y, z, d) -> { - if(d.getType().equals(type.getKey().getKey())) { + if (d.getType().equals(type.getKey().getKey())) { ref.set(d); consumer.accept(x, y, z, d); } - } : (x, y, z, d) -> { }); + } : (x, y, z, d) -> { + }); } @ChunkCoordinates @@ -91,6 +89,7 @@ public void searchNearestTreasure(Engine engine, int chunkX, int chunkY, int rad new Spiraler(radius * 2, radius * 2, (x, z) -> findTreasure(engine, x, z, type, ref.get() == null ? (i, d, g, a) -> { ref.set(a); consumer.accept(i, d, g, a); - } : (i, d, g, a) -> { })).setOffset(chunkX, chunkY).drain(); + } : (i, d, g, a) -> { + })).setOffset(chunkX, chunkY).drain(); } } diff --git a/src/main/java/com/volmit/iris/core/service/EditSVC.java b/src/main/java/com/volmit/iris/core/service/EditSVC.java index 886805328..834b1712a 100644 --- a/src/main/java/com/volmit/iris/core/service/EditSVC.java +++ b/src/main/java/com/volmit/iris/core/service/EditSVC.java @@ -71,27 +71,27 @@ public Biome getBiome(World world, int x, int z) { @EventHandler public void on(WorldUnloadEvent e) { - if(editors.containsKey(e.getWorld())) { + if (editors.containsKey(e.getWorld())) { editors.remove(e.getWorld()).close(); } } public void update() { - for(World i : editors.k()) { - if(M.ms() - editors.get(i).last() > 1000) { + for (World i : editors.k()) { + if (M.ms() - editors.get(i).last() > 1000) { editors.remove(i).close(); } } } public void flushNow() { - for(World i : editors.k()) { + for (World i : editors.k()) { editors.remove(i).close(); } } public BlockEditor open(World world) { - if(editors.containsKey(world)) { + if (editors.containsKey(world)) { return editors.get(world); } diff --git a/src/main/java/com/volmit/iris/core/service/ExternalDataSVC.java b/src/main/java/com/volmit/iris/core/service/ExternalDataSVC.java index 6c96c3871..4aca9a435 100644 --- a/src/main/java/com/volmit/iris/core/service/ExternalDataSVC.java +++ b/src/main/java/com/volmit/iris/core/service/ExternalDataSVC.java @@ -43,11 +43,12 @@ public void onEnable() { } @Override - public void onDisable() { } + public void onDisable() { + } public void addProvider(ExternalDataProvider... provider) { - for(ExternalDataProvider p : provider) { - if(p.getPlugin() != null) { + for (ExternalDataProvider p : provider) { + if (p.getPlugin() != null) { providers.add(p); p.init(); } @@ -56,11 +57,11 @@ public void addProvider(ExternalDataProvider... provider) { public Optional getBlockData(NamespacedKey key) { Optional provider = providers.stream().filter(p -> p.isPresent() && p.isValidProvider(key)).findFirst(); - if(provider.isEmpty()) + if (provider.isEmpty()) return Optional.empty(); try { return Optional.of(provider.get().getBlockData(key)); - } catch(MissingResourceException e) { + } catch (MissingResourceException e) { Iris.error(e.getMessage() + " - [" + e.getClassName() + ":" + e.getKey() + "]"); return Optional.empty(); } @@ -68,11 +69,11 @@ public Optional getBlockData(NamespacedKey key) { public Optional getItemStack(NamespacedKey key) { Optional provider = providers.stream().filter(p -> p.isPresent() && p.isValidProvider(key)).findFirst(); - if(provider.isEmpty()) + if (provider.isEmpty()) return Optional.empty(); try { return Optional.of(provider.get().getItemStack(key)); - } catch(MissingResourceException e) { + } catch (MissingResourceException e) { Iris.error(e.getMessage() + " - [" + e.getClassName() + ":" + e.getKey() + "]"); return Optional.empty(); } diff --git a/src/main/java/com/volmit/iris/core/service/LogFilterSVC.java b/src/main/java/com/volmit/iris/core/service/LogFilterSVC.java index 7f86621c3..c501d1e35 100644 --- a/src/main/java/com/volmit/iris/core/service/LogFilterSVC.java +++ b/src/main/java/com/volmit/iris/core/service/LogFilterSVC.java @@ -20,41 +20,103 @@ public class LogFilterSVC implements IrisService, Filter { public void onEnable() { FILTERS.add(HEIGHTMAP_MISMATCH, RAID_PERSISTENCE, DUPLICATE_ENTITY_UUID); - ((Logger)LogManager.getRootLogger()).addFilter(this); + ((Logger) LogManager.getRootLogger()).addFilter(this); } - public void initialize() { } - public void start() { } - public void stop() { } - public void onDisable() { } - public boolean isStarted() { return true; } - public boolean isStopped() { return false; } + public void initialize() { + } + + public void start() { + } + + public void stop() { + } + + public void onDisable() { + } + + public boolean isStarted() { + return true; + } + + public boolean isStopped() { + return false; + } public State getState() { - try { return State.STARTED; } - catch (Exception var2) { return null; } - } - - public Filter.Result getOnMatch() { return Result.NEUTRAL; } - public Filter.Result getOnMismatch() { return Result.NEUTRAL; } - - public Result filter(LogEvent event) { return check(event.getMessage().getFormattedMessage()); } - public Result filter(Logger logger, Level level, Marker marker, Object msg, Throwable t) { return check(msg.toString()); } - public Result filter(Logger logger, Level level, Marker marker, Message msg, Throwable t) { return check(msg.getFormattedMessage()); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object... params) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { return check(message); } - public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { return check(message); } + try { + return State.STARTED; + } catch (Exception var2) { + return null; + } + } + + public Filter.Result getOnMatch() { + return Result.NEUTRAL; + } + + public Filter.Result getOnMismatch() { + return Result.NEUTRAL; + } + + public Result filter(LogEvent event) { + return check(event.getMessage().getFormattedMessage()); + } + + public Result filter(Logger logger, Level level, Marker marker, Object msg, Throwable t) { + return check(msg.toString()); + } + + public Result filter(Logger logger, Level level, Marker marker, Message msg, Throwable t) { + return check(msg.getFormattedMessage()); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object... params) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + return check(message); + } + + public Result filter(Logger logger, Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + return check(message); + } private Result check(String string) { - if(FILTERS.stream().anyMatch(string::contains)) + if (FILTERS.stream().anyMatch(string::contains)) return Result.DENY; return Result.NEUTRAL; } diff --git a/src/main/java/com/volmit/iris/core/service/ObjectSVC.java b/src/main/java/com/volmit/iris/core/service/ObjectSVC.java index 9a504804a..cda1d5a42 100644 --- a/src/main/java/com/volmit/iris/core/service/ObjectSVC.java +++ b/src/main/java/com/volmit/iris/core/service/ObjectSVC.java @@ -54,9 +54,9 @@ public void revertChanges(int amount) { } private void loopChange(int amount) { - if(undos.size() > 0) { + if (undos.size() > 0) { revert(undos.pollLast()); - if(amount > 1) { + if (amount > 1) { J.s(() -> loopChange(amount - 1), 2); } } @@ -65,13 +65,12 @@ private void loopChange(int amount) { /** * Reverts all the block changes provided, 200 blocks per tick * - * @param blocks - * The blocks to remove + * @param blocks The blocks to remove */ private void revert(Map blocks) { int amount = 0; Iterator> it = blocks.entrySet().iterator(); - while(it.hasNext()) { + while (it.hasNext()) { Map.Entry entry = it.next(); BlockData data = entry.getValue(); entry.getKey().setBlockData(data, false); @@ -79,7 +78,7 @@ private void revert(Map blocks) { amount++; - if(amount > 200) { + if (amount > 200) { J.s(() -> revert(blocks), 1); } } diff --git a/src/main/java/com/volmit/iris/core/service/PreservationSVC.java b/src/main/java/com/volmit/iris/core/service/PreservationSVC.java index 2fac95881..b43e3ee95 100644 --- a/src/main/java/com/volmit/iris/core/service/PreservationSVC.java +++ b/src/main/java/com/volmit/iris/core/service/PreservationSVC.java @@ -36,8 +36,8 @@ public class PreservationSVC implements IrisService { private final List threads = new CopyOnWriteArrayList<>(); private final List services = new CopyOnWriteArrayList<>(); - private Looper dereferencer; private final List caches = new CopyOnWriteArrayList<>(); + private Looper dereferencer; public void register(Thread t) { threads.add(t); @@ -57,8 +57,8 @@ public void printCaches() { double p = 0; double mf = 0; - for(MeteredCache i : caches) { - if(i.isClosed()) { + for (MeteredCache i : caches) { + if (i.isClosed()) { continue; } @@ -100,22 +100,22 @@ public void onDisable() { dereference(); postShutdown(() -> { - for(Thread i : threads) { - if(i.isAlive()) { + for (Thread i : threads) { + if (i.isAlive()) { try { i.interrupt(); Iris.info("Shutdown Thread " + i.getName()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } } } - for(ExecutorService i : services) { + for (ExecutorService i : services) { try { i.shutdownNow(); Iris.info("Shutdown Executor Service " + i); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } } diff --git a/src/main/java/com/volmit/iris/core/service/StudioSVC.java b/src/main/java/com/volmit/iris/core/service/StudioSVC.java index 39165fb09..720da652f 100644 --- a/src/main/java/com/volmit/iris/core/service/StudioSVC.java +++ b/src/main/java/com/volmit/iris/core/service/StudioSVC.java @@ -61,7 +61,7 @@ public void onEnable() { String pack = IrisSettings.get().getGenerator().getDefaultWorldType(); File f = IrisPack.packsPack(pack); - if(!f.exists()) { + if (!f.exists()) { Iris.info("Downloading Default Pack " + pack); downloadSearch(Iris.getSender(), pack, false); } @@ -72,9 +72,9 @@ public void onEnable() { public void onDisable() { Iris.debug("Studio Mode Active: Closing Projects"); - for(World i : Bukkit.getWorlds()) { - if(IrisToolbelt.isIrisWorld(i)) { - if(IrisToolbelt.isStudio(i)) { + for (World i : Bukkit.getWorlds()) { + if (IrisToolbelt.isIrisWorld(i)) { + if (IrisToolbelt.isStudio(i)) { IrisToolbelt.evacuate(i); IrisToolbelt.access(i).close(); } @@ -88,9 +88,9 @@ public IrisDimension installIntoWorld(VolmitSender sender, String type, File fol File irispack = new File(folder, "iris/pack"); IrisDimension dim = IrisData.loadAnyDimension(type); - if(dim == null) { - for(File i : getWorkspaceFolder().listFiles()) { - if(i.isFile() && i.getName().equals(type + ".iris")) { + if (dim == null) { + for (File i : getWorkspaceFolder().listFiles()) { + if (i.isFile() && i.getName().equals(type + ".iris")) { sender.sendMessage("Found " + type + ".iris in " + WORKSPACE_NAME + " folder"); ZipUtil.unpack(i, irispack); break; @@ -102,29 +102,29 @@ public IrisDimension installIntoWorld(VolmitSender sender, String type, File fol try { FileUtils.copyDirectory(f, irispack); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } } File dimf = new File(irispack, "dimensions/" + type + ".json"); - if(!dimf.exists() || !dimf.isFile()) { + if (!dimf.exists() || !dimf.isFile()) { downloadSearch(sender, type, false); File downloaded = getWorkspaceFolder(type); - for(File i : downloaded.listFiles()) { - if(i.isFile()) { + for (File i : downloaded.listFiles()) { + if (i.isFile()) { try { FileUtils.copyFile(i, new File(irispack, i.getName())); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); Iris.reportError(e); } } else { try { FileUtils.copyDirectory(i, new File(irispack, i.getName())); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); Iris.reportError(e); } @@ -134,7 +134,7 @@ public IrisDimension installIntoWorld(VolmitSender sender, String type, File fol IO.delete(downloaded); } - if(!dimf.exists() || !dimf.isFile()) { + if (!dimf.exists() || !dimf.isFile()) { sender.sendMessage("Can't find the " + dimf.getName() + " in the dimensions folder of this pack! Failed!"); return null; } @@ -142,7 +142,7 @@ public IrisDimension installIntoWorld(VolmitSender sender, String type, File fol IrisData dm = IrisData.get(irispack); dim = dm.getDimensionLoader().load(type); - if(dim == null) { + if (dim == null) { sender.sendMessage("Can't load the dimension! Failed!"); return null; } @@ -161,7 +161,7 @@ public void downloadSearch(VolmitSender sender, String key, boolean trim, boolea try { url = getListing(false).get(key); - if(url == null) { + if (url == null) { Iris.warn("ITS ULL for " + key); } @@ -172,7 +172,7 @@ public void downloadSearch(VolmitSender sender, String key, boolean trim, boolea String repo = nodes.length == 1 ? "IrisDimensions/" + nodes[0] : nodes[0] + "/" + nodes[1]; branch = nodes.length > 2 ? nodes[2] : branch; download(sender, repo, branch, trim, forceOverwrite, false); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); sender.sendMessage("Failed to download '" + key + "' from " + url + "."); @@ -182,7 +182,7 @@ public void downloadSearch(VolmitSender sender, String key, boolean trim, boolea public void downloadRelease(VolmitSender sender, String url, boolean trim, boolean forceOverwrite) { try { download(sender, "IrisDimensions", url, trim, forceOverwrite, true); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); sender.sendMessage("Failed to download 'IrisDimensions/overworld' from " + url + "."); @@ -201,7 +201,7 @@ public void download(VolmitSender sender, String repo, String branch, boolean tr File work = new File(temp, "dl-" + UUID.randomUUID()); File packs = getWorkspaceFolder(); - if(zip == null || !zip.exists()) { + if (zip == null || !zip.exists()) { sender.sendMessage("Failed to find pack at " + url); sender.sendMessage("Make sure you specified the correct repo and branch!"); sender.sendMessage("For example: /iris download IrisDimensions/overworld branch=master"); @@ -210,58 +210,58 @@ public void download(VolmitSender sender, String repo, String branch, boolean tr sender.sendMessage("Unpacking " + repo); try { ZipUtil.unpack(zip, work); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); sender.sendMessage( - """ - Issue when unpacking. Please check/do the following: - 1. Do you have a functioning internet connection? - 2. Did the download corrupt? - 3. Try deleting the */plugins/iris/packs folder and re-download. - 4. Download the pack from the GitHub repo: https://github.com/IrisDimensions/overworld - 5. Contact support (if all other options do not help)""" + """ + Issue when unpacking. Please check/do the following: + 1. Do you have a functioning internet connection? + 2. Did the download corrupt? + 3. Try deleting the */plugins/iris/packs folder and re-download. + 4. Download the pack from the GitHub repo: https://github.com/IrisDimensions/overworld + 5. Contact support (if all other options do not help)""" ); } File dir = null; File[] zipFiles = work.listFiles(); - if(zipFiles == null) { + if (zipFiles == null) { sender.sendMessage("No files were extracted from the zip file."); return; } try { dir = zipFiles.length == 1 && zipFiles[0].isDirectory() ? zipFiles[0] : null; - } catch(NullPointerException e) { + } catch (NullPointerException e) { Iris.reportError(e); sender.sendMessage("Error when finding home directory. Are there any non-text characters in the file name?"); return; } - if(dir == null) { + if (dir == null) { sender.sendMessage("Invalid Format. Missing root folder or too many folders!"); return; } File dimensions = new File(dir, "dimensions"); - if(!(dimensions.exists() && dimensions.isDirectory())) { + if (!(dimensions.exists() && dimensions.isDirectory())) { sender.sendMessage("Invalid Format. Missing dimensions folder"); return; } - if(dimensions.listFiles() == null) { + if (dimensions.listFiles() == null) { sender.sendMessage("No dimension file found in the extracted zip file."); sender.sendMessage("Check it is there on GitHub and report this to staff!"); - } else if(dimensions.listFiles().length != 1) { + } else if (dimensions.listFiles().length != 1) { sender.sendMessage("Dimensions folder must have 1 file in it"); return; } File dim = dimensions.listFiles()[0]; - if(!dim.isFile()) { + if (!dim.isFile()) { sender.sendMessage("Invalid dimension (folder) in dimensions folder"); return; } @@ -271,23 +271,23 @@ public void download(VolmitSender sender, String repo, String branch, boolean tr sender.sendMessage("Importing " + d.getName() + " (" + key + ")"); File packEntry = new File(packs, key); - if(forceOverwrite) { + if (forceOverwrite) { IO.delete(packEntry); } - if(IrisData.loadAnyDimension(key) != null) { + if (IrisData.loadAnyDimension(key) != null) { sender.sendMessage("Another dimension in the packs folder is already using the key " + key + " IMPORT FAILED!"); return; } - if(packEntry.exists() && packEntry.listFiles().length > 0) { + if (packEntry.exists() && packEntry.listFiles().length > 0) { sender.sendMessage("Another pack is using the key " + key + ". IMPORT FAILED!"); return; } FileUtils.copyDirectory(dir, packEntry); - if(trim) { + if (trim) { sender.sendMessage("Trimming " + key); File cp = compilePackage(sender, key, false, false); IO.delete(packEntry); @@ -302,7 +302,7 @@ public void download(VolmitSender sender, String repo, String branch, boolean tr public KMap getListing(boolean cached) { JSONObject a; - if(cached) { + if (cached) { a = new JSONObject(Iris.getCached("cachedlisting", LISTING)); } else { a = new JSONObject(Iris.getNonCached(true + "listing", LISTING)); @@ -310,8 +310,8 @@ public KMap getListing(boolean cached) { KMap l = new KMap<>(); - for(String i : a.keySet()) { - if(a.get(i) instanceof String) + for (String i : a.keySet()) { + if (a.get(i) instanceof String) l.put(i, a.getString(i)); } @@ -333,7 +333,7 @@ public void open(VolmitSender sender, long seed, String dimm) { try { open(sender, seed, dimm, (w) -> { }); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); sender.sendMessage("Error when creating studio world:"); e.printStackTrace(); @@ -341,7 +341,7 @@ public void open(VolmitSender sender, long seed, String dimm) { } public void open(VolmitSender sender, long seed, String dimm, Consumer onDone) throws IrisException { - if(isProjectOpen()) { + if (isProjectOpen()) { close(); } @@ -363,7 +363,7 @@ public File getWorkspaceFile(String... sub) { } public void close() { - if(isProjectOpen()) { + if (isProjectOpen()) { Iris.debug("Closing Active Project"); activeProject.close(); activeProject = null; @@ -378,14 +378,14 @@ public void createFrom(String existingPack, String newName) { File importPack = getWorkspaceFolder(existingPack); File newPack = getWorkspaceFolder(newName); - if(importPack.listFiles().length == 0) { + if (importPack.listFiles().length == 0) { Iris.warn("Couldn't find the pack to create a new dimension from."); return; } try { FileUtils.copyDirectory(importPack, newPack, pathname -> !pathname.getAbsolutePath().contains(".git"), false); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -396,7 +396,7 @@ public void createFrom(String existingPack, String newName) { try { FileUtils.copyFile(dimFile, newDimFile); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -406,11 +406,11 @@ public void createFrom(String existingPack, String newName) { try { JSONObject json = new JSONObject(IO.readAll(newDimFile)); - if(json.has("name")) { + if (json.has("name")) { json.put("name", Form.capitalizeWords(newName.replaceAll("\\Q-\\E", " "))); IO.writeAll(newDimFile, json.toString(4)); } - } catch(JSONException | IOException e) { + } catch (JSONException | IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -419,7 +419,7 @@ public void createFrom(String existingPack, String newName) { IrisProject p = new IrisProject(getWorkspaceFolder(newName)); JSONObject ws = p.createCodeWorkspaceConfig(); IO.writeAll(getWorkspaceFile(newName, newName + ".code-workspace"), ws.toString(0)); - } catch(JSONException | IOException e) { + } catch (JSONException | IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -429,29 +429,29 @@ public void create(VolmitSender sender, String s, String downloadable) { boolean shouldDelete = false; File importPack = getWorkspaceFolder(downloadable); - if(importPack.listFiles().length == 0) { + if (importPack.listFiles().length == 0) { downloadSearch(sender, downloadable, false); - if(importPack.listFiles().length > 0) { + if (importPack.listFiles().length > 0) { shouldDelete = true; } } - if(importPack.listFiles().length == 0) { + if (importPack.listFiles().length == 0) { sender.sendMessage("Couldn't find the pack to create a new dimension from."); return; } File importDimensionFile = new File(importPack, "dimensions/" + downloadable + ".json"); - if(!importDimensionFile.exists()) { + if (!importDimensionFile.exists()) { sender.sendMessage("Missing Imported Dimension File"); return; } sender.sendMessage("Importing " + downloadable + " into new Project " + s); createFrom(downloadable, s); - if(shouldDelete) { + if (shouldDelete) { importPack.delete(); } open(sender, s); @@ -466,7 +466,7 @@ public IrisProject getActiveProject() { } public void updateWorkspace() { - if(isProjectOpen()) { + if (isProjectOpen()) { activeProject.updateWorkspace(); } } diff --git a/src/main/java/com/volmit/iris/core/service/TreeSVC.java b/src/main/java/com/volmit/iris/core/service/TreeSVC.java index bd93cba0e..edbf05993 100644 --- a/src/main/java/com/volmit/iris/core/service/TreeSVC.java +++ b/src/main/java/com/volmit/iris/core/service/TreeSVC.java @@ -66,23 +66,22 @@ public void onDisable() { *
4. Check biome, region and dimension for overrides for that sapling type -> Found -> use
*
5. Exit if none are found, cancel event if one or more are.
* - * @param event - * Checks the given event for sapling overrides + * @param event Checks the given event for sapling overrides */ @EventHandler(priority = EventPriority.HIGHEST) public void on(StructureGrowEvent event) { - if(block || event.isCancelled()) { + if (block || event.isCancelled()) { return; } Iris.debug(this.getClass().getName() + " received a structure grow event"); - if(!IrisToolbelt.isIrisWorld(event.getWorld())) { + if (!IrisToolbelt.isIrisWorld(event.getWorld())) { Iris.debug(this.getClass().getName() + " passed grow event off to vanilla since not an Iris world"); return; } PlatformChunkGenerator worldAccess = IrisToolbelt.access(event.getWorld()); - if(worldAccess == null) { + if (worldAccess == null) { Iris.debug(this.getClass().getName() + " passed it off to vanilla because could not get IrisAccess for this world"); Iris.reportError(new NullPointerException(event.getWorld().getName() + " could not be accessed despite being an Iris world")); return; @@ -90,7 +89,7 @@ public void on(StructureGrowEvent event) { Engine engine = worldAccess.getEngine(); - if(engine == null) { + if (engine == null) { Iris.debug(this.getClass().getName() + " passed it off to vanilla because could not get Engine for this world"); Iris.reportError(new NullPointerException(event.getWorld().getName() + " could not be accessed despite being an Iris world")); return; @@ -98,13 +97,13 @@ public void on(StructureGrowEvent event) { IrisDimension dimension = engine.getDimension(); - if(dimension == null) { + if (dimension == null) { Iris.debug(this.getClass().getName() + " passed it off to vanilla because could not get Dimension for this world"); Iris.reportError(new NullPointerException(event.getWorld().getName() + " could not be accessed despite being an Iris world")); return; } - if(!dimension.getTreeSettings().isEnabled()) { + if (!dimension.getTreeSettings().isEnabled()) { Iris.debug(this.getClass().getName() + " cancelled because tree overrides are disabled"); return; } @@ -116,7 +115,7 @@ public void on(StructureGrowEvent event) { Iris.debug("Sapling plane is: " + saplingPlane.getSizeX() + " by " + saplingPlane.getSizeZ()); IrisObjectPlacement placement = getObjectPlacement(worldAccess, event.getLocation(), event.getSpecies(), new IrisTreeSize(1, 1)); - if(placement == null) { + if (placement == null) { Iris.debug(this.getClass().getName() + " had options but did not manage to find objectPlacements for them"); return; } @@ -195,13 +194,13 @@ public Engine getEngine() { }; object.place( - saplingPlane.getCenter().getBlockX(), - (saplingPlane.getCenter().getBlockY() + object.getH() / 2), - saplingPlane.getCenter().getBlockZ(), - placer, - placement, - RNG.r, - Objects.requireNonNull(worldAccess).getData() + saplingPlane.getCenter().getBlockX(), + (saplingPlane.getCenter().getBlockY() + object.getH() / 2), + saplingPlane.getCenter().getBlockZ(), + placer, + placement, + RNG.r, + Objects.requireNonNull(worldAccess).getData() ); event.setCancelled(true); @@ -213,11 +212,11 @@ public Engine getEngine() { Bukkit.getServer().getPluginManager().callEvent(iGrow); block = false; - if(!iGrow.isCancelled()) { - for(BlockState block : iGrow.getBlocks()) { + if (!iGrow.isCancelled()) { + for (BlockState block : iGrow.getBlocks()) { Location l = block.getLocation(); - if(dataCache.containsKey(l)) { + if (dataCache.containsKey(l)) { l.getBlock().setBlockData(dataCache.get(l), false); } } @@ -229,14 +228,10 @@ public Engine getEngine() { * Finds a single object placement (which may contain more than one object) for the requirements species, location & * size * - * @param worldAccess - * The world to access (check for biome, region, dimension, etc) - * @param location - * The location of the growth event (For biome/region finding) - * @param type - * The bukkit TreeType to match - * @param size - * The size of the sapling area + * @param worldAccess The world to access (check for biome, region, dimension, etc) + * @param location The location of the growth event (For biome/region finding) + * @param type The bukkit TreeType to match + * @param size The size of the sapling area * @return An object placement which contains the matched tree, or null if none were found / it's disabled. */ private IrisObjectPlacement getObjectPlacement(PlatformChunkGenerator worldAccess, Location location, TreeType type, IrisTreeSize size) { @@ -249,7 +244,7 @@ private IrisObjectPlacement getObjectPlacement(PlatformChunkGenerator worldAcces placements.addAll(matchObjectPlacements(biome.getObjects(), size, type)); // Add more or find any in the region - if(isUseAll || placements.isEmpty()) { + if (isUseAll || placements.isEmpty()) { IrisRegion region = worldAccess.getEngine().getRegion(location.getBlockX(), location.getBlockZ()); placements.addAll(matchObjectPlacements(region.getObjects(), size, type)); } @@ -261,20 +256,17 @@ private IrisObjectPlacement getObjectPlacement(PlatformChunkGenerator worldAcces /** * Filters out mismatches and returns matches * - * @param objects - * The object placements to check - * @param size - * The size of the sapling area to filter with - * @param type - * The type of the tree to filter with + * @param objects The object placements to check + * @param size The size of the sapling area to filter with + * @param type The type of the tree to filter with * @return A list of objectPlacements that matched. May be empty. */ private KList matchObjectPlacements(KList objects, IrisTreeSize size, TreeType type) { KList p = new KList<>(); - for(IrisObjectPlacement i : objects) { - if(i.matches(size, type)) { + for (IrisObjectPlacement i : objects) { + if (i.matches(size, type)) { p.add(i); } } @@ -285,12 +277,9 @@ private KList matchObjectPlacements(KList valid, World world) { @@ -300,7 +289,7 @@ public Cuboid getSaplings(Location at, Predicate valid, World world) BlockPosition b = new BlockPosition(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE); // Maximise the block position in x and z to get max cuboid bounds - for(BlockPosition blockPosition : blockPositions) { + for (BlockPosition blockPosition : blockPositions) { a.max(blockPosition); b.min(blockPosition); } @@ -313,12 +302,12 @@ public Cuboid getSaplings(Location at, Predicate valid, World world) boolean cuboidIsValid = true; // Loop while the cuboid is larger than 2 - while(Math.min(cuboid.getSizeX(), cuboid.getSizeZ()) > 0) { + while (Math.min(cuboid.getSizeX(), cuboid.getSizeZ()) > 0) { checking: - for(int i = cuboid.getLowerX(); i < cuboid.getUpperX(); i++) { - for(int j = cuboid.getLowerY(); j < cuboid.getUpperY(); j++) { - for(int k = cuboid.getLowerZ(); k < cuboid.getUpperZ(); k++) { - if(!blockPositions.contains(new BlockPosition(i, j, k))) { + for (int i = cuboid.getLowerX(); i < cuboid.getUpperX(); i++) { + for (int j = cuboid.getLowerY(); j < cuboid.getUpperY(); j++) { + for (int k = cuboid.getLowerZ(); k < cuboid.getUpperZ(); k++) { + if (!blockPositions.contains(new BlockPosition(i, j, k))) { cuboidIsValid = false; break checking; } @@ -327,7 +316,7 @@ public Cuboid getSaplings(Location at, Predicate valid, World world) } // Return this cuboid if it's valid - if(cuboidIsValid) { + if (cuboidIsValid) { return cuboid; } @@ -342,18 +331,14 @@ public Cuboid getSaplings(Location at, Predicate valid, World world) /** * Grows the blockPosition list by means of checking neighbours in * - * @param world - * the world to check in - * @param center - * the location of this position - * @param valid - * validation on blockData to check block with - * @param l - * list of block positions to add new neighbors too + * @param world the world to check in + * @param center the location of this position + * @param valid validation on blockData to check block with + * @param l list of block positions to add new neighbors too */ private void grow(World world, BlockPosition center, Predicate valid, KList l) { // Make sure size is less than 50, the block to check isn't already in, and make sure the blockData still matches - if(l.size() <= 50 && !l.contains(center) && valid.test(center.toBlock(world).getBlockData())) { + if (l.size() <= 50 && !l.contains(center) && valid.test(center.toBlock(world).getBlockData())) { l.add(center); grow(world, center.add(1, 0, 0), valid, l); grow(world, center.add(-1, 0, 0), valid, l); diff --git a/src/main/java/com/volmit/iris/core/service/WandSVC.java b/src/main/java/com/volmit/iris/core/service/WandSVC.java index 8c847e44e..7f564c8af 100644 --- a/src/main/java/com/volmit/iris/core/service/WandSVC.java +++ b/src/main/java/com/volmit/iris/core/service/WandSVC.java @@ -62,12 +62,11 @@ public static void pasteSchematic(IrisObject s, Location at) { /** * Creates an Iris Object from the 2 coordinates selected with a wand * - * @param p - * The wand player + * @param p The wand player * @return The new object */ public static IrisObject createSchematic(Player p) { - if(!isHoldingWand(p)) { + if (!isHoldingWand(p)) { return null; } @@ -75,8 +74,8 @@ public static IrisObject createSchematic(Player p) { Location[] f = getCuboid(p); Cuboid c = new Cuboid(f[0], f[1]); IrisObject s = new IrisObject(c.getSizeX(), c.getSizeY(), c.getSizeZ()); - for(Block b : c) { - if(b.getType().equals(Material.AIR)) { + for (Block b : c) { + if (b.getType().equals(Material.AIR)) { continue; } @@ -85,7 +84,7 @@ public static IrisObject createSchematic(Player p) { } return s; - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } @@ -99,7 +98,7 @@ public static IrisObject createSchematic(Player p) { * @return The new object */ public static Matter createMatterSchem(Player p) { - if(!isHoldingWand(p)) { + if (!isHoldingWand(p)) { return null; } @@ -107,7 +106,7 @@ public static Matter createMatterSchem(Player p) { Location[] f = getCuboid(p); return WorldMatter.createMatter(p.getName(), f[0], f[1]); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } @@ -118,8 +117,7 @@ public static Matter createMatterSchem(Player p) { /** * Converts a user friendly location string to an actual Location * - * @param s - * The string + * @param s The string * @return The location */ public static Location stringToLocation(String s) { @@ -127,7 +125,7 @@ public static Location stringToLocation(String s) { String[] f = s.split("\\Q in \\E"); String[] g = f[0].split("\\Q,\\E"); return new Location(Bukkit.getWorld(f[1]), Integer.parseInt(g[0]), Integer.parseInt(g[1]), Integer.parseInt(g[2])); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); return null; } @@ -136,12 +134,11 @@ public static Location stringToLocation(String s) { /** * Get a user friendly string of a location * - * @param loc - * The location + * @param loc The location * @return The string */ public static String locationToString(Location loc) { - if(loc == null) { + if (loc == null) { return "<#>"; } @@ -178,8 +175,7 @@ public static ItemStack createDust() { /** * Finds an existing wand in a users inventory * - * @param inventory - * The inventory to search + * @param inventory The inventory to search * @return The slot number the wand is in. Or -1 if none are found */ public static int findWand(Inventory inventory) { @@ -188,14 +184,14 @@ public static int findWand(Inventory inventory) { meta.setLore(new ArrayList<>()); //We are resetting the lore as the lore differs between wands wand.setItemMeta(meta); - for(int s = 0; s < inventory.getSize(); s++) { + for (int s = 0; s < inventory.getSize(); s++) { ItemStack stack = inventory.getItem(s); - if(stack == null) continue; + if (stack == null) continue; meta = stack.getItemMeta(); meta.setLore(new ArrayList<>()); //Reset the lore on this too so we can compare them stack.setItemMeta(meta); //We dont need to clone the item as items from .get are cloned - if(wand.isSimilar(stack)) return s; //If the name, material and NBT is the same + if (wand.isSimilar(stack)) return s; //If the name, material and NBT is the same } return -1; } @@ -203,10 +199,8 @@ public static int findWand(Inventory inventory) { /** * Creates an Iris wand. The locations should be the currently selected locations, or null * - * @param a - * Location A - * @param b - * Location B + * @param a Location A + * @param b Location B * @return A new wand */ public static ItemStack createWand(Location a, Location b) { @@ -224,20 +218,18 @@ public static ItemStack createWand(Location a, Location b) { public static Location[] getCuboidFromItem(ItemStack is) { ItemMeta im = is.getItemMeta(); - return new Location[] {stringToLocation(im.getLore().get(0)), stringToLocation(im.getLore().get(1))}; + return new Location[]{stringToLocation(im.getLore().get(0)), stringToLocation(im.getLore().get(1))}; } public static Location[] getCuboid(Player p) { - if(isHoldingIrisWand(p)) - { + if (isHoldingIrisWand(p)) { return getCuboidFromItem(p.getInventory().getItemInMainHand()); } Cuboid c = WorldEditLink.getSelection(p); - if(c != null) - { - return new Location[] {c.getLowerNE(), c.getUpperSW()}; + if (c != null) { + return new Location[]{c.getLowerNE(), c.getUpperSW()}; } return null; @@ -255,17 +247,16 @@ public static boolean isHoldingIrisWand(Player p) { /** * Is the itemstack passed an Iris wand * - * @param is - * The itemstack + * @param is The itemstack * @return True if it is */ public static boolean isWand(ItemStack is) { ItemStack wand = createWand(); - if(is.getItemMeta() == null) return false; + if (is.getItemMeta() == null) return false; return is.getType().equals(wand.getType()) && - is.getItemMeta().getDisplayName().equals(wand.getItemMeta().getDisplayName()) && - is.getItemMeta().getEnchants().equals(wand.getItemMeta().getEnchants()) && - is.getItemMeta().getItemFlags().equals(wand.getItemMeta().getItemFlags()); + is.getItemMeta().getDisplayName().equals(wand.getItemMeta().getDisplayName()) && + is.getItemMeta().getEnchants().equals(wand.getItemMeta().getEnchants()) && + is.getItemMeta().getItemFlags().equals(wand.getItemMeta().getItemFlags()); } @Override @@ -274,7 +265,7 @@ public void onEnable() { dust = createDust(); J.ar(() -> { - for(Player i : Bukkit.getOnlinePlayers()) { + for (Player i : Bukkit.getOnlinePlayers()) { tick(i); } }, 0); @@ -288,14 +279,14 @@ public void onDisable() { public void tick(Player p) { try { try { - if((IrisSettings.get().getWorld().worldEditWandCUI && isHoldingWand(p)) || isWand(p.getInventory().getItemInMainHand())) { + if ((IrisSettings.get().getWorld().worldEditWandCUI && isHoldingWand(p)) || isWand(p.getInventory().getItemInMainHand())) { Location[] d = getCuboid(p); new WandSelection(new Cuboid(d[0], d[1]), p).draw(); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -303,22 +294,18 @@ public void tick(Player p) { /** * Draw the outline of a selected region * - * @param d - * The cuboid - * @param p - * The player to show it to + * @param d The cuboid + * @param p The player to show it to */ public void draw(Cuboid d, Player p) { - draw(new Location[] {d.getLowerNE(), d.getUpperSW()}, p); + draw(new Location[]{d.getLowerNE(), d.getUpperSW()}, p); } /** * Draw the outline of a selected region * - * @param d - * A pair of locations - * @param p - * The player to show them to + * @param d A pair of locations + * @param p The player to show them to */ public void draw(Location[] d, Player p) { Vector gx = Vector.getRandom().subtract(Vector.getRandom()).normalize().clone().multiply(0.65); @@ -326,11 +313,11 @@ public void draw(Location[] d, Player p) { Vector gxx = Vector.getRandom().subtract(Vector.getRandom()).normalize().clone().multiply(0.65); d[1].getWorld().spawnParticle(Particle.CRIT, d[1], 1, 0.5 + gxx.getX(), 0.5 + gxx.getY(), 0.5 + gxx.getZ(), 0, null, false); - if(!d[0].getWorld().equals(d[1].getWorld())) { + if (!d[0].getWorld().equals(d[1].getWorld())) { return; } - if(d[0].distanceSquared(d[1]) > 64 * 64) { + if (d[0].distanceSquared(d[1]) > 64 * 64) { return; } @@ -341,38 +328,38 @@ public void draw(Location[] d, Player p) { int maxy = Math.max(d[0].getBlockY(), d[1].getBlockY()); int maxz = Math.max(d[0].getBlockZ(), d[1].getBlockZ()); - for(double j = minx - 1; j < maxx + 1; j += 0.25) { - for(double k = miny - 1; k < maxy + 1; k += 0.25) { - for(double l = minz - 1; l < maxz + 1; l += 0.25) { - if(M.r(0.2)) { + for (double j = minx - 1; j < maxx + 1; j += 0.25) { + for (double k = miny - 1; k < maxy + 1; k += 0.25) { + for (double l = minz - 1; l < maxz + 1; l += 0.25) { + if (M.r(0.2)) { boolean jj = j == minx || j == maxx; boolean kk = k == miny || k == maxy; boolean ll = l == minz || l == maxz; - if((jj && kk) || (jj && ll) || (ll && kk)) { + if ((jj && kk) || (jj && ll) || (ll && kk)) { Vector push = new Vector(0, 0, 0); - if(j == minx) { + if (j == minx) { push.add(new Vector(-0.55, 0, 0)); } - if(k == miny) { + if (k == miny) { push.add(new Vector(0, -0.55, 0)); } - if(l == minz) { + if (l == minz) { push.add(new Vector(0, 0, -0.55)); } - if(j == maxx) { + if (j == maxx) { push.add(new Vector(0.55, 0, 0)); } - if(k == maxy) { + if (k == maxy) { push.add(new Vector(0, 0.55, 0)); } - if(l == maxz) { + if (l == maxz) { push.add(new Vector(0, 0, 0.55)); } @@ -391,16 +378,16 @@ public void draw(Location[] d, Player p) { @EventHandler public void on(PlayerInteractEvent e) { - if(e.getHand() != EquipmentSlot.HAND) + if (e.getHand() != EquipmentSlot.HAND) return; try { - if(isHoldingWand(e.getPlayer())) { - if(e.getAction().equals(Action.LEFT_CLICK_BLOCK)) { + if (isHoldingWand(e.getPlayer())) { + if (e.getAction().equals(Action.LEFT_CLICK_BLOCK)) { e.setCancelled(true); e.getPlayer().getInventory().setItemInMainHand(update(true, Objects.requireNonNull(e.getClickedBlock()).getLocation(), e.getPlayer().getInventory().getItemInMainHand())); e.getPlayer().playSound(e.getClickedBlock().getLocation(), Sound.BLOCK_END_PORTAL_FRAME_FILL, 1f, 0.67f); e.getPlayer().updateInventory(); - } else if(e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { + } else if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { e.setCancelled(true); e.getPlayer().getInventory().setItemInMainHand(update(false, Objects.requireNonNull(e.getClickedBlock()).getLocation(), e.getPlayer().getInventory().getItemInMainHand())); e.getPlayer().playSound(e.getClickedBlock().getLocation(), Sound.BLOCK_END_PORTAL_FRAME_FILL, 1f, 1.17f); @@ -408,14 +395,14 @@ public void on(PlayerInteractEvent e) { } } - if(isHoldingDust(e.getPlayer())) { - if(e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { + if (isHoldingDust(e.getPlayer())) { + if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { e.setCancelled(true); e.getPlayer().playSound(Objects.requireNonNull(e.getClickedBlock()).getLocation(), Sound.ENTITY_ENDER_EYE_DEATH, 2f, 1.97f); DustRevealer.spawn(e.getClickedBlock(), new VolmitSender(e.getPlayer(), Iris.instance.getTag())); } } - } catch(Throwable xx) { + } catch (Throwable xx) { Iris.reportError(xx); } } @@ -423,8 +410,7 @@ public void on(PlayerInteractEvent e) { /** * Is the player holding Dust? * - * @param p - * The player + * @param p The player * @return True if they are */ public boolean isHoldingDust(Player p) { @@ -435,8 +421,7 @@ public boolean isHoldingDust(Player p) { /** * Is the itemstack passed Iris dust? * - * @param is - * The itemstack + * @param is The itemstack * @return True if it is */ public boolean isDust(ItemStack is) { @@ -446,23 +431,20 @@ public boolean isDust(ItemStack is) { /** * Update the location on an Iris wand * - * @param left - * True for first location, false for second - * @param a - * The location - * @param item - * The wand + * @param left True for first location, false for second + * @param a The location + * @param item The wand * @return The updated wand */ public ItemStack update(boolean left, Location a, ItemStack item) { - if(!isWand(item)) { + if (!isWand(item)) { return item; } Location[] f = getCuboidFromItem(item); Location other = left ? f[1] : f[0]; - if(other != null && !other.getWorld().getName().equals(a.getWorld().getName())) { + if (other != null && !other.getWorld().getName().equals(a.getWorld().getName())) { other = null; } diff --git a/src/main/java/com/volmit/iris/core/tools/IrisCreator.java b/src/main/java/com/volmit/iris/core/tools/IrisCreator.java index f4aeab0f8..799df0151 100644 --- a/src/main/java/com/volmit/iris/core/tools/IrisCreator.java +++ b/src/main/java/com/volmit/iris/core/tools/IrisCreator.java @@ -51,32 +51,28 @@ @Data @Accessors(fluent = true, chain = true) public class IrisCreator { + private static final File BUKKIT_YML = new File(Bukkit.getServer().getWorldContainer(), "bukkit.yml"); /** * Specify an area to pregenerate during creation */ private PregenTask pregen; - /** * Specify a sender to get updates & progress info + tp when world is created. */ private VolmitSender sender; - /** * The seed to use for this generator */ private long seed = 1337; - /** * The dimension to use. This can be any online dimension, or a dimension in the * packs folder */ private String dimension = IrisSettings.get().getGenerator().getDefaultWorldType(); - /** * The name of this world. */ private String name = "irisworld"; - /** * Studio mode makes the engine hotloadable and uses the dimension in * your Iris/packs folder instead of copying the dimension files into @@ -84,28 +80,41 @@ public class IrisCreator { */ private boolean studio = false; + public static boolean removeFromBukkitYml(String name) throws IOException { + YamlConfiguration yml = YamlConfiguration.loadConfiguration(BUKKIT_YML); + ConfigurationSection section = yml.getConfigurationSection("worlds"); + if (section == null) { + return false; + } + section.set(name, null); + if (section.getValues(false).keySet().stream().noneMatch(k -> section.get(k) != null)) { + yml.set("worlds", null); + } + yml.save(BUKKIT_YML); + return true; + } + /** * Create the IrisAccess (contains the world) * * @return the IrisAccess - * @throws IrisException - * shit happens + * @throws IrisException shit happens */ public World create() throws IrisException { - if(Bukkit.isPrimaryThread()) { + if (Bukkit.isPrimaryThread()) { throw new IrisException("You cannot invoke create() on the main thread."); } IrisDimension d = IrisToolbelt.getDimension(dimension()); - if(d == null) { + if (d == null) { throw new IrisException("Dimension cannot be found null for id " + dimension()); } - if(sender == null) + if (sender == null) sender = Iris.getSender(); - if(!studio()) { + if (!studio()) { Iris.service(StudioSVC.class).installIntoWorld(sender, d.getLoadKey(), new File(name())); } @@ -115,11 +124,11 @@ public World create() throws IrisException { O done = new O<>(); done.set(false); WorldCreator wc = new IrisWorldCreator() - .dimension(dimension) - .name(name) - .seed(seed) - .studio(studio) - .create(); + .dimension(dimension) + .name(name) + .seed(seed) + .studio(studio) + .create(); ServerConfigurator.installDataPacks(false); access = (PlatformChunkGenerator) wc.generator(); @@ -134,10 +143,10 @@ public World create() throws IrisException { } return finalAccess1.getEngine().getGenerated(); }; - while(g.get() < req) { + while (g.get() < req) { double v = (double) g.get() / (double) req; - if(sender.isPlayer()) { + if (sender.isPlayer()) { sender.sendProgress(v, "Generating"); J.sleep(16); } else { @@ -152,27 +161,27 @@ public World create() throws IrisException { J.sfut(() -> { world.set(wc.createWorld()); }).get(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } - if(access == null) { + if (access == null) { throw new IrisException("Access is null. Something bad happened."); } done.set(true); - if(sender.isPlayer()) { + if (sender.isPlayer()) { J.s(() -> { sender.player().teleport(new Location(world.get(), 0, world.get().getHighestBlockYAt(0, 0), 0)); }); } - if(studio) { + if (studio) { J.s(() -> { Iris.linkMultiverseCore.removeFromConfig(world.get()); - if(IrisSettings.get().getStudio().isDisableTimeAndWeather()) { + if (IrisSettings.get().getStudio().isDisableTimeAndWeather()) { world.get().setGameRule(GameRule.DO_WEATHER_CYCLE, false); world.get().setGameRule(GameRule.DO_DAYLIGHT_CYCLE, false); world.get().setTime(6000); @@ -181,19 +190,19 @@ public World create() throws IrisException { } else addToBukkitYml(); - if(pregen != null) { + if (pregen != null) { CompletableFuture ff = new CompletableFuture<>(); IrisToolbelt.pregenerate(pregen, access) - .onProgress(pp::set) - .whenDone(() -> ff.complete(true)); + .onProgress(pp::set) + .whenDone(() -> ff.complete(true)); try { AtomicBoolean dx = new AtomicBoolean(false); J.a(() -> { - while(!dx.get()) { - if(sender.isPlayer()) { + while (!dx.get()) { + if (sender.isPlayer()) { sender.sendProgress(pp.get(), "Pregenerating"); J.sleep(16); } else { @@ -205,42 +214,26 @@ public World create() throws IrisException { ff.get(); dx.set(true); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } return world.get(); } - private static final File BUKKIT_YML = new File(Bukkit.getServer().getWorldContainer(), "bukkit.yml"); - private void addToBukkitYml() { YamlConfiguration yml = YamlConfiguration.loadConfiguration(BUKKIT_YML); String gen = "Iris:" + dimension; ConfigurationSection section = yml.contains("worlds") ? yml.getConfigurationSection("worlds") : yml.createSection("worlds"); - if(!section.contains(name)) { + if (!section.contains(name)) { section.createSection(name).set("generator", gen); try { yml.save(BUKKIT_YML); Iris.info("Registered \"" + name + "\" in bukkit.yml"); - } catch(IOException e) { + } catch (IOException e) { Iris.error("Failed to update bukkit.yml!"); e.printStackTrace(); } } } - - public static boolean removeFromBukkitYml(String name) throws IOException { - YamlConfiguration yml = YamlConfiguration.loadConfiguration(BUKKIT_YML); - ConfigurationSection section = yml.getConfigurationSection("worlds"); - if (section == null) { - return false; - } - section.set(name, null); - if (section.getValues(false).keySet().stream().noneMatch(k -> section.get(k) != null)) { - yml.set("worlds", null); - } - yml.save(BUKKIT_YML); - return true; - } } diff --git a/src/main/java/com/volmit/iris/core/tools/IrisToolbelt.java b/src/main/java/com/volmit/iris/core/tools/IrisToolbelt.java index 6ad776d38..ad552ee81 100644 --- a/src/main/java/com/volmit/iris/core/tools/IrisToolbelt.java +++ b/src/main/java/com/volmit/iris/core/tools/IrisToolbelt.java @@ -54,18 +54,17 @@ public class IrisToolbelt { * - GithubUsername/repository * - GithubUsername/repository/branch * - * @param dimension - * the dimension id such as overworld or flat + * @param dimension the dimension id such as overworld or flat * @return the IrisDimension or null */ public static IrisDimension getDimension(String dimension) { File pack = Iris.instance.getDataFolder("packs", dimension); - if(!pack.exists()) { + if (!pack.exists()) { Iris.service(StudioSVC.class).downloadSearch(new VolmitSender(Bukkit.getConsoleSender(), Iris.instance.getTag()), dimension, false, false); } - if(!pack.exists()) { + if (!pack.exists()) { return null; } @@ -84,16 +83,15 @@ public static IrisCreator createWorld() { /** * Checks if the given world is an Iris World (same as access(world) != null) * - * @param world - * the world + * @param world the world * @return true if it is an Iris Access world */ public static boolean isIrisWorld(World world) { - if(world == null) { + if (world == null) { return false; } - if(world.getGenerator() instanceof PlatformChunkGenerator f) { + if (world.getGenerator() instanceof PlatformChunkGenerator f) { f.touch(world); return true; } @@ -108,12 +106,11 @@ public static boolean isIrisStudioWorld(World world) { /** * Get the Iris generator for the given world * - * @param world - * the given world + * @param world the given world * @return the IrisAccess or null if it's not an Iris World */ public static PlatformChunkGenerator access(World world) { - if(isIrisWorld(world)) { + if (isIrisWorld(world)) { return ((PlatformChunkGenerator) world.getGenerator()); } /*else { Iris.warn(""" @@ -139,10 +136,8 @@ public static PlatformChunkGenerator access(World world) { /** * Start a pregenerator task * - * @param task - * the scheduled task - * @param method - * the method to execute the task + * @param task the scheduled task + * @param method the method to execute the task * @return the pregenerator job (already started) */ public static PregeneratorJob pregenerate(PregenTask task, PregeneratorMethod method, Engine engine) { @@ -153,29 +148,25 @@ public static PregeneratorJob pregenerate(PregenTask task, PregeneratorMethod me * Start a pregenerator task. If the supplied generator is headless, headless mode is used, * otherwise Hybrid mode is used. * - * @param task - * the scheduled task - * @param gen - * the Iris Generator + * @param task the scheduled task + * @param gen the Iris Generator * @return the pregenerator job (already started) */ public static PregeneratorJob pregenerate(PregenTask task, PlatformChunkGenerator gen) { return pregenerate(task, new HybridPregenMethod(gen.getEngine().getWorld().realWorld(), - IrisSettings.getThreadCount(IrisSettings.get().getConcurrency().getParallelism())), gen.getEngine()); + IrisSettings.getThreadCount(IrisSettings.get().getConcurrency().getParallelism())), gen.getEngine()); } /** * Start a pregenerator task. If the supplied generator is headless, headless mode is used, * otherwise Hybrid mode is used. * - * @param task - * the scheduled task - * @param world - * the World + * @param task the scheduled task + * @param world the World * @return the pregenerator job (already started) */ public static PregeneratorJob pregenerate(PregenTask task, World world) { - if(isIrisWorld(world)) { + if (isIrisWorld(world)) { return pregenerate(task, access(world)); } @@ -186,13 +177,12 @@ public static PregeneratorJob pregenerate(PregenTask task, World world) { * Evacuate all players from the world into literally any other world. * If there are no other worlds, kick them! Not the best but what's mine is mine sometimes... * - * @param world - * the world to evac + * @param world the world to evac */ public static boolean evacuate(World world) { - for(World i : Bukkit.getWorlds()) { - if(!i.getName().equals(world.getName())) { - for(Player j : world.getPlayers()) { + for (World i : Bukkit.getWorlds()) { + if (!i.getName().equals(world.getName())) { + for (Player j : world.getPlayers()) { new VolmitSender(j, Iris.instance.getTag()).sendMessage("You have been evacuated from this world."); j.teleport(i.getSpawnLocation()); } @@ -207,16 +197,14 @@ public static boolean evacuate(World world) { /** * Evacuate all players from the world * - * @param world - * the world to leave - * @param m - * the message + * @param world the world to leave + * @param m the message * @return true if it was evacuated. */ public static boolean evacuate(World world, String m) { - for(World i : Bukkit.getWorlds()) { - if(!i.getName().equals(world.getName())) { - for(Player j : world.getPlayers()) { + for (World i : Bukkit.getWorlds()) { + if (!i.getName().equals(world.getName())) { + for (Player j : world.getPlayers()) { new VolmitSender(j, Iris.instance.getTag()).sendMessage("You have been evacuated from this world. " + m); j.teleport(i.getSpawnLocation()); } @@ -237,13 +225,17 @@ public static void retainMantleDataForSlice(String className) { public static T getMantleData(World world, int x, int y, int z, Class of) { PlatformChunkGenerator e = access(world); - if(e == null) {return null;} + if (e == null) { + return null; + } return e.getEngine().getMantle().getMantle().get(x, y - world.getMinHeight(), z, of); } - public static void deleteMantleData(World world, int x, int y, int z, Class of) { + public static void deleteMantleData(World world, int x, int y, int z, Class of) { PlatformChunkGenerator e = access(world); - if(e == null) {return;} + if (e == null) { + return; + } e.getEngine().getMantle().getMantle().remove(x, y - world.getMinHeight(), z, of); } diff --git a/src/main/java/com/volmit/iris/core/tools/IrisWorldCreator.java b/src/main/java/com/volmit/iris/core/tools/IrisWorldCreator.java index 2926335e2..386eb9b2d 100644 --- a/src/main/java/com/volmit/iris/core/tools/IrisWorldCreator.java +++ b/src/main/java/com/volmit/iris/core/tools/IrisWorldCreator.java @@ -67,26 +67,26 @@ public WorldCreator create() { IrisDimension dim = IrisData.loadAnyDimension(dimensionName); IrisWorld w = IrisWorld.builder() - .name(name) - .minHeight(dim.getMinHeight()) - .maxHeight(dim.getMaxHeight()) - .seed(seed) - .worldFolder(new File(name)) - .environment(findEnvironment()) - .build(); + .name(name) + .minHeight(dim.getMinHeight()) + .maxHeight(dim.getMaxHeight()) + .seed(seed) + .worldFolder(new File(name)) + .environment(findEnvironment()) + .build(); ChunkGenerator g = new BukkitChunkGenerator(w, studio, studio - ? dim.getLoader().getDataFolder() : - new File(w.worldFolder(), "iris/pack"), dimensionName); + ? dim.getLoader().getDataFolder() : + new File(w.worldFolder(), "iris/pack"), dimensionName); return new WorldCreator(name) - .environment(findEnvironment()) - .generateStructures(true) - .generator(g).seed(seed); + .environment(findEnvironment()) + .generateStructures(true) + .generator(g).seed(seed); } private World.Environment findEnvironment() { IrisDimension dim = IrisData.loadAnyDimension(dimensionName); - if(dim == null || dim.getEnvironment() == null) { + if (dim == null || dim.getEnvironment() == null) { return World.Environment.NORMAL; } else { return dim.getEnvironment(); diff --git a/src/main/java/com/volmit/iris/core/wand/WandSelection.java b/src/main/java/com/volmit/iris/core/wand/WandSelection.java index 1cd543f37..3e761cab7 100644 --- a/src/main/java/com/volmit/iris/core/wand/WandSelection.java +++ b/src/main/java/com/volmit/iris/core/wand/WandSelection.java @@ -41,37 +41,37 @@ public void draw() { double accuracy = M.lerpInverse(0, 64 * 64, p.getLocation().distanceSquared(c.getCenter())); double dist = M.lerp(0.125, 3.5, accuracy); - for(double i = c.getLowerX() - 1; i < c.getUpperX() + 1; i += 0.25) { - for(double j = c.getLowerY() - 1; j < c.getUpperY() + 1; j += 0.25) { - for(double k = c.getLowerZ() - 1; k < c.getUpperZ() + 1; k += 0.25) { + for (double i = c.getLowerX() - 1; i < c.getUpperX() + 1; i += 0.25) { + for (double j = c.getLowerY() - 1; j < c.getUpperY() + 1; j += 0.25) { + for (double k = c.getLowerZ() - 1; k < c.getUpperZ() + 1; k += 0.25) { boolean ii = i == c.getLowerX() || i == c.getUpperX(); boolean jj = j == c.getLowerY() || j == c.getUpperY(); boolean kk = k == c.getLowerZ() || k == c.getUpperZ(); - if((ii && jj) || (ii && kk) || (kk && jj)) { + if ((ii && jj) || (ii && kk) || (kk && jj)) { Vector push = new Vector(0, 0, 0); - if(i == c.getLowerX()) { + if (i == c.getLowerX()) { push.add(new Vector(-0.55, 0, 0)); } - if(j == c.getLowerY()) { + if (j == c.getLowerY()) { push.add(new Vector(0, -0.55, 0)); } - if(k == c.getLowerZ()) { + if (k == c.getLowerZ()) { push.add(new Vector(0, 0, -0.55)); } - if(i == c.getUpperX()) { + if (i == c.getUpperX()) { push.add(new Vector(0.55, 0, 0)); } - if(j == c.getUpperY()) { + if (j == c.getUpperY()) { push.add(new Vector(0, 0.55, 0)); } - if(k == c.getUpperZ()) { + if (k == c.getUpperZ()) { push.add(new Vector(0, 0, 0.55)); } @@ -79,32 +79,32 @@ public void draw() { accuracy = M.lerpInverse(0, 64 * 64, p.getLocation().distanceSquared(a)); dist = M.lerp(0.125, 3.5, accuracy); - if(M.r(M.min(dist * 5, 0.9D) * 0.995)) { + if (M.r(M.min(dist * 5, 0.9D) * 0.995)) { continue; } - if(ii && jj) { + if (ii && jj) { a.add(0, 0, RNG.r.d(-0.3, 0.3)); } - if(kk && jj) { + if (kk && jj) { a.add(RNG.r.d(-0.3, 0.3), 0, 0); } - if(ii && kk) { + if (ii && kk) { a.add(0, RNG.r.d(-0.3, 0.3), 0); } - if(p.getLocation().distanceSquared(a) < 256 * 256) { + if (p.getLocation().distanceSquared(a) < 256 * 256) { Color color = Color.getHSBColor((float) (0.5f + (Math.sin((i + j + k + (p.getTicksLived() / 2f)) / (20f)) / 2)), 1, 1); int r = color.getRed(); int g = color.getGreen(); int b = color.getBlue(); p.spawnParticle(Particle.REDSTONE, a.getX(), a.getY(), a.getZ(), - 1, 0, 0, 0, 0, - new Particle.DustOptions(org.bukkit.Color.fromRGB(r, g, b), - (float) dist * 3f)); + 1, 0, 0, 0, 0, + new Particle.DustOptions(org.bukkit.Color.fromRGB(r, g, b), + (float) dist * 3f)); } } } diff --git a/src/main/java/com/volmit/iris/engine/EnginePanic.java b/src/main/java/com/volmit/iris/engine/EnginePanic.java index fb5dfaa13..582fa3d55 100644 --- a/src/main/java/com/volmit/iris/engine/EnginePanic.java +++ b/src/main/java/com/volmit/iris/engine/EnginePanic.java @@ -34,14 +34,14 @@ public static void saveLast() { } public static void lastPanic() { - for(String i : last.keySet()) { + for (String i : last.keySet()) { Iris.error("Last Panic " + i + ": " + stuff.get(i)); } } public static void panic() { lastPanic(); - for(String i : stuff.keySet()) { + for (String i : stuff.keySet()) { Iris.error("Engine Panic " + i + ": " + stuff.get(i)); } } diff --git a/src/main/java/com/volmit/iris/engine/IrisComplex.java b/src/main/java/com/volmit/iris/engine/IrisComplex.java index e08efba40..e861de99d 100644 --- a/src/main/java/com/volmit/iris/engine/IrisComplex.java +++ b/src/main/java/com/volmit/iris/engine/IrisComplex.java @@ -97,121 +97,121 @@ public IrisComplex(Engine engine, boolean simple) { focusRegion = engine.getFocusRegion(); KMap> inferredStreams = new KMap<>(); - if(focusBiome != null) { + if (focusBiome != null) { focusBiome.setInferredType(InferredType.LAND); focusRegion = findRegion(focusBiome, engine); } //@builder engine.getDimension().getRegions().forEach((i) -> data.getRegionLoader().load(i) - .getAllBiomes(this).forEach((b) -> b - .getGenerators() - .forEach((c) -> registerGenerator(c.getCachedGenerator(this))))); + .getAllBiomes(this).forEach((b) -> b + .getGenerators() + .forEach((c) -> registerGenerator(c.getCachedGenerator(this))))); overlayStream = ProceduralStream.ofDouble((x, z) -> 0.0D).waste("Overlay Stream"); engine.getDimension().getOverlayNoise().forEach(i -> overlayStream = overlayStream.add((x, z) -> i.get(rng, getData(), x, z))); rockStream = engine.getDimension().getRockPalette().getLayerGenerator(rng.nextParallelRNG(45), data).stream() - .select(engine.getDimension().getRockPalette().getBlockData(data)).waste("Rock Stream"); + .select(engine.getDimension().getRockPalette().getBlockData(data)).waste("Rock Stream"); fluidStream = engine.getDimension().getFluidPalette().getLayerGenerator(rng.nextParallelRNG(78), data).stream() - .select(engine.getDimension().getFluidPalette().getBlockData(data)).waste("Fluid Stream"); + .select(engine.getDimension().getFluidPalette().getBlockData(data)).waste("Fluid Stream"); regionStyleStream = engine.getDimension().getRegionStyle().create(rng.nextParallelRNG(883), getData()).stream() - .zoom(engine.getDimension().getRegionZoom()).waste("Region Style"); + .zoom(engine.getDimension().getRegionZoom()).waste("Region Style"); regionIdentityStream = regionStyleStream.fit(Integer.MIN_VALUE, Integer.MAX_VALUE).waste("Region Identity Stream"); regionStream = focusRegion != null ? - ProceduralStream.of((x, z) -> focusRegion, - Interpolated.of(a -> 0D, a -> focusRegion)) - : regionStyleStream - .selectRarity(data.getRegionLoader().loadAll(engine.getDimension().getRegions())) - .cache2D("regionStream", engine, cacheSize).waste("Region Stream"); + ProceduralStream.of((x, z) -> focusRegion, + Interpolated.of(a -> 0D, a -> focusRegion)) + : regionStyleStream + .selectRarity(data.getRegionLoader().loadAll(engine.getDimension().getRegions())) + .cache2D("regionStream", engine, cacheSize).waste("Region Stream"); regionIDStream = regionIdentityStream.convertCached((i) -> new UUID(Double.doubleToLongBits(i), - String.valueOf(i * 38445).hashCode() * 3245556666L)).waste("Region ID Stream"); - caveBiomeStream = regionStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) - .convert((r) - -> engine.getDimension().getCaveBiomeStyle().create(rng.nextParallelRNG(InferredType.CAVE.ordinal()), getData()).stream() - .zoom(r.getCaveBiomeZoom()) - .selectRarity(data.getBiomeLoader().loadAll(r.getCaveBiomes())) - .onNull(emptyBiome) - ).convertAware2D(ProceduralStream::get).cache2D("caveBiomeStream", engine, cacheSize).waste("Cave Biome Stream"); + String.valueOf(i * 38445).hashCode() * 3245556666L)).waste("Region ID Stream"); + caveBiomeStream = regionStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) + .convert((r) + -> engine.getDimension().getCaveBiomeStyle().create(rng.nextParallelRNG(InferredType.CAVE.ordinal()), getData()).stream() + .zoom(r.getCaveBiomeZoom()) + .selectRarity(data.getBiomeLoader().loadAll(r.getCaveBiomes())) + .onNull(emptyBiome) + ).convertAware2D(ProceduralStream::get).cache2D("caveBiomeStream", engine, cacheSize).waste("Cave Biome Stream"); inferredStreams.put(InferredType.CAVE, caveBiomeStream); - landBiomeStream = regionStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) - .convert((r) - -> engine.getDimension().getLandBiomeStyle().create(rng.nextParallelRNG(InferredType.LAND.ordinal()), getData()).stream() - .zoom(r.getLandBiomeZoom()) - .selectRarity(data.getBiomeLoader().loadAll(r.getLandBiomes(), (t) -> t.setInferredType(InferredType.LAND))) - ).convertAware2D(ProceduralStream::get) - .cache2D("landBiomeStream", engine, cacheSize).waste("Land Biome Stream"); + landBiomeStream = regionStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) + .convert((r) + -> engine.getDimension().getLandBiomeStyle().create(rng.nextParallelRNG(InferredType.LAND.ordinal()), getData()).stream() + .zoom(r.getLandBiomeZoom()) + .selectRarity(data.getBiomeLoader().loadAll(r.getLandBiomes(), (t) -> t.setInferredType(InferredType.LAND))) + ).convertAware2D(ProceduralStream::get) + .cache2D("landBiomeStream", engine, cacheSize).waste("Land Biome Stream"); inferredStreams.put(InferredType.LAND, landBiomeStream); - seaBiomeStream = regionStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) - .convert((r) - -> engine.getDimension().getSeaBiomeStyle().create(rng.nextParallelRNG(InferredType.SEA.ordinal()), getData()).stream() - .zoom(r.getSeaBiomeZoom()) - .selectRarity(data.getBiomeLoader().loadAll(r.getSeaBiomes(), (t) -> t.setInferredType(InferredType.SEA))) - ).convertAware2D(ProceduralStream::get) - .cache2D("seaBiomeStream", engine, cacheSize).waste("Sea Biome Stream"); + seaBiomeStream = regionStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) + .convert((r) + -> engine.getDimension().getSeaBiomeStyle().create(rng.nextParallelRNG(InferredType.SEA.ordinal()), getData()).stream() + .zoom(r.getSeaBiomeZoom()) + .selectRarity(data.getBiomeLoader().loadAll(r.getSeaBiomes(), (t) -> t.setInferredType(InferredType.SEA))) + ).convertAware2D(ProceduralStream::get) + .cache2D("seaBiomeStream", engine, cacheSize).waste("Sea Biome Stream"); inferredStreams.put(InferredType.SEA, seaBiomeStream); - shoreBiomeStream = regionStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) - .convert((r) - -> engine.getDimension().getShoreBiomeStyle().create(rng.nextParallelRNG(InferredType.SHORE.ordinal()), getData()).stream() - .zoom(r.getShoreBiomeZoom()) - .selectRarity(data.getBiomeLoader().loadAll(r.getShoreBiomes(), (t) -> t.setInferredType(InferredType.SHORE))) - ).convertAware2D(ProceduralStream::get).cache2D("shoreBiomeStream", engine, cacheSize).waste("Shore Biome Stream"); + shoreBiomeStream = regionStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getRegion().get(x, z)) + .convert((r) + -> engine.getDimension().getShoreBiomeStyle().create(rng.nextParallelRNG(InferredType.SHORE.ordinal()), getData()).stream() + .zoom(r.getShoreBiomeZoom()) + .selectRarity(data.getBiomeLoader().loadAll(r.getShoreBiomes(), (t) -> t.setInferredType(InferredType.SHORE))) + ).convertAware2D(ProceduralStream::get).cache2D("shoreBiomeStream", engine, cacheSize).waste("Shore Biome Stream"); inferredStreams.put(InferredType.SHORE, shoreBiomeStream); bridgeStream = focusBiome != null ? ProceduralStream.of((x, z) -> focusBiome.getInferredType(), - Interpolated.of(a -> 0D, a -> focusBiome.getInferredType())) : - engine.getDimension().getContinentalStyle().create(rng.nextParallelRNG(234234565), getData()) - .bake().scale(1D / engine.getDimension().getContinentZoom()).bake().stream() - .convert((v) -> v >= engine.getDimension().getLandChance() ? InferredType.SEA : InferredType.LAND) - .cache2D("bridgeStream", engine, cacheSize).waste("Bridge Stream"); + Interpolated.of(a -> 0D, a -> focusBiome.getInferredType())) : + engine.getDimension().getContinentalStyle().create(rng.nextParallelRNG(234234565), getData()) + .bake().scale(1D / engine.getDimension().getContinentZoom()).bake().stream() + .convert((v) -> v >= engine.getDimension().getLandChance() ? InferredType.SEA : InferredType.LAND) + .cache2D("bridgeStream", engine, cacheSize).waste("Bridge Stream"); baseBiomeStream = focusBiome != null ? ProceduralStream.of((x, z) -> focusBiome, - Interpolated.of(a -> 0D, a -> focusBiome)) : - bridgeStream.convertAware2D((t, x, z) -> inferredStreams.get(t).get(x, z)) - .convertAware2D(this::implode) - .cache2D("baseBiomeStream", engine, cacheSize).waste("Base Biome Stream"); + Interpolated.of(a -> 0D, a -> focusBiome)) : + bridgeStream.convertAware2D((t, x, z) -> inferredStreams.get(t).get(x, z)) + .convertAware2D(this::implode) + .cache2D("baseBiomeStream", engine, cacheSize).waste("Base Biome Stream"); heightStream = ProceduralStream.of((x, z) -> { IrisBiome b = focusBiome != null ? focusBiome : baseBiomeStream.get(x, z); return getHeight(engine, b, x, z, engine.getSeedManager().getHeight()); }, Interpolated.DOUBLE).cache2D("heightStream", engine, cacheSize).waste("Height Stream"); - roundedHeighteightStream = heightStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getHeight().get(x, z)) - .round().waste("Rounded Height Stream"); - slopeStream = heightStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getHeight().get(x, z)) - .slope(3).cache2D("slopeStream", engine, cacheSize).waste("Slope Stream"); + roundedHeighteightStream = heightStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getHeight().get(x, z)) + .round().waste("Rounded Height Stream"); + slopeStream = heightStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getHeight().get(x, z)) + .slope(3).cache2D("slopeStream", engine, cacheSize).waste("Slope Stream"); trueBiomeStream = focusBiome != null ? ProceduralStream.of((x, y) -> focusBiome, Interpolated.of(a -> 0D, - b -> focusBiome)) - .cache2D("trueBiomeStream-focus", engine, cacheSize) : heightStream - .convertAware2D((h, x, z) -> - fixBiomeType(h, baseBiomeStream.get(x, z), - regionStream.contextInjecting((c,xx,zz)-> IrisContext.getOr(engine).getChunkContext().getRegion().get(xx, zz)).get(x, z), x, z, fluidHeight)) - .cache2D("trueBiomeStream", engine, cacheSize).waste("True Biome Stream"); - trueBiomeDerivativeStream = trueBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) - .convert(IrisBiome::getDerivative).cache2D("trueBiomeDerivativeStream", engine, cacheSize).waste("True Biome Derivative Stream"); - heightFluidStream = heightStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getHeight().get(x, z)) - .max(fluidHeight).cache2D("heightFluidStream", engine, cacheSize).waste("Height Fluid Stream"); + b -> focusBiome)) + .cache2D("trueBiomeStream-focus", engine, cacheSize) : heightStream + .convertAware2D((h, x, z) -> + fixBiomeType(h, baseBiomeStream.get(x, z), + regionStream.contextInjecting((c, xx, zz) -> IrisContext.getOr(engine).getChunkContext().getRegion().get(xx, zz)).get(x, z), x, z, fluidHeight)) + .cache2D("trueBiomeStream", engine, cacheSize).waste("True Biome Stream"); + trueBiomeDerivativeStream = trueBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) + .convert(IrisBiome::getDerivative).cache2D("trueBiomeDerivativeStream", engine, cacheSize).waste("True Biome Derivative Stream"); + heightFluidStream = heightStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getHeight().get(x, z)) + .max(fluidHeight).cache2D("heightFluidStream", engine, cacheSize).waste("Height Fluid Stream"); maxHeightStream = ProceduralStream.ofDouble((x, z) -> height).waste("Max Height Stream"); - terrainSurfaceDecoration = trueBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) - .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.NONE)).cache2D("terrainSurfaceDecoration", engine, cacheSize).waste("Surface Decoration Stream"); - terrainCeilingDecoration = trueBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) - .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.CEILING)).cache2D("terrainCeilingDecoration", engine, cacheSize).waste("Ceiling Decoration Stream"); - terrainCaveSurfaceDecoration = caveBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getCave().get(x, z)) - .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.NONE)).cache2D("terrainCaveSurfaceDecoration", engine, cacheSize).waste("Cave Surface Stream"); - terrainCaveCeilingDecoration = caveBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getCave().get(x, z)) - .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.CEILING)).cache2D("terrainCaveCeilingDecoration", engine, cacheSize).waste("Cave Ceiling Stream"); - shoreSurfaceDecoration = trueBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) - .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.SHORE_LINE)).cache2D("shoreSurfaceDecoration", engine, cacheSize).waste("Shore Surface Stream"); - seaSurfaceDecoration = trueBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) - .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.SEA_SURFACE)).cache2D("seaSurfaceDecoration", engine, cacheSize).waste("Sea Surface Stream"); - seaFloorDecoration = trueBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) - .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.SEA_FLOOR)).cache2D("seaFloorDecoration", engine, cacheSize).waste("Sea Floor Stream"); - baseBiomeIDStream = trueBiomeStream.contextInjecting((c,x,z)-> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) - .convertAware2D((b, x, z) -> { - UUID d = regionIDStream.get(x, z); - return new UUID(b.getLoadKey().hashCode() * 818223L, - d.hashCode()); - }) - .cache2D("", engine, cacheSize).waste("Biome ID Stream"); + terrainSurfaceDecoration = trueBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) + .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.NONE)).cache2D("terrainSurfaceDecoration", engine, cacheSize).waste("Surface Decoration Stream"); + terrainCeilingDecoration = trueBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) + .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.CEILING)).cache2D("terrainCeilingDecoration", engine, cacheSize).waste("Ceiling Decoration Stream"); + terrainCaveSurfaceDecoration = caveBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getCave().get(x, z)) + .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.NONE)).cache2D("terrainCaveSurfaceDecoration", engine, cacheSize).waste("Cave Surface Stream"); + terrainCaveCeilingDecoration = caveBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getCave().get(x, z)) + .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.CEILING)).cache2D("terrainCaveCeilingDecoration", engine, cacheSize).waste("Cave Ceiling Stream"); + shoreSurfaceDecoration = trueBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) + .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.SHORE_LINE)).cache2D("shoreSurfaceDecoration", engine, cacheSize).waste("Shore Surface Stream"); + seaSurfaceDecoration = trueBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) + .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.SEA_SURFACE)).cache2D("seaSurfaceDecoration", engine, cacheSize).waste("Sea Surface Stream"); + seaFloorDecoration = trueBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) + .convertAware2D((b, xx, zz) -> decorateFor(b, xx, zz, IrisDecorationPart.SEA_FLOOR)).cache2D("seaFloorDecoration", engine, cacheSize).waste("Sea Floor Stream"); + baseBiomeIDStream = trueBiomeStream.contextInjecting((c, x, z) -> IrisContext.getOr(engine).getChunkContext().getBiome().get(x, z)) + .convertAware2D((b, x, z) -> { + UUID d = regionIDStream.get(x, z); + return new UUID(b.getLoadKey().hashCode() * 818223L, + d.hashCode()); + }) + .cache2D("", engine, cacheSize).waste("Biome ID Stream"); //@done } public ProceduralStream getBiomeStream(InferredType type) { - switch(type) { + switch (type) { case CAVE: return caveBiomeStream; case LAND: @@ -229,8 +229,8 @@ public ProceduralStream getBiomeStream(InferredType type) { } private IrisRegion findRegion(IrisBiome focus, Engine engine) { - for(IrisRegion i : engine.getDimension().getAllRegions(engine)) { - if(i.getAllBiomeIds().contains(focus.getLoadKey())) { + for (IrisRegion i : engine.getDimension().getAllRegions(engine)) { + if (i.getAllBiomeIds().contains(focus.getLoadKey())) { return i; } } @@ -241,14 +241,14 @@ private IrisRegion findRegion(IrisBiome focus, Engine engine) { private IrisDecorator decorateFor(IrisBiome b, double x, double z, IrisDecorationPart part) { RNG rngc = new RNG(Cache.key(((int) x), ((int) z))); - for(IrisDecorator i : b.getDecorators()) { - if(!i.getPartOf().equals(part)) { + for (IrisDecorator i : b.getDecorators()) { + if (!i.getPartOf().equals(part)) { continue; } BlockData block = i.getBlockData(b, rngc, x, z, data); - if(block != null) { + if (block != null) { return i; } } @@ -259,19 +259,19 @@ private IrisDecorator decorateFor(IrisBiome b, double x, double z, IrisDecoratio private IrisBiome fixBiomeType(Double height, IrisBiome biome, IrisRegion region, Double x, Double z, double fluidHeight) { double sh = region.getShoreHeight(x, z); - if(height >= fluidHeight - 1 && height <= fluidHeight + sh && !biome.isShore()) { + if (height >= fluidHeight - 1 && height <= fluidHeight + sh && !biome.isShore()) { return shoreBiomeStream.get(x, z); } - if(height > fluidHeight + sh && !biome.isLand()) { + if (height > fluidHeight + sh && !biome.isLand()) { return landBiomeStream.get(x, z); } - if(height < fluidHeight && !biome.isAquatic()) { + if (height < fluidHeight && !biome.isAquatic()) { return seaBiomeStream.get(x, z); } - if(height == fluidHeight && !biome.isShore()) { + if (height == fluidHeight && !biome.isShore()) { return shoreBiomeStream.get(x, z); } @@ -279,7 +279,7 @@ private IrisBiome fixBiomeType(Double height, IrisBiome biome, IrisRegion region } private double interpolateGenerators(Engine engine, IrisInterpolator interpolator, KSet generators, double x, double z, long seed) { - if(generators.isEmpty()) { + if (generators.isEmpty()) { return 0; } @@ -288,12 +288,12 @@ private double interpolateGenerators(Engine engine, IrisInterpolator interpolato IrisBiome bx = baseBiomeStream.get(xx, zz); double b = 0; - for(IrisGenerator gen : generators) { + for (IrisGenerator gen : generators) { b += bx.getGenLinkMax(gen.getLoadKey()); } return b; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); Iris.error("Failed to sample hi biome at " + xx + " " + zz + "..."); @@ -307,23 +307,24 @@ private double interpolateGenerators(Engine engine, IrisInterpolator interpolato IrisBiome bx = baseBiomeStream.get(xx, zz); double b = 0; - for(IrisGenerator gen : generators) { + for (IrisGenerator gen : generators) { b += bx.getGenLinkMin(gen.getLoadKey()); } return b; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); Iris.error("Failed to sample lo biome at " + xx + " " + zz + "..."); } return 0; - });; + }); + ; double d = 0; - for(IrisGenerator i : generators) { + for (IrisGenerator i : generators) { d += M.lerp(lo, hi, i.getHeight(x, z, seed + 239945)); } @@ -333,7 +334,7 @@ private double interpolateGenerators(Engine engine, IrisInterpolator interpolato private double getInterpolatedHeight(Engine engine, double x, double z, long seed) { double h = 0; - for(IrisInterpolator i : generators.keySet()) { + for (IrisInterpolator i : generators.keySet()) { h += interpolateGenerators(engine, i, generators.get(i), x, z, seed); } @@ -349,7 +350,7 @@ private void registerGenerator(IrisGenerator cachedGenerator) { } private IrisBiome implode(IrisBiome b, Double x, Double z) { - if(b.getChildren().isEmpty()) { + if (b.getChildren().isEmpty()) { return b; } @@ -357,11 +358,11 @@ private IrisBiome implode(IrisBiome b, Double x, Double z) { } private IrisBiome implode(IrisBiome b, Double x, Double z, int max) { - if(max < 0) { + if (max < 0) { return b; } - if(b.getChildren().isEmpty()) { + if (b.getChildren().isEmpty()) { return b; } diff --git a/src/main/java/com/volmit/iris/engine/IrisEngine.java b/src/main/java/com/volmit/iris/engine/IrisEngine.java index 97f1a71f2..5be2c9250 100644 --- a/src/main/java/com/volmit/iris/engine/IrisEngine.java +++ b/src/main/java/com/volmit/iris/engine/IrisEngine.java @@ -25,7 +25,6 @@ import com.volmit.iris.core.events.IrisEngineHotloadEvent; import com.volmit.iris.core.gui.PregeneratorJob; import com.volmit.iris.core.project.IrisProject; -import com.volmit.iris.core.service.DolphinSVC; import com.volmit.iris.core.service.PreservationSVC; import com.volmit.iris.engine.data.cache.AtomicCache; import com.volmit.iris.engine.framework.*; @@ -64,7 +63,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; @Data public class IrisEngine implements Engine { @@ -83,11 +81,11 @@ public class IrisEngine implements Engine { private final boolean studio; private final AtomicRollingSequence wallClock; private final int art; - private EngineMode mode; private final AtomicCache engineData = new AtomicCache<>(); private final AtomicBoolean cleaning; private final ChronoLatch cleanLatch; private final SeedManager seedManager; + private EngineMode mode; private EngineEffects effects; private EngineExecutionEnvironment execution; private EngineWorldManager worldManager; @@ -134,19 +132,19 @@ public IrisEngine(EngineTarget target, boolean studio) { } private void verifySeed() { - if(getEngineData().getSeed() != null && getEngineData().getSeed() != target.getWorld().getRawWorldSeed()) { + if (getEngineData().getSeed() != null && getEngineData().getSeed() != target.getWorld().getRawWorldSeed()) { target.getWorld().setRawWorldSeed(getEngineData().getSeed()); } } private void tickRandomPlayer() { recycle(); - if(perSecondBudLatch.flip()) { + if (perSecondBudLatch.flip()) { buds.set(bud.get()); bud.set(0); } - if(effects != null) { + if (effects != null) { effects.tickRandomPlayer(); } } @@ -171,7 +169,7 @@ private void setupEngine() { effects = new IrisEngineEffects(this); setupMode(); J.a(this::computeBiomeMaxes); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("FAILED TO SETUP ENGINE!"); e.printStackTrace(); } @@ -180,7 +178,7 @@ private void setupEngine() { } private void setupMode() { - if(mode != null) { + if (mode != null) { mode.close(); } @@ -210,8 +208,8 @@ public IrisJigsawStructure getStructureAt(int x, int z) { } private void warmupChunk(int x, int z) { - for(int i = 0; i < 16; i++) { - for(int j = 0; j < 16; j++) { + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { int xx = x + (i << 4); int zz = z + (z << 4); getComplex().getTrueBiomeStream().get(xx, zz); @@ -237,7 +235,11 @@ public void hotloadSilently() { getTarget().setDimension(getData().getDimensionLoader().load(getDimension().getLoadKey())); prehotload(); setupEngine(); - J.a(() -> { synchronized(ServerConfigurator.class) { ServerConfigurator.installDataPacks(false); } }); + J.a(() -> { + synchronized (ServerConfigurator.class) { + ServerConfigurator.installDataPacks(false); + } + }); } @Override @@ -248,18 +250,18 @@ public IrisEngineData getEngineData() { //TODO: Method this file File f = new File(getWorld().worldFolder(), "iris/engine-data/" + getDimension().getLoadKey() + ".json"); - if(!f.exists()) { + if (!f.exists()) { try { f.getParentFile().mkdirs(); IO.writeAll(f, new Gson().toJson(new IrisEngineData())); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } } try { return new Gson().fromJson(IO.readAll(f), IrisEngineData.class); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } @@ -274,11 +276,11 @@ public int getGenerated() { @Override public double getGeneratedPerSecond() { - if(perSecondLatch.flip()) { + if (perSecondLatch.flip()) { double g = generated.get() - generatedLast.get(); generatedLast.set(generated.get()); - if(g == 0) { + if (g == 0) { return 0; } @@ -296,24 +298,24 @@ public boolean isStudio() { } private void computeBiomeMaxes() { - for(IrisBiome i : getDimension().getAllBiomes(this)) { + for (IrisBiome i : getDimension().getAllBiomes(this)) { double density = 0; - for(IrisObjectPlacement j : i.getObjects()) { + for (IrisObjectPlacement j : i.getObjects()) { density += j.getDensity() * j.getChance(); } maxBiomeObjectDensity = Math.max(maxBiomeObjectDensity, density); density = 0; - for(IrisDecorator j : i.getDecorators()) { + for (IrisDecorator j : i.getDecorators()) { density += Math.max(j.getStackMax(), 1) * j.getChance(); } maxBiomeDecoratorDensity = Math.max(maxBiomeDecoratorDensity, density); density = 0; - for(IrisBiomePaletteLayer j : i.getLayers()) { + for (IrisBiomePaletteLayer j : i.getLayers()) { density++; } @@ -334,11 +336,11 @@ public void printMetrics(CommandSender sender) { double totalWeight = 0; double wallClock = getMetrics().getTotal().getAverage(); - for(double j : timings.values()) { + for (double j : timings.values()) { totalWeight += j; } - for(String j : timings.k()) { + for (String j : timings.k()) { weights.put(getName() + "." + j, (wallClock / totalWeight) * timings.get(j)); } @@ -346,33 +348,33 @@ public void printMetrics(CommandSender sender) { double mtotals = 0; - for(double i : totals.values()) { + for (double i : totals.values()) { mtotals += i; } - for(String i : totals.k()) { + for (String i : totals.k()) { totals.put(i, (masterWallClock / mtotals) * totals.get(i)); } double v = 0; - for(double i : weights.values()) { + for (double i : weights.values()) { v += i; } - for(String i : weights.k()) { + for (String i : weights.k()) { weights.put(i, weights.get(i) / v); } sender.sendMessage("Total: " + C.BOLD + C.WHITE + Form.duration(masterWallClock, 0)); - for(String i : totals.k()) { + for (String i : totals.k()) { sender.sendMessage(" Engine " + C.UNDERLINE + C.GREEN + i + C.RESET + ": " + C.BOLD + C.WHITE + Form.duration(totals.get(i), 0)); } sender.sendMessage("Details: "); - for(String i : weights.sortKNumber().reverse()) { + for (String i : weights.sortKNumber().reverse()) { String befb = C.UNDERLINE + "" + C.GREEN + "" + i.split("\\Q[\\E")[0] + C.RESET + C.GRAY + "["; String num = C.GOLD + i.split("\\Q[\\E")[1].split("]")[0] + C.RESET + C.GRAY + "]."; String afb = C.ITALIC + "" + C.AQUA + i.split("\\Q]\\E")[1].substring(1) + C.RESET + C.GRAY; @@ -406,11 +408,11 @@ public boolean isClosed() { @Override public void recycle() { - if(!cleanLatch.flip()) { + if (!cleanLatch.flip()) { return; } - if(cleaning.get()) { + if (cleaning.get()) { cleanLatch.flipDown(); return; } @@ -421,7 +423,7 @@ public void recycle() { try { getMantle().trim(); getData().getObjectLoader().clean(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Cleanup failed! Enable debug to see stacktrace."); } @@ -433,7 +435,7 @@ public void recycle() { @BlockCoordinates @Override public void generate(int x, int z, Hunk vblocks, Hunk vbiomes, boolean multicore) throws WrongEngineBroException { - if(closed) { + if (closed) { throw new WrongEngineBroException(); } @@ -443,9 +445,9 @@ public void generate(int x, int z, Hunk vblocks, Hunk vbiomes, PrecisionStopwatch p = PrecisionStopwatch.start(); Hunk blocks = vblocks.listen((xx, y, zz, t) -> catchBlockUpdates(x + xx, y + getMinHeight(), z + zz, t)); - if(getDimension().isDebugChunkCrossSections() && ((x >> 4) % getDimension().getDebugCrossSectionsMod() == 0 || (z >> 4) % getDimension().getDebugCrossSectionsMod() == 0)) { - for(int i = 0; i < 16; i++) { - for(int j = 0; j < 16; j++) { + if (getDimension().isDebugChunkCrossSections() && ((x >> 4) % getDimension().getDebugCrossSectionsMod() == 0 || (z >> 4) % getDimension().getDebugCrossSectionsMod() == 0)) { + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { blocks.set(i, 0, j, Material.CRYING_OBSIDIAN.createBlockData()); } } @@ -457,10 +459,10 @@ public void generate(int x, int z, Hunk vblocks, Hunk vbiomes, getMetrics().getTotal().put(p.getMilliseconds()); generated.incrementAndGet(); - if(generated.get() == 661) { + if (generated.get() == 661) { J.a(() -> getData().savePrefetch(this)); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); fail("Failed to generate " + x + ", " + z, e); } @@ -474,7 +476,7 @@ public void saveEngineData() { try { IO.writeAll(f, new Gson().toJson(getEngineData())); Iris.debug("Saved Engine Data"); - } catch(IOException e) { + } catch (IOException e) { Iris.error("Failed to save Engine Data"); e.printStackTrace(); } @@ -487,7 +489,7 @@ public void blockUpdatedMetric() { @Override public IrisBiome getFocus() { - if(getDimension().getFocus() == null || getDimension().getFocus().trim().isEmpty()) { + if (getDimension().getFocus() == null || getDimension().getFocus().trim().isEmpty()) { return null; } @@ -496,7 +498,7 @@ public IrisBiome getFocus() { @Override public IrisRegion getFocusRegion() { - if(getDimension().getFocusRegion() == null || getDimension().getFocusRegion().trim().isEmpty()) { + if (getDimension().getFocusRegion() == null || getDimension().getFocusRegion().trim().isEmpty()) { return null; } diff --git a/src/main/java/com/volmit/iris/engine/IrisEngineEffects.java b/src/main/java/com/volmit/iris/engine/IrisEngineEffects.java index 9ad5d6724..6d0804892 100644 --- a/src/main/java/com/volmit/iris/engine/IrisEngineEffects.java +++ b/src/main/java/com/volmit/iris/engine/IrisEngineEffects.java @@ -45,19 +45,19 @@ public IrisEngineEffects(Engine engine) { public void updatePlayerMap() { List pr = getEngine().getWorld().getPlayers(); - if(pr == null) { + if (pr == null) { return; } - for(Player i : pr) { + for (Player i : pr) { boolean pcc = players.containsKey(i.getUniqueId()); - if(!pcc) { + if (!pcc) { players.put(i.getUniqueId(), new EnginePlayer(getEngine(), i)); } } - for(UUID i : players.k()) { - if(!pr.contains(players.get(i).getPlayer())) { + for (UUID i : players.k()) { + if (!pr.contains(players.get(i).getPlayer())) { players.remove(i); } } @@ -65,14 +65,14 @@ public void updatePlayerMap() { @Override public void tickRandomPlayer() { - if(limit.tryAcquire()) { - if(M.r(0.02)) { + if (limit.tryAcquire()) { + if (M.r(0.02)) { updatePlayerMap(); limit.release(); return; } - if(players.isEmpty()) { + if (players.isEmpty()) { limit.release(); return; } @@ -81,7 +81,7 @@ public void tickRandomPlayer() { int max = players.size(); PrecisionStopwatch p = new PrecisionStopwatch(); - while(max-- > 0 && M.ms() - p.getMilliseconds() < limitms) { + while (max-- > 0 && M.ms() - p.getMilliseconds() < limitms) { players.v().getRandom().tick(); } diff --git a/src/main/java/com/volmit/iris/engine/IrisEngineMantle.java b/src/main/java/com/volmit/iris/engine/IrisEngineMantle.java index da581458c..2ba5b5526 100644 --- a/src/main/java/com/volmit/iris/engine/IrisEngineMantle.java +++ b/src/main/java/com/volmit/iris/engine/IrisEngineMantle.java @@ -83,7 +83,7 @@ public MantleObjectComponent getObjectComponent() { private KList getAllRegions() { KList r = new KList<>(); - for(String i : getEngine().getDimension().getRegions()) { + for (String i : getEngine().getDimension().getRegions()) { r.add(getEngine().getData().getRegionLoader().load(i)); } @@ -93,7 +93,7 @@ private KList getAllRegions() { private KList getAllBiomes() { KList r = new KList<>(); - for(IrisRegion i : getAllRegions()) { + for (IrisRegion i : getAllRegions()) { r.addAll(i.getAllBiomes(getEngine())); } @@ -101,13 +101,13 @@ private KList getAllBiomes() { } private void warn(String ob, BlockVector bv) { - if(Math.max(bv.getBlockX(), bv.getBlockZ()) > 128) { + if (Math.max(bv.getBlockX(), bv.getBlockZ()) > 128) { Iris.warn("Object " + ob + " has a large size (" + bv + ") and may increase memory usage!"); } } private void warnScaled(String ob, BlockVector bv, double ms) { - if(Math.max(bv.getBlockX(), bv.getBlockZ()) > 128) { + if (Math.max(bv.getBlockX(), bv.getBlockZ()) > 128) { Iris.warn("Object " + ob + " has a large size (" + bv + ") and may increase memory usage! (Object scaled up to " + Form.pc(ms, 2) + ")"); } } @@ -124,46 +124,46 @@ private int computeParallaxSize() { int x = xg.get(); int z = zg.get(); - if(getEngine().getDimension().isUseMantle()) { + if (getEngine().getDimension().isUseMantle()) { KList r = getAllRegions(); KList b = getAllBiomes(); - for(IrisBiome i : b) { - for(IrisObjectPlacement j : i.getObjects()) { - if(j.getScale().canScaleBeyond()) { + for (IrisBiome i : b) { + for (IrisObjectPlacement j : i.getObjects()) { + if (j.getScale().canScaleBeyond()) { scalars.put(j.getScale(), j.getPlace()); } else { objects.addAll(j.getPlace()); } } - for(IrisJigsawStructurePlacement j : i.getJigsawStructures()) { + for (IrisJigsawStructurePlacement j : i.getJigsawStructures()) { jig = Math.max(jig, getData().getJigsawStructureLoader().load(j.getStructure()).getMaxDimension()); } } - for(IrisRegion i : r) { - for(IrisObjectPlacement j : i.getObjects()) { - if(j.getScale().canScaleBeyond()) { + for (IrisRegion i : r) { + for (IrisObjectPlacement j : i.getObjects()) { + if (j.getScale().canScaleBeyond()) { scalars.put(j.getScale(), j.getPlace()); } else { objects.addAll(j.getPlace()); } } - for(IrisJigsawStructurePlacement j : i.getJigsawStructures()) { + for (IrisJigsawStructurePlacement j : i.getJigsawStructures()) { jig = Math.max(jig, getData().getJigsawStructureLoader().load(j.getStructure()).getMaxDimension()); } } - for(IrisJigsawStructurePlacement j : getEngine().getDimension().getJigsawStructures()) { + for (IrisJigsawStructurePlacement j : getEngine().getDimension().getJigsawStructures()) { jig = Math.max(jig, getData().getJigsawStructureLoader().load(j.getStructure()).getMaxDimension()); } - if(getEngine().getDimension().getStronghold() != null) { + if (getEngine().getDimension().getStronghold() != null) { try { jig = Math.max(jig, getData().getJigsawStructureLoader().load(getEngine().getDimension().getStronghold()).getMaxDimension()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -172,13 +172,13 @@ private int computeParallaxSize() { Iris.verbose("Checking sizes for " + Form.f(objects.size()) + " referenced objects."); BurstExecutor e = getEngine().getTarget().getBurster().burst(objects.size()); KMap sizeCache = new KMap<>(); - for(String i : objects) { + for (String i : objects) { e.queue(() -> { try { BlockVector bv = sizeCache.computeIfAbsent(i, (k) -> { try { return IrisObject.sampleSize(getData().getObjectLoader().findFile(i)); - } catch(IOException ex) { + } catch (IOException ex) { Iris.reportError(ex); ex.printStackTrace(); } @@ -186,35 +186,35 @@ private int computeParallaxSize() { return null; }); - if(bv == null) { + if (bv == null) { throw new RuntimeException(); } warn(i, bv); - synchronized(xg) { + synchronized (xg) { xg.getAndSet(Math.max(bv.getBlockX(), xg.get())); } - synchronized(zg) { + synchronized (zg) { zg.getAndSet(Math.max(bv.getBlockZ(), zg.get())); } - } catch(Throwable ed) { + } catch (Throwable ed) { Iris.reportError(ed); } }); } - for(Map.Entry> entry : scalars.entrySet()) { + for (Map.Entry> entry : scalars.entrySet()) { double ms = entry.getKey().getMaximumScale(); - for(String j : entry.getValue()) { + for (String j : entry.getValue()) { e.queue(() -> { try { BlockVector bv = sizeCache.computeIfAbsent(j, (k) -> { try { return IrisObject.sampleSize(getData().getObjectLoader().findFile(j)); - } catch(IOException ioException) { + } catch (IOException ioException) { Iris.reportError(ioException); ioException.printStackTrace(); } @@ -222,20 +222,20 @@ private int computeParallaxSize() { return null; }); - if(bv == null) { + if (bv == null) { throw new RuntimeException(); } warnScaled(j, bv, ms); - synchronized(xg) { + synchronized (xg) { xg.getAndSet((int) Math.max(Math.ceil(bv.getBlockX() * ms), xg.get())); } - synchronized(zg) { + synchronized (zg) { zg.getAndSet((int) Math.max(Math.ceil(bv.getBlockZ() * ms), zg.get())); } - } catch(Throwable ee) { + } catch (Throwable ee) { Iris.reportError(ee); } @@ -248,22 +248,22 @@ private int computeParallaxSize() { x = xg.get(); z = zg.get(); - for(IrisDepositGenerator i : getEngine().getDimension().getDeposits()) { + for (IrisDepositGenerator i : getEngine().getDimension().getDeposits()) { int max = i.getMaxDimension(); x = Math.max(max, x); z = Math.max(max, z); } - for(IrisRegion v : r) { - for(IrisDepositGenerator i : v.getDeposits()) { + for (IrisRegion v : r) { + for (IrisDepositGenerator i : v.getDeposits()) { int max = i.getMaxDimension(); x = Math.max(max, x); z = Math.max(max, z); } } - for(IrisBiome v : b) { - for(IrisDepositGenerator i : v.getDeposits()) { + for (IrisBiome v : b) { + for (IrisDepositGenerator i : v.getDeposits()) { int max = i.getMaxDimension(); x = Math.max(max, x); z = Math.max(max, z); @@ -293,11 +293,11 @@ private int computeBodyRange() { m = Math.max(m, getDimension().getFluidBodies().getMaxRange(getData())); - for(IrisRegion i : getDimension().getAllRegions(getEngine())) { + for (IrisRegion i : getDimension().getAllRegions(getEngine())) { m = Math.max(m, i.getFluidBodies().getMaxRange(getData())); } - for(IrisBiome i : getDimension().getAllBiomes(getEngine())) { + for (IrisBiome i : getDimension().getAllBiomes(getEngine())) { m = Math.max(m, i.getFluidBodies().getMaxRange(getData())); } @@ -309,11 +309,11 @@ private int computeCarvingRange() { m = Math.max(m, getDimension().getCarving().getMaxRange(getData())); - for(IrisRegion i : getDimension().getAllRegions(getEngine())) { + for (IrisRegion i : getDimension().getAllRegions(getEngine())) { m = Math.max(m, i.getCarving().getMaxRange(getData())); } - for(IrisBiome i : getDimension().getAllBiomes(getEngine())) { + for (IrisBiome i : getDimension().getAllBiomes(getEngine())) { m = Math.max(m, i.getCarving().getMaxRange(getData())); } diff --git a/src/main/java/com/volmit/iris/engine/IrisExecutionEnvironment.java b/src/main/java/com/volmit/iris/engine/IrisExecutionEnvironment.java index 5a7d9d72d..4420600a4 100644 --- a/src/main/java/com/volmit/iris/engine/IrisExecutionEnvironment.java +++ b/src/main/java/com/volmit/iris/engine/IrisExecutionEnvironment.java @@ -44,7 +44,7 @@ public IrisExecutionEnvironment(Engine engine) { try { this.manager.declareBean("Iris", api, api.getClass()); this.javaScriptEngine = (JavaScriptEngine) this.manager.loadScriptingEngine("javascript"); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } @@ -62,7 +62,7 @@ public void execute(IrisScript script) { Iris.debug("Execute Script (void) " + C.DARK_GREEN + script.getLoadKey()); try { javaScriptEngine.exec("", 0, 0, script); - } catch(BSFException e) { + } catch (BSFException e) { e.printStackTrace(); } } @@ -71,7 +71,7 @@ public Object evaluate(String script) { Iris.debug("Execute Script (for result) " + C.DARK_GREEN + script); try { return javaScriptEngine.eval("", 0, 0, getEngine().getData().getScriptLoader().load(script)); - } catch(BSFException e) { + } catch (BSFException e) { e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/engine/IrisWorldManager.java b/src/main/java/com/volmit/iris/engine/IrisWorldManager.java index a87ca9d52..562a80f05 100644 --- a/src/main/java/com/volmit/iris/engine/IrisWorldManager.java +++ b/src/main/java/com/volmit/iris/engine/IrisWorldManager.java @@ -107,47 +107,47 @@ public IrisWorldManager(Engine engine) { looper = new Looper() { @Override protected long loop() { - if(getEngine().isClosed() || getEngine().getCacheID() != id) { + if (getEngine().isClosed() || getEngine().getCacheID() != id) { interrupt(); } - if(!getEngine().getWorld().hasRealWorld() && clw.flip()) { + if (!getEngine().getWorld().hasRealWorld() && clw.flip()) { getEngine().getWorld().tryGetRealWorld(); } - if(!IrisSettings.get().getWorld().isMarkerEntitySpawningSystem() && !IrisSettings.get().getWorld().isAnbientEntitySpawningSystem()) { + if (!IrisSettings.get().getWorld().isMarkerEntitySpawningSystem() && !IrisSettings.get().getWorld().isAnbientEntitySpawningSystem()) { return 3000; } - if(getEngine().getWorld().hasRealWorld()) { - if(getEngine().getWorld().getPlayers().isEmpty()) { + if (getEngine().getWorld().hasRealWorld()) { + if (getEngine().getWorld().getPlayers().isEmpty()) { return 5000; } - if(chunkUpdater.flip()) { + if (chunkUpdater.flip()) { updateChunks(); } - if(getDimension().isInfiniteEnergy()) { + if (getDimension().isInfiniteEnergy()) { energy += 1000; fixEnergy(); } - if(M.ms() < charge) { + if (M.ms() < charge) { energy += 70; fixEnergy(); } - if(cln.flip()) { + if (cln.flip()) { engine.getEngineData().cleanup(getEngine()); } - if(precount != null) { + if (precount != null) { entityCount = 0; - for(Entity i : precount) { - if(i instanceof LivingEntity) { - if(!i.isDead()) { + for (Entity i : precount) { + if (i instanceof LivingEntity) { + if (!i.isDead()) { entityCount++; } } @@ -156,8 +156,8 @@ protected long loop() { precount = null; } - if(energy < 650) { - if(ecl.flip()) { + if (energy < 650) { + if (ecl.flip()) { energy *= 1 + (0.02 * M.clip((1D - getEntitySaturation()), 0D, 1D)); fixEnergy(); } @@ -175,35 +175,35 @@ protected long loop() { } private void updateChunks() { - for(Player i : getEngine().getWorld().realWorld().getPlayers()) { + for (Player i : getEngine().getWorld().realWorld().getPlayers()) { int r = 1; Chunk c = i.getLocation().getChunk(); - for(int x = -r; x <= r; x++) { - for(int z = -r; z <= r; z++) { - if(c.getWorld().isChunkLoaded(c.getX() + x, c.getZ() + z) && Chunks.isSafe(getEngine().getWorld().realWorld(), c.getX() + x, c.getZ() + z)) { + for (int x = -r; x <= r; x++) { + for (int z = -r; z <= r; z++) { + if (c.getWorld().isChunkLoaded(c.getX() + x, c.getZ() + z) && Chunks.isSafe(getEngine().getWorld().realWorld(), c.getX() + x, c.getZ() + z)) { - if(IrisSettings.get().getWorld().isPostLoadBlockUpdates()) { + if (IrisSettings.get().getWorld().isPostLoadBlockUpdates()) { getEngine().updateChunk(c.getWorld().getChunkAt(c.getX() + x, c.getZ() + z)); } - if(IrisSettings.get().getWorld().isMarkerEntitySpawningSystem()) { + if (IrisSettings.get().getWorld().isMarkerEntitySpawningSystem()) { Chunk cx = getEngine().getWorld().realWorld().getChunkAt(c.getX() + x, c.getZ() + z); int finalX = c.getX() + x; int finalZ = c.getZ() + z; J.a(() -> getMantle().raiseFlag(finalX, finalZ, MantleFlag.INITIAL_SPAWNED_MARKER, - () -> { - J.a(() -> spawnIn(cx, true), RNG.r.i(5, 200)); - getSpawnersFromMarkers(cx).forEach((blockf, spawners) -> { - if(spawners.isEmpty()) { - return; - } - - IrisPosition block = new IrisPosition(blockf.getX(), blockf.getY() + getEngine().getWorld().minHeight(), blockf.getZ()); - IrisSpawner s = new KList<>(spawners).getRandom(); - spawn(block, s, true); - }); - })); + () -> { + J.a(() -> spawnIn(cx, true), RNG.r.i(5, 200)); + getSpawnersFromMarkers(cx).forEach((blockf, spawners) -> { + if (spawners.isEmpty()) { + return; + } + + IrisPosition block = new IrisPosition(blockf.getX(), blockf.getY() + getEngine().getWorld().minHeight(), blockf.getZ()); + IrisSpawner s = new KList<>(spawners).getRandom(); + spawn(block, s, true); + }); + })); } } } @@ -212,34 +212,34 @@ private void updateChunks() { } private boolean onAsyncTick() { - if(getEngine().isClosed()) { + if (getEngine().isClosed()) { return false; } actuallySpawned = 0; - if(energy < 100) { + if (energy < 100) { J.sleep(200); return false; } - if(!getEngine().getWorld().hasRealWorld()) { + if (!getEngine().getWorld().hasRealWorld()) { Iris.debug("Can't spawn. No real world"); J.sleep(5000); return false; } double epx = getEntitySaturation(); - if(epx > IrisSettings.get().getWorld().getTargetSpawnEntitiesPerChunk()) { + if (epx > IrisSettings.get().getWorld().getTargetSpawnEntitiesPerChunk()) { Iris.debug("Can't spawn. The entity per chunk ratio is at " + Form.pc(epx, 2) + " > 100% (total entities " + entityCount + ")"); J.sleep(5000); return false; } - if(cl.flip()) { + if (cl.flip()) { try { J.s(() -> precount = getEngine().getWorld().realWorld().getEntities()); - } catch(Throwable e) { + } catch (Throwable e) { close(); } } @@ -247,15 +247,15 @@ private boolean onAsyncTick() { int spawnBuffer = RNG.r.i(2, 12); Chunk[] cc = getEngine().getWorld().realWorld().getLoadedChunks(); - while(spawnBuffer-- > 0) { - if(cc.length == 0) { + while (spawnBuffer-- > 0) { + if (cc.length == 0) { Iris.debug("Can't spawn. No chunks!"); return false; } Chunk c = cc[RNG.r.nextInt(cc.length)]; - if(!c.isLoaded() || !Chunks.isSafe(c.getWorld(), c.getX(), c.getZ())) { + if (!c.isLoaded() || !Chunks.isSafe(c.getWorld(), c.getX(), c.getZ())) { continue; } @@ -271,39 +271,39 @@ private void fixEnergy() { } private void spawnIn(Chunk c, boolean initial) { - if(getEngine().isClosed()) { + if (getEngine().isClosed()) { return; } - if(initial) { + if (initial) { energy += 1.2; } //@builder IrisBiome biome = IrisSettings.get().getWorld().isAnbientEntitySpawningSystem() - ? getEngine().getSurfaceBiome(c) : null; + ? getEngine().getSurfaceBiome(c) : null; IrisEntitySpawn v = IrisSettings.get().getWorld().isAnbientEntitySpawningSystem() - ? spawnRandomly(Stream.concat(getData().getSpawnerLoader() - .loadAll(getDimension().getEntitySpawners()) - .shuffleCopy(RNG.r).stream() - .filter(this::canSpawn) - .filter((i) -> i.isValid(biome)) - .flatMap((i) -> stream(i, initial)), - Stream.concat(getData().getSpawnerLoader() - .loadAll(getEngine().getRegion(c.getX() << 4, c.getZ() << 4).getEntitySpawners()) - .shuffleCopy(RNG.r).stream().filter(this::canSpawn) - .flatMap((i) -> stream(i, initial)), - getData().getSpawnerLoader() - .loadAll(getEngine().getSurfaceBiome(c.getX() << 4, c.getZ() << 4).getEntitySpawners()) - .shuffleCopy(RNG.r).stream().filter(this::canSpawn) - .flatMap((i) -> stream(i, initial)))) - .collect(Collectors.toList())) - .popRandom(RNG.r) : null; + ? spawnRandomly(Stream.concat(getData().getSpawnerLoader() + .loadAll(getDimension().getEntitySpawners()) + .shuffleCopy(RNG.r).stream() + .filter(this::canSpawn) + .filter((i) -> i.isValid(biome)) + .flatMap((i) -> stream(i, initial)), + Stream.concat(getData().getSpawnerLoader() + .loadAll(getEngine().getRegion(c.getX() << 4, c.getZ() << 4).getEntitySpawners()) + .shuffleCopy(RNG.r).stream().filter(this::canSpawn) + .flatMap((i) -> stream(i, initial)), + getData().getSpawnerLoader() + .loadAll(getEngine().getSurfaceBiome(c.getX() << 4, c.getZ() << 4).getEntitySpawners()) + .shuffleCopy(RNG.r).stream().filter(this::canSpawn) + .flatMap((i) -> stream(i, initial)))) + .collect(Collectors.toList())) + .popRandom(RNG.r) : null; //@done - if(IrisSettings.get().getWorld().isMarkerEntitySpawningSystem()) { + if (IrisSettings.get().getWorld().isMarkerEntitySpawningSystem()) { getSpawnersFromMarkers(c).forEach((blockf, spawners) -> { - if(spawners.isEmpty()) { + if (spawners.isEmpty()) { return; } @@ -311,16 +311,16 @@ private void spawnIn(Chunk c, boolean initial) { IrisSpawner s = new KList<>(spawners).getRandom(); spawn(block, s, false); J.a(() -> getMantle().raiseFlag(c.getX(), c.getZ(), MantleFlag.INITIAL_SPAWNED_MARKER, - () -> spawn(block, s, true))); + () -> spawn(block, s, true))); }); } - if(v != null && v.getReferenceSpawner() != null) { + if (v != null && v.getReferenceSpawner() != null) { int maxEntCount = v.getReferenceSpawner().getMaxEntitiesPerChunk(); - for(Entity i : c.getEntities()) { - if(i instanceof LivingEntity) { - if(-maxEntCount <= 0) { + for (Entity i : c.getEntities()) { + if (i instanceof LivingEntity) { + if (-maxEntCount <= 0) { return; } } @@ -328,7 +328,7 @@ private void spawnIn(Chunk c, boolean initial) { try { spawn(c, v); - } catch(Throwable e) { + } catch (Throwable e) { J.s(() -> spawn(c, v)); } } @@ -337,33 +337,33 @@ private void spawnIn(Chunk c, boolean initial) { private void spawn(Chunk c, IrisEntitySpawn i) { boolean allow = true; - if(!i.getReferenceSpawner().getMaximumRatePerChunk().isInfinite()) { + if (!i.getReferenceSpawner().getMaximumRatePerChunk().isInfinite()) { allow = false; IrisEngineChunkData cd = getEngine().getEngineData().getChunk(c.getX(), c.getZ()); IrisEngineSpawnerCooldown sc = null; - for(IrisEngineSpawnerCooldown j : cd.getCooldowns()) { - if(j.getSpawner().equals(i.getReferenceSpawner().getLoadKey())) { + for (IrisEngineSpawnerCooldown j : cd.getCooldowns()) { + if (j.getSpawner().equals(i.getReferenceSpawner().getLoadKey())) { sc = j; break; } } - if(sc == null) { + if (sc == null) { sc = new IrisEngineSpawnerCooldown(); sc.setSpawner(i.getReferenceSpawner().getLoadKey()); cd.getCooldowns().add(sc); } - if(sc.canSpawn(i.getReferenceSpawner().getMaximumRatePerChunk())) { + if (sc.canSpawn(i.getReferenceSpawner().getMaximumRatePerChunk())) { sc.spawn(getEngine()); allow = true; } } - if(allow) { + if (allow) { int s = i.spawn(getEngine(), c, RNG.r); actuallySpawned += s; - if(s > 0) { + if (s > 0) { getCooldown(i.getReferenceSpawner()).spawn(getEngine()); energy -= s * ((i.getEnergyMultiplier() * i.getReferenceSpawner().getEnergyMultiplier() * 1)); } @@ -373,33 +373,33 @@ private void spawn(Chunk c, IrisEntitySpawn i) { private void spawn(IrisPosition c, IrisEntitySpawn i) { boolean allow = true; - if(!i.getReferenceSpawner().getMaximumRatePerChunk().isInfinite()) { + if (!i.getReferenceSpawner().getMaximumRatePerChunk().isInfinite()) { allow = false; IrisEngineChunkData cd = getEngine().getEngineData().getChunk(c.getX() >> 4, c.getZ() >> 4); IrisEngineSpawnerCooldown sc = null; - for(IrisEngineSpawnerCooldown j : cd.getCooldowns()) { - if(j.getSpawner().equals(i.getReferenceSpawner().getLoadKey())) { + for (IrisEngineSpawnerCooldown j : cd.getCooldowns()) { + if (j.getSpawner().equals(i.getReferenceSpawner().getLoadKey())) { sc = j; break; } } - if(sc == null) { + if (sc == null) { sc = new IrisEngineSpawnerCooldown(); sc.setSpawner(i.getReferenceSpawner().getLoadKey()); cd.getCooldowns().add(sc); } - if(sc.canSpawn(i.getReferenceSpawner().getMaximumRatePerChunk())) { + if (sc.canSpawn(i.getReferenceSpawner().getMaximumRatePerChunk())) { sc.spawn(getEngine()); allow = true; } } - if(allow) { + if (allow) { int s = i.spawn(getEngine(), c, RNG.r); actuallySpawned += s; - if(s > 0) { + if (s > 0) { getCooldown(i.getReferenceSpawner()).spawn(getEngine()); energy -= s * ((i.getEnergyMultiplier() * i.getReferenceSpawner().getEnergyMultiplier() * 1)); } @@ -407,7 +407,7 @@ private void spawn(IrisPosition c, IrisEntitySpawn i) { } private Stream stream(IrisSpawner s, boolean initial) { - for(IrisEntitySpawn i : initial ? s.getInitialSpawns() : s.getSpawns()) { + for (IrisEntitySpawn i : initial ? s.getInitialSpawns() : s.getSpawns()) { i.setReferenceSpawner(s); i.setReferenceMarker(s.getReferenceMarker()); } @@ -419,11 +419,11 @@ private KList spawnRandomly(List types) { KList rarityTypes = new KList<>(); int totalRarity = 0; - for(IrisEntitySpawn i : types) { + for (IrisEntitySpawn i : types) { totalRarity += IRare.get(i); } - for(IrisEntitySpawn i : types) { + for (IrisEntitySpawn i : types) { rarityTypes.addMultiple(i, totalRarity / IRare.get(i)); } @@ -432,20 +432,20 @@ private KList spawnRandomly(List types) { public boolean canSpawn(IrisSpawner i) { return i.isValid(getEngine().getWorld().realWorld()) - && getCooldown(i).canSpawn(i.getMaximumRate()); + && getCooldown(i).canSpawn(i.getMaximumRate()); } private IrisEngineSpawnerCooldown getCooldown(IrisSpawner i) { IrisEngineData ed = getEngine().getEngineData(); IrisEngineSpawnerCooldown cd = null; - for(IrisEngineSpawnerCooldown j : ed.getSpawnerCooldowns()) { - if(j.getSpawner().equals(i.getLoadKey())) { + for (IrisEngineSpawnerCooldown j : ed.getSpawnerCooldowns()) { + if (j.getSpawner().equals(i.getLoadKey())) { cd = j; } } - if(cd == null) { + if (cd == null) { cd = new IrisEngineSpawnerCooldown(); cd.setSpawner(i.getLoadKey()); cd.setLastSpawn(M.ms() - i.getMaximumRate().getInterval()); @@ -471,7 +471,7 @@ public void requestBiomeInject(Position2 p) { @Override public void onChunkLoad(Chunk e, boolean generated) { - if(getEngine().isClosed()) { + if (getEngine().isClosed()) { return; } @@ -479,22 +479,22 @@ public void onChunkLoad(Chunk e, boolean generated) { fixEnergy(); getEngine().cleanupMantleChunk(e.getX(), e.getZ()); - if(generated) { + if (generated) { //INMS.get().injectBiomesFromMantle(e, getMantle()); } } private void spawn(IrisPosition block, IrisSpawner spawner, boolean initial) { - if(getEngine().isClosed()) { + if (getEngine().isClosed()) { return; } - if(spawner == null) { + if (spawner == null) { return; } KList s = initial ? spawner.getInitialSpawns() : spawner.getSpawns(); - if(s.isEmpty()) { + if (s.isEmpty()) { return; } @@ -515,7 +515,7 @@ public void chargeEnergy() { @Override public void teleportAsync(PlayerTeleportEvent e) { - if(IrisSettings.get().getWorld().getAsyncTeleport().isEnabled()) { + if (IrisSettings.get().getWorld().getAsyncTeleport().isEnabled()) { e.setCancelled(true); warmupAreaAsync(e.getPlayer(), e.getTo(), () -> J.s(() -> { ignoreTP.set(true); @@ -529,21 +529,21 @@ private void warmupAreaAsync(Player player, Location to, Runnable r) { J.a(() -> { int viewDistance = IrisSettings.get().getWorld().getAsyncTeleport().getLoadViewDistance(); KList> futures = new KList<>(); - for(int i = -viewDistance; i <= viewDistance; i++) { - for(int j = -viewDistance; j <= viewDistance; j++) { + for (int i = -viewDistance; i <= viewDistance; i++) { + for (int j = -viewDistance; j <= viewDistance; j++) { int finalJ = j; int finalI = i; - if(to.getWorld().isChunkLoaded((to.getBlockX() >> 4) + i, (to.getBlockZ() >> 4) + j)) { + if (to.getWorld().isChunkLoaded((to.getBlockX() >> 4) + i, (to.getBlockZ() >> 4) + j)) { futures.add(CompletableFuture.completedFuture(null)); continue; } futures.add(MultiBurst.burst.completeValue(() - -> PaperLib.getChunkAtAsync(to.getWorld(), - (to.getBlockX() >> 4) + finalI, - (to.getBlockZ() >> 4) + finalJ, - true, IrisSettings.get().getWorld().getAsyncTeleport().isUrgent()).get())); + -> PaperLib.getChunkAtAsync(to.getWorld(), + (to.getBlockX() >> 4) + finalI, + (to.getBlockZ() >> 4) + finalJ, + true, IrisSettings.get().getWorld().getAsyncTeleport().isUrgent()).get())); } } @@ -552,7 +552,7 @@ private void warmupAreaAsync(Player player, Location to, Runnable r) { public void execute(Future chunkFuture) { try { chunkFuture.get(); - } catch(InterruptedException | ExecutionException e) { + } catch (InterruptedException | ExecutionException e) { } } @@ -569,45 +569,45 @@ public Map> getSpawnersFromMarkers(Chunk c) { Map> p = new KMap<>(); Set b = new KSet<>(); getMantle().iterateChunk(c.getX(), c.getZ(), MatterMarker.class, (x, y, z, t) -> { - if(t.getTag().equals("cave_floor") || t.getTag().equals("cave_ceiling")) { + if (t.getTag().equals("cave_floor") || t.getTag().equals("cave_ceiling")) { return; } IrisMarker mark = getData().getMarkerLoader().load(t.getTag()); IrisPosition pos = new IrisPosition((c.getX() << 4) + x, y, (c.getZ() << 4) + z); - if(mark.isEmptyAbove()) { + if (mark.isEmptyAbove()) { AtomicBoolean remove = new AtomicBoolean(false); try { J.sfut(() -> { - if(c.getBlock(x, y + 1, z).getBlockData().getMaterial().isSolid() || c.getBlock(x, y + 2, z).getBlockData().getMaterial().isSolid()) { + if (c.getBlock(x, y + 1, z).getBlockData().getMaterial().isSolid() || c.getBlock(x, y + 2, z).getBlockData().getMaterial().isSolid()) { remove.set(true); } }).get(); - } catch(InterruptedException | ExecutionException e) { + } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } - if(remove.get()) { + if (remove.get()) { b.add(pos); return; } } - for(String i : mark.getSpawners()) { + for (String i : mark.getSpawners()) { IrisSpawner m = getData().getSpawnerLoader().load(i); m.setReferenceMarker(mark); // This is so fucking incorrect its a joke //noinspection ConstantConditions - if(m != null) { + if (m != null) { p.computeIfAbsent(pos, (k) -> new KSet<>()).add(m); } } }); - for(IrisPosition i : b) { + for (IrisPosition i : b) { getEngine().getMantle().getMantle().remove(i.getX(), i.getY(), i.getZ(), MatterMarker.class); } @@ -616,18 +616,18 @@ public Map> getSpawnersFromMarkers(Chunk c) { @Override public void onBlockBreak(BlockBreakEvent e) { - if(e.getBlock().getWorld().equals(getTarget().getWorld().realWorld())) { + if (e.getBlock().getWorld().equals(getTarget().getWorld().realWorld())) { J.a(() -> { MatterMarker marker = getMantle().get(e.getBlock().getX(), e.getBlock().getY(), e.getBlock().getZ(), MatterMarker.class); - if(marker != null) { - if(marker.getTag().equals("cave_floor") || marker.getTag().equals("cave_ceiling")) { + if (marker != null) { + if (marker.getTag().equals("cave_floor") || marker.getTag().equals("cave_ceiling")) { return; } IrisMarker mark = getData().getMarkerLoader().load(marker.getTag()); - if(mark == null || mark.isRemoveOnChange()) { + if (mark == null || mark.isRemoveOnChange()) { getMantle().remove(e.getBlock().getX(), e.getBlock().getY(), e.getBlock().getZ(), MatterMarker.class); } } @@ -637,7 +637,7 @@ public void onBlockBreak(BlockBreakEvent e) { IrisBiome b = getEngine().getBiome(e.getBlock().getLocation().clone().subtract(0, getEngine().getWorld().minHeight(), 0)); List dropProviders = filterDrops(b.getBlockDrops(), e, getData()); - if(dropProviders.stream().noneMatch(IrisBlockDrops::isSkipParents)) { + if (dropProviders.stream().noneMatch(IrisBlockDrops::isSkipParents)) { IrisRegion r = getEngine().getRegion(e.getBlock().getLocation()); dropProviders.addAll(filterDrops(r.getBlockDrops(), e, getData())); dropProviders.addAll(filterDrops(getEngine().getDimension().getBlockDrops(), e, getData())); @@ -645,11 +645,11 @@ public void onBlockBreak(BlockBreakEvent e) { dropProviders.forEach(provider -> provider.fillDrops(false, d)); - if(dropProviders.stream().anyMatch(IrisBlockDrops::isReplaceVanillaDrops)) { + if (dropProviders.stream().anyMatch(IrisBlockDrops::isReplaceVanillaDrops)) { e.setDropItems(false); } - if(d.isNotEmpty()) { + if (d.isNotEmpty()) { World w = e.getBlock().getWorld(); J.s(() -> d.forEach(item -> w.dropItemNaturally(e.getBlock().getLocation().clone().add(.5, .5, .5), item))); } @@ -678,7 +678,7 @@ public int getChunkCount() { @Override public double getEntitySaturation() { - if(!getEngine().getWorld().hasRealWorld()) { + if (!getEngine().getWorld().hasRealWorld()) { return 1; } diff --git a/src/main/java/com/volmit/iris/engine/actuator/IrisBiomeActuator.java b/src/main/java/com/volmit/iris/engine/actuator/IrisBiomeActuator.java index 7530f61c2..032fd32a1 100644 --- a/src/main/java/com/volmit/iris/engine/actuator/IrisBiomeActuator.java +++ b/src/main/java/com/volmit/iris/engine/actuator/IrisBiomeActuator.java @@ -49,13 +49,13 @@ public void onActuate(int x, int z, Hunk h, boolean multicore, ChunkConte PrecisionStopwatch p = PrecisionStopwatch.start(); int m = 0; - for(int xf = 0; xf < h.getWidth(); xf++) { + for (int xf = 0; xf < h.getWidth(); xf++) { IrisBiome ib; - for(int zf = 0; zf < h.getDepth(); zf++) { + for (int zf = 0; zf < h.getDepth(); zf++) { ib = context.getBiome().get(xf, zf); MatterBiomeInject matter = null; - if(ib.isCustom()) { + if (ib.isCustom()) { IrisBiomeCustom custom = ib.getCustomBiome(rng, x, 0, z); matter = BiomeInjectMatter.get(INMS.get().getBiomeBaseIdForKey(getDimension().getLoadKey() + ":" + custom.getId())); } else { @@ -69,7 +69,7 @@ public void onActuate(int x, int z, Hunk h, boolean multicore, ChunkConte } getEngine().getMetrics().getBiome().put(p.getMilliseconds()); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } diff --git a/src/main/java/com/volmit/iris/engine/actuator/IrisDecorantActuator.java b/src/main/java/com/volmit/iris/engine/actuator/IrisDecorantActuator.java index 99ed90824..c53a70a6d 100644 --- a/src/main/java/com/volmit/iris/engine/actuator/IrisDecorantActuator.java +++ b/src/main/java/com/volmit/iris/engine/actuator/IrisDecorantActuator.java @@ -63,18 +63,18 @@ public IrisDecorantActuator(Engine engine) { @BlockCoordinates @Override public void onActuate(int x, int z, Hunk output, boolean multicore, ChunkContext context) { - if(!getEngine().getDimension().isDecorate()) { + if (!getEngine().getDimension().isDecorate()) { return; } PrecisionStopwatch p = PrecisionStopwatch.start(); - for(int i = 0; i < output.getWidth(); i++) { + for (int i = 0; i < output.getWidth(); i++) { int height; int realX = Math.round(x + i); int realZ; IrisBiome biome, cave; - for(int j = 0; j < output.getDepth(); j++) { + for (int j = 0; j < output.getDepth(); j++) { boolean solid; int emptyFor = 0; int lastSolid = 0; @@ -83,36 +83,36 @@ public void onActuate(int x, int z, Hunk output, boolean multicore, C biome = context.getBiome().get(i, j); cave = shouldRay ? context.getCave().get(i, j) : null; - if(biome.getDecorators().isEmpty() && (cave == null || cave.getDecorators().isEmpty())) { + if (biome.getDecorators().isEmpty() && (cave == null || cave.getDecorators().isEmpty())) { continue; } - if(height < getDimension().getFluidHeight()) { + if (height < getDimension().getFluidHeight()) { getSeaSurfaceDecorator().decorate(i, j, - realX, Math.round(i + 1), Math.round(x + i - 1), - realZ, Math.round(z + j + 1), Math.round(z + j - 1), - output, biome, getDimension().getFluidHeight(), getEngine().getHeight()); + realX, Math.round(i + 1), Math.round(x + i - 1), + realZ, Math.round(z + j + 1), Math.round(z + j - 1), + output, biome, getDimension().getFluidHeight(), getEngine().getHeight()); getSeaFloorDecorator().decorate(i, j, - realX, realZ, output, biome, height + 1, - getDimension().getFluidHeight() + 1); + realX, realZ, output, biome, height + 1, + getDimension().getFluidHeight() + 1); } - if(height == getDimension().getFluidHeight()) { + if (height == getDimension().getFluidHeight()) { getShoreLineDecorator().decorate(i, j, - realX, Math.round(x + i + 1), Math.round(x + i - 1), - realZ, Math.round(z + j + 1), Math.round(z + j - 1), - output, biome, height, getEngine().getHeight()); + realX, Math.round(x + i + 1), Math.round(x + i - 1), + realZ, Math.round(z + j + 1), Math.round(z + j - 1), + output, biome, height, getEngine().getHeight()); } getSurfaceDecorator().decorate(i, j, realX, realZ, output, biome, height, getEngine().getHeight() - height); - if(cave != null && cave.getDecorators().isNotEmpty()) { - for(int k = height; k > 0; k--) { + if (cave != null && cave.getDecorators().isNotEmpty()) { + for (int k = height; k > 0; k--) { solid = PREDICATE_SOLID.test(output.get(i, k, j)); - if(solid) { - if(emptyFor > 0) { + if (solid) { + if (emptyFor > 0) { getSurfaceDecorator().decorate(i, j, realX, realZ, output, cave, k, lastSolid); getCeilingDecorator().decorate(i, j, realX, realZ, output, cave, lastSolid - 1, emptyFor); emptyFor = 0; diff --git a/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java b/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java index ac15fc913..7d602021e 100644 --- a/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java +++ b/src/main/java/com/volmit/iris/engine/actuator/IrisTerrainNormalActuator.java @@ -53,7 +53,7 @@ public IrisTerrainNormalActuator(Engine engine) { public void onActuate(int x, int z, Hunk h, boolean multicore, ChunkContext context) { PrecisionStopwatch p = PrecisionStopwatch.start(); - for(int xf = 0; xf < h.getWidth(); xf++) { + for (int xf = 0; xf < h.getWidth(); xf++) { terrainSliver(x, z, xf, h, context); } @@ -67,14 +67,10 @@ private int fluidOrHeight(int height) { /** * This is calling 1/16th of a chunk x/z slice. It is a plane from sky to bedrock 1 thick in the x direction. * - * @param x - * the chunk x in blocks - * @param z - * the chunk z in blocks - * @param xf - * the current x slice - * @param h - * the blockdata + * @param x the chunk x in blocks + * @param z the chunk z in blocks + * @param xf the current x slice + * @param h the blockdata */ @BlockCoordinates public void terrainSliver(int x, int z, int xf, Hunk h, ChunkContext context) { @@ -82,7 +78,7 @@ public void terrainSliver(int x, int z, int xf, Hunk h, ChunkContext IrisBiome biome; IrisRegion region; - for(zf = 0; zf < h.getDepth(); zf++) { + for (zf = 0; zf < h.getDepth(); zf++) { realX = xf + x; realZ = zf + z; biome = context.getBiome().get(xf, zf); @@ -90,54 +86,54 @@ public void terrainSliver(int x, int z, int xf, Hunk h, ChunkContext he = (int) Math.round(Math.min(h.getHeight(), context.getHeight().get(xf, zf))); hf = Math.round(Math.max(Math.min(h.getHeight(), getDimension().getFluidHeight()), he)); - if(hf < 0) { + if (hf < 0) { continue; } KList blocks = null; KList fblocks = null; int depth, fdepth; - for(int i = hf; i >= 0; i--) { - if(i >= h.getHeight()) { + for (int i = hf; i >= 0; i--) { + if (i >= h.getHeight()) { continue; } - if(i == 0) { - if(getDimension().isBedrock()) { + if (i == 0) { + if (getDimension().isBedrock()) { h.set(xf, i, zf, BEDROCK); lastBedrock = i; continue; } } - if(i > he && i <= hf) { + if (i > he && i <= hf) { fdepth = hf - i; - if(fblocks == null) { + if (fblocks == null) { fblocks = biome.generateSeaLayers(realX, realZ, rng, hf - he, getData()); } - if(fblocks.hasIndex(fdepth)) { + if (fblocks.hasIndex(fdepth)) { h.set(xf, i, zf, fblocks.get(fdepth)); continue; } - h.set(xf, i, zf, context.getFluid().get(xf,zf)); + h.set(xf, i, zf, context.getFluid().get(xf, zf)); continue; } - if(i <= he) { + if (i <= he) { depth = he - i; - if(blocks == null) { + if (blocks == null) { blocks = biome.generateLayers(getDimension(), realX, realZ, rng, - he, - he, - getData(), - getComplex()); + he, + he, + getData(), + getComplex()); } - if(blocks.hasIndex(depth)) { + if (blocks.hasIndex(depth)) { h.set(xf, i, zf, blocks.get(depth)); continue; } @@ -146,7 +142,7 @@ public void terrainSliver(int x, int z, int xf, Hunk h, ChunkContext ore = ore == null ? region.generateOres(realX, i, realZ, rng, getData()) : ore; ore = ore == null ? getDimension().generateOres(realX, i, realZ, rng, getData()) : ore; - if(ore != null) { + if (ore != null) { h.set(xf, i, zf, ore); } else { h.set(xf, i, zf, context.getRock().get(xf, zf)); diff --git a/src/main/java/com/volmit/iris/engine/data/cache/AtomicCache.java b/src/main/java/com/volmit/iris/engine/data/cache/AtomicCache.java index 5f69b7a1f..4757bcfb6 100644 --- a/src/main/java/com/volmit/iris/engine/data/cache/AtomicCache.java +++ b/src/main/java/com/volmit/iris/engine/data/cache/AtomicCache.java @@ -46,7 +46,7 @@ public AtomicCache(boolean nullSupport) { public void reset() { t.set(null); - if(nullSupport) { + if (nullSupport) { set.set(false); } } @@ -55,7 +55,7 @@ public T aquireNasty(NastySupplier t) { return aquire(() -> { try { return t.get(); - } catch(Throwable e) { + } catch (Throwable e) { return null; } }); @@ -65,7 +65,7 @@ public T aquireNastyPrint(NastySupplier t) { return aquire(() -> { try { return t.get(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); return null; } @@ -73,18 +73,18 @@ public T aquireNastyPrint(NastySupplier t) { } public T aquire(Supplier t) { - if(this.t.get() != null) { + if (this.t.get() != null) { return this.t.get(); - } else if(nullSupport && set.get()) { + } else if (nullSupport && set.get()) { return null; } lock.lock(); - if(this.t.get() != null) { + if (this.t.get() != null) { lock.unlock(); return this.t.get(); - } else if(nullSupport && set.get()) { + } else if (nullSupport && set.get()) { lock.unlock(); return null; } @@ -92,10 +92,10 @@ public T aquire(Supplier t) { try { this.t.set(t.get()); - if(nullSupport) { + if (nullSupport) { set.set(true); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("Atomic cache failure!"); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/engine/data/cache/Cache.java b/src/main/java/com/volmit/iris/engine/data/cache/Cache.java index fa10c5dbb..9e36ef704 100644 --- a/src/main/java/com/volmit/iris/engine/data/cache/Cache.java +++ b/src/main/java/com/volmit/iris/engine/data/cache/Cache.java @@ -46,7 +46,7 @@ static int[] to3D(int idx, int w, int h) { idx -= (z * w * h); final int y = idx / w; final int x = idx % w; - return new int[] {x, y, z}; + return new int[]{x, y, z}; } int getId(); diff --git a/src/main/java/com/volmit/iris/engine/data/chunk/LinkedTerrainChunk.java b/src/main/java/com/volmit/iris/engine/data/chunk/LinkedTerrainChunk.java index 20462b50d..cbf18c1e6 100644 --- a/src/main/java/com/volmit/iris/engine/data/chunk/LinkedTerrainChunk.java +++ b/src/main/java/com/volmit/iris/engine/data/chunk/LinkedTerrainChunk.java @@ -56,7 +56,7 @@ public LinkedTerrainChunk(BiomeGrid storage, ChunkData data) { @Override public BiomeBaseInjector getBiomeBaseInjector() { - if(unsafe) { + if (unsafe) { return (a, b, c, d) -> { }; } @@ -67,7 +67,7 @@ public BiomeBaseInjector getBiomeBaseInjector() { @Override public Biome getBiome(int x, int z) { - if(storage != null) { + if (storage != null) { return storage.getBiome(x, z); } @@ -77,7 +77,7 @@ public Biome getBiome(int x, int z) { @Override public Biome getBiome(int x, int y, int z) { - if(storage != null) { + if (storage != null) { return storage.getBiome(x, y, z); } @@ -86,7 +86,7 @@ public Biome getBiome(int x, int y, int z) { @Override public void setBiome(int x, int z, Biome bio) { - if(storage != null) { + if (storage != null) { storage.setBiome(x, z, bio); return; } @@ -100,7 +100,7 @@ public BiomeGrid getRawBiome() { @Override public void setBiome(int x, int y, int z, Biome bio) { - if(storage != null) { + if (storage != null) { storage.setBiome(x, y, z, bio); return; } @@ -190,7 +190,7 @@ public void setRaw(ChunkData data) { @Override public void inject(BiomeGrid biome) { - if(biome3D != null) { + if (biome3D != null) { biome3D.inject(biome); } } diff --git a/src/main/java/com/volmit/iris/engine/data/chunk/MCATerrainChunk.java b/src/main/java/com/volmit/iris/engine/data/chunk/MCATerrainChunk.java index 836bcaddf..31b24a665 100644 --- a/src/main/java/com/volmit/iris/engine/data/chunk/MCATerrainChunk.java +++ b/src/main/java/com/volmit/iris/engine/data/chunk/MCATerrainChunk.java @@ -81,11 +81,11 @@ public void setBlock(int x, int y, int z, BlockData blockData) { int xx = (x + ox) & 15; int zz = (z + oz) & 15; - if(y > getMaxHeight() || y < getMinHeight()) { + if (y > getMaxHeight() || y < getMinHeight()) { return; } - if(blockData == null) { + if (blockData == null) { Iris.error("NULL BD"); } @@ -94,11 +94,11 @@ public void setBlock(int x, int y, int z, BlockData blockData) { @Override public org.bukkit.block.data.BlockData getBlockData(int x, int y, int z) { - if(y > getMaxHeight()) { + if (y > getMaxHeight()) { y = getMaxHeight(); } - if(y < getMinHeight()) { + if (y < getMinHeight()) { y = getMinHeight(); } diff --git a/src/main/java/com/volmit/iris/engine/data/chunk/TerrainChunk.java b/src/main/java/com/volmit/iris/engine/data/chunk/TerrainChunk.java index 36a6508fe..16c93da85 100644 --- a/src/main/java/com/volmit/iris/engine/data/chunk/TerrainChunk.java +++ b/src/main/java/com/volmit/iris/engine/data/chunk/TerrainChunk.java @@ -49,10 +49,8 @@ static TerrainChunk create(ChunkData raw, BiomeGrid grid) { /** * Get biome at x, z within chunk being generated * - * @param x - * - 0-15 - * @param z - * - 0-15 + * @param x - 0-15 + * @param z - 0-15 * @return Biome value * @deprecated biomes are now 3-dimensional */ @@ -63,12 +61,9 @@ static TerrainChunk create(ChunkData raw, BiomeGrid grid) { /** * Get biome at x, z within chunk being generated * - * @param x - * - 0-15 - * @param y - * - 0-255 - * @param z - * - 0-15 + * @param x - 0-15 + * @param y - 0-255 + * @param z - 0-15 * @return Biome value */ Biome getBiome(int x, int y, int z); @@ -76,12 +71,9 @@ static TerrainChunk create(ChunkData raw, BiomeGrid grid) { /** * Set biome at x, z within chunk being generated * - * @param x - * - 0-15 - * @param z - * - 0-15 - * @param bio - * - Biome value + * @param x - 0-15 + * @param z - 0-15 + * @param bio - Biome value * @deprecated biomes are now 3-dimensional */ @Deprecated @@ -90,14 +82,10 @@ static TerrainChunk create(ChunkData raw, BiomeGrid grid) { /** * Set biome at x, z within chunk being generated * - * @param x - * - 0-15 - * @param y - * - 0-255 - * @param z - * - 0-15 - * @param bio - * - Biome value + * @param x - 0-15 + * @param y - 0-255 + * @param z - 0-15 + * @param bio - Biome value */ void setBiome(int x, int y, int z, Biome bio); @@ -115,15 +103,11 @@ static TerrainChunk create(ChunkData raw, BiomeGrid grid) { *

* Setting blocks outside the chunk's bounds does nothing. * - * @param x - * the x location in the chunk from 0-15 inclusive - * @param y - * the y location in the chunk from 0 (inclusive) - maxHeight - * (exclusive) - * @param z - * the z location in the chunk from 0-15 inclusive - * @param blockData - * the type to set the block to + * @param x the x location in the chunk from 0-15 inclusive + * @param y the y location in the chunk from 0 (inclusive) - maxHeight + * (exclusive) + * @param z the z location in the chunk from 0-15 inclusive + * @param blockData the type to set the block to */ void setBlock(int x, int y, int z, BlockData blockData); @@ -132,13 +116,10 @@ static TerrainChunk create(ChunkData raw, BiomeGrid grid) { *

* Getting blocks outside the chunk's bounds returns air. * - * @param x - * the x location in the chunk from 0-15 inclusive - * @param y - * the y location in the chunk from 0 (inclusive) - maxHeight - * (exclusive) - * @param z - * the z location in the chunk from 0-15 inclusive + * @param x the x location in the chunk from 0-15 inclusive + * @param y the y location in the chunk from 0 (inclusive) - maxHeight + * (exclusive) + * @param z the z location in the chunk from 0-15 inclusive * @return the data of the block or the BlockData for air if x, y or z are * outside the chunk's bounds */ diff --git a/src/main/java/com/volmit/iris/engine/data/io/Deserializer.java b/src/main/java/com/volmit/iris/engine/data/io/Deserializer.java index 9f03302ae..3b2dfbd7b 100644 --- a/src/main/java/com/volmit/iris/engine/data/io/Deserializer.java +++ b/src/main/java/com/volmit/iris/engine/data/io/Deserializer.java @@ -26,7 +26,7 @@ public interface Deserializer { T fromStream(InputStream stream) throws IOException; default T fromFile(File file) throws IOException { - try(BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file))) { + try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file))) { return fromStream(bis); } } @@ -37,8 +37,8 @@ default T fromBytes(byte[] data) throws IOException { } default T fromResource(Class clazz, String path) throws IOException { - try(InputStream stream = clazz.getClassLoader().getResourceAsStream(path)) { - if(stream == null) { + try (InputStream stream = clazz.getClassLoader().getResourceAsStream(path)) { + if (stream == null) { throw new IOException("resource \"" + path + "\" not found"); } return fromStream(stream); @@ -46,7 +46,7 @@ default T fromResource(Class clazz, String path) throws IOException { } default T fromURL(URL url) throws IOException { - try(InputStream stream = url.openStream()) { + try (InputStream stream = url.openStream()) { return fromStream(stream); } } diff --git a/src/main/java/com/volmit/iris/engine/data/io/MaxDepthIO.java b/src/main/java/com/volmit/iris/engine/data/io/MaxDepthIO.java index c75572cd0..5ca04f4bd 100644 --- a/src/main/java/com/volmit/iris/engine/data/io/MaxDepthIO.java +++ b/src/main/java/com/volmit/iris/engine/data/io/MaxDepthIO.java @@ -21,9 +21,9 @@ public interface MaxDepthIO { default int decrementMaxDepth(int maxDepth) { - if(maxDepth < 0) { + if (maxDepth < 0) { throw new IllegalArgumentException("negative maximum depth is not allowed"); - } else if(maxDepth == 0) { + } else if (maxDepth == 0) { throw new MaxDepthReachedException("reached maximum depth of NBT structure"); } return --maxDepth; diff --git a/src/main/java/com/volmit/iris/engine/data/io/Serializer.java b/src/main/java/com/volmit/iris/engine/data/io/Serializer.java index 3040d8075..b6e248008 100644 --- a/src/main/java/com/volmit/iris/engine/data/io/Serializer.java +++ b/src/main/java/com/volmit/iris/engine/data/io/Serializer.java @@ -25,7 +25,7 @@ public interface Serializer { void toStream(T object, OutputStream out) throws IOException; default void toFile(T object, File file) throws IOException { - try(BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file))) { + try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file))) { toStream(object, bos); } } diff --git a/src/main/java/com/volmit/iris/engine/data/io/StringDeserializer.java b/src/main/java/com/volmit/iris/engine/data/io/StringDeserializer.java index cef77db77..1cb4240a3 100644 --- a/src/main/java/com/volmit/iris/engine/data/io/StringDeserializer.java +++ b/src/main/java/com/volmit/iris/engine/data/io/StringDeserializer.java @@ -30,14 +30,14 @@ default T fromString(String s) throws IOException { @Override default T fromStream(InputStream stream) throws IOException { - try(Reader reader = new InputStreamReader(stream)) { + try (Reader reader = new InputStreamReader(stream)) { return fromReader(reader); } } @Override default T fromFile(File file) throws IOException { - try(Reader reader = new FileReader(file)) { + try (Reader reader = new FileReader(file)) { return fromReader(reader); } } diff --git a/src/main/java/com/volmit/iris/engine/data/io/StringSerializer.java b/src/main/java/com/volmit/iris/engine/data/io/StringSerializer.java index 7b7dc4f31..186b56ad0 100644 --- a/src/main/java/com/volmit/iris/engine/data/io/StringSerializer.java +++ b/src/main/java/com/volmit/iris/engine/data/io/StringSerializer.java @@ -40,7 +40,7 @@ default void toStream(T object, OutputStream stream) throws IOException { @Override default void toFile(T object, File file) throws IOException { - try(Writer writer = new FileWriter(file)) { + try (Writer writer = new FileWriter(file)) { toWriter(object, writer); } } diff --git a/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java b/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java index 199fc83ff..8aa792bff 100644 --- a/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java +++ b/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java @@ -41,49 +41,49 @@ public IrisCeilingDecorator(Engine engine) { @Override public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ, int realZ1, int realZ_1, Hunk data, IrisBiome biome, int height, int max) { IrisDecorator decorator = getDecorator(biome, realX, realZ); - if(decorator != null) { - if(!decorator.isStacking()) { - if(height >= 0 || height < getEngine().getHeight()) { + if (decorator != null) { + if (!decorator.isStacking()) { + if (height >= 0 || height < getEngine().getHeight()) { data.set(x, height, z, fixFaces(decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData()), realX, height, realZ)); } } else { int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData()); - if(decorator.isScaleStack()) { + if (decorator.isScaleStack()) { stack = Math.min((int) Math.ceil((double) max * ((double) stack / 100)), decorator.getAbsoluteMaxStack()); } else { stack = Math.min(max, stack); } - if(stack == 1) { + if (stack == 1) { data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData())); return; } - for(int i = 0; i < stack; i++) { + for (int i = 0; i < stack; i++) { int h = height - i; - if(h < getEngine().getMinHeight()) { + if (h < getEngine().getMinHeight()) { continue; } double threshold = (((double) i) / (double) (stack - 1)); BlockData bd = threshold >= decorator.getTopThreshold() ? - decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : - decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData()); + decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : + decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData()); - if(bd instanceof PointedDripstone) { + if (bd instanceof PointedDripstone) { PointedDripstone.Thickness th = PointedDripstone.Thickness.BASE; - if(stack == 2) { + if (stack == 2) { th = PointedDripstone.Thickness.FRUSTUM; - if(i == stack - 1) { + if (i == stack - 1) { th = PointedDripstone.Thickness.TIP; } } else { - if(i == stack - 1) { + if (i == stack - 1) { th = PointedDripstone.Thickness.TIP; - } else if(i == stack - 2) { + } else if (i == stack - 2) { th = PointedDripstone.Thickness.FRUSTUM; } } @@ -101,19 +101,19 @@ public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ } private BlockData fixFaces(BlockData b, int x, int y, int z) { - if(B.isVineBlock(b)) { - MultipleFacing data = (MultipleFacing)b.clone(); + if (B.isVineBlock(b)) { + MultipleFacing data = (MultipleFacing) b.clone(); boolean found = false; - for(BlockFace f : BlockFace.values()) { - if(!f.isCartesian()) + for (BlockFace f : BlockFace.values()) { + if (!f.isCartesian()) continue; Material m = getEngine().getMantle().get(x + f.getModX(), y + f.getModY(), z + f.getModZ()).getMaterial(); - if(m.isSolid()) { + if (m.isSolid()) { found = true; data.setFace(f, m.isSolid()); } } - if(!found) + if (!found) data.setFace(BlockFace.UP, true); return data; } diff --git a/src/main/java/com/volmit/iris/engine/decorator/IrisEngineDecorator.java b/src/main/java/com/volmit/iris/engine/decorator/IrisEngineDecorator.java index 1208a546d..b41e6522b 100644 --- a/src/main/java/com/volmit/iris/engine/decorator/IrisEngineDecorator.java +++ b/src/main/java/com/volmit/iris/engine/decorator/IrisEngineDecorator.java @@ -48,18 +48,18 @@ protected IrisDecorator getDecorator(IrisBiome biome, double realX, double realZ KList v = new KList<>(); RNG rng = new RNG(Cache.key((int) realX, (int) realZ)); - for(IrisDecorator i : biome.getDecorators()) { + for (IrisDecorator i : biome.getDecorators()) { try { - if(i.getPartOf().equals(part) && i.getBlockData(biome, this.rng, realX, realZ, getData()) != null) { + if (i.getPartOf().equals(part) && i.getBlockData(biome, this.rng, realX, realZ, getData()) != null) { v.add(i); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("PART OF: " + biome.getLoadFile().getAbsolutePath() + " HAS AN INVALID DECORATOR near 'partOf'!!!"); } } - if(v.isNotEmpty()) { + if (v.isNotEmpty()) { return v.get(rng.nextInt(v.size())); } diff --git a/src/main/java/com/volmit/iris/engine/decorator/IrisSeaFloorDecorator.java b/src/main/java/com/volmit/iris/engine/decorator/IrisSeaFloorDecorator.java index 07cdeac7e..d8e22aae3 100644 --- a/src/main/java/com/volmit/iris/engine/decorator/IrisSeaFloorDecorator.java +++ b/src/main/java/com/volmit/iris/engine/decorator/IrisSeaFloorDecorator.java @@ -37,33 +37,33 @@ public IrisSeaFloorDecorator(Engine engine) { public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ, int realZ1, int realZ_1, Hunk data, IrisBiome biome, int height, int max) { IrisDecorator decorator = getDecorator(biome, realX, realZ); - if(decorator != null) { - if(!decorator.isStacking()) { - if(height >= 0 || height < getEngine().getHeight()) { + if (decorator != null) { + if (!decorator.isStacking()) { + if (height >= 0 || height < getEngine().getHeight()) { data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData())); } } else { int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData()); - if(decorator.isScaleStack()) { + if (decorator.isScaleStack()) { int maxStack = max - height; stack = (int) Math.ceil((double) maxStack * ((double) stack / 100)); } else stack = Math.min(stack, max - height); - if(stack == 1) { + if (stack == 1) { data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData())); return; } - for(int i = 0; i < stack; i++) { + for (int i = 0; i < stack; i++) { int h = height + i; - if(h > max || h > getEngine().getHeight()) { + if (h > max || h > getEngine().getHeight()) { continue; } double threshold = ((double) i) / (stack - 1); data.set(x, h, z, threshold >= decorator.getTopThreshold() ? - decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : - decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData())); + decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : + decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData())); } } } diff --git a/src/main/java/com/volmit/iris/engine/decorator/IrisSeaSurfaceDecorator.java b/src/main/java/com/volmit/iris/engine/decorator/IrisSeaSurfaceDecorator.java index 618b2c3e0..8bf9b6e49 100644 --- a/src/main/java/com/volmit/iris/engine/decorator/IrisSeaSurfaceDecorator.java +++ b/src/main/java/com/volmit/iris/engine/decorator/IrisSeaSurfaceDecorator.java @@ -37,33 +37,33 @@ public IrisSeaSurfaceDecorator(Engine engine) { public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ, int realZ1, int realZ_1, Hunk data, IrisBiome biome, int height, int max) { IrisDecorator decorator = getDecorator(biome, realX, realZ); - if(decorator != null) { - if(!decorator.isStacking()) { - if(height >= 0 || height < getEngine().getHeight()) { + if (decorator != null) { + if (!decorator.isStacking()) { + if (height >= 0 || height < getEngine().getHeight()) { data.set(x, height + 1, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData())); } } else { int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData()); - if(decorator.isScaleStack()) { + if (decorator.isScaleStack()) { int maxStack = max - height; stack = (int) Math.ceil((double) maxStack * ((double) stack / 100)); } - if(stack == 1) { + if (stack == 1) { data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData())); return; } - for(int i = 0; i < stack; i++) { + for (int i = 0; i < stack; i++) { int h = height + i; - if(h >= max || h >= getEngine().getHeight()) { + if (h >= max || h >= getEngine().getHeight()) { continue; } double threshold = ((double) i) / (stack - 1); data.set(x, h + 1, z, threshold >= decorator.getTopThreshold() ? - decorator.getBlockDataForTop(biome, getRng().nextParallelRNG(i), realX, h, realZ, getData()) : - decorator.getBlockData100(biome, getRng().nextParallelRNG(i), realX, h, realZ, getData())); + decorator.getBlockDataForTop(biome, getRng().nextParallelRNG(i), realX, h, realZ, getData()) : + decorator.getBlockData100(biome, getRng().nextParallelRNG(i), realX, h, realZ, getData())); } } } diff --git a/src/main/java/com/volmit/iris/engine/decorator/IrisShoreLineDecorator.java b/src/main/java/com/volmit/iris/engine/decorator/IrisShoreLineDecorator.java index c155c1b2a..a51f2791f 100644 --- a/src/main/java/com/volmit/iris/engine/decorator/IrisShoreLineDecorator.java +++ b/src/main/java/com/volmit/iris/engine/decorator/IrisShoreLineDecorator.java @@ -36,35 +36,35 @@ public IrisShoreLineDecorator(Engine engine) { @Override public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ, int realZ1, int realZ_1, Hunk data, IrisBiome biome, int height, int max) { - if(height == getDimension().getFluidHeight()) { - if(Math.round(getComplex().getHeightStream().get(realX1, realZ)) < getComplex().getFluidHeight() || - Math.round(getComplex().getHeightStream().get(realX_1, realZ)) < getComplex().getFluidHeight() || - Math.round(getComplex().getHeightStream().get(realX, realZ1)) < getComplex().getFluidHeight() || - Math.round(getComplex().getHeightStream().get(realX, realZ_1)) < getComplex().getFluidHeight() + if (height == getDimension().getFluidHeight()) { + if (Math.round(getComplex().getHeightStream().get(realX1, realZ)) < getComplex().getFluidHeight() || + Math.round(getComplex().getHeightStream().get(realX_1, realZ)) < getComplex().getFluidHeight() || + Math.round(getComplex().getHeightStream().get(realX, realZ1)) < getComplex().getFluidHeight() || + Math.round(getComplex().getHeightStream().get(realX, realZ_1)) < getComplex().getFluidHeight() ) { IrisDecorator decorator = getDecorator(biome, realX, realZ); - if(decorator != null) { - if(!decorator.isStacking()) { + if (decorator != null) { + if (!decorator.isStacking()) { data.set(x, height + 1, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData())); } else { int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData()); - if(decorator.isScaleStack()) { + if (decorator.isScaleStack()) { int maxStack = max - height; stack = (int) Math.ceil((double) maxStack * ((double) stack / 100)); } else stack = Math.min(max - height, stack); - if(stack == 1) { + if (stack == 1) { data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData())); return; } - for(int i = 0; i < stack; i++) { + for (int i = 0; i < stack; i++) { int h = height + i; double threshold = ((double) i) / (stack - 1); data.set(x, h + 1, z, threshold >= decorator.getTopThreshold() ? - decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : - decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData())); + decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : + decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData())); } } } diff --git a/src/main/java/com/volmit/iris/engine/decorator/IrisSurfaceDecorator.java b/src/main/java/com/volmit/iris/engine/decorator/IrisSurfaceDecorator.java index a7b1143fa..fce2e413c 100644 --- a/src/main/java/com/volmit/iris/engine/decorator/IrisSurfaceDecorator.java +++ b/src/main/java/com/volmit/iris/engine/decorator/IrisSurfaceDecorator.java @@ -43,7 +43,7 @@ public IrisSurfaceDecorator(Engine engine) { @BlockCoordinates @Override public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ, int realZ1, int realZ_1, Hunk data, IrisBiome biome, int height, int max) { - if(biome.getInferredType().equals(InferredType.SHORE) && height < getDimension().getFluidHeight()) { + if (biome.getInferredType().equals(InferredType.SHORE) && height < getDimension().getFluidHeight()) { return; } @@ -52,92 +52,92 @@ public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ bdx = data.get(x, height, z); boolean underwater = height < getDimension().getFluidHeight(); - if(decorator != null) { - if(!decorator.isStacking()) { + if (decorator != null) { + if (!decorator.isStacking()) { bd = decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData()); - if(!underwater) { - if(!canGoOn(bd, bdx) && (!decorator.isForcePlace() && decorator.getForceBlock() == null) ) { + if (!underwater) { + if (!canGoOn(bd, bdx) && (!decorator.isForcePlace() && decorator.getForceBlock() == null)) { return; } } - if(decorator.getForceBlock() != null) { + if (decorator.getForceBlock() != null) { data.set(x, height, z, fixFaces(decorator.getForceBlock().getBlockData(getData()), x, height, z)); - } else if(!decorator.isForcePlace()) { - if(decorator.getWhitelist() != null && decorator.getWhitelist().stream().noneMatch(d -> d.getBlockData(getData()).equals(bdx))) { + } else if (!decorator.isForcePlace()) { + if (decorator.getWhitelist() != null && decorator.getWhitelist().stream().noneMatch(d -> d.getBlockData(getData()).equals(bdx))) { return; } - if(decorator.getBlacklist() != null && decorator.getWhitelist().stream().anyMatch(d -> d.getBlockData(getData()).equals(bdx))) { + if (decorator.getBlacklist() != null && decorator.getWhitelist().stream().anyMatch(d -> d.getBlockData(getData()).equals(bdx))) { return; } } - if(bd instanceof Bisected) { + if (bd instanceof Bisected) { bd = bd.clone(); ((Bisected) bd).setHalf(Bisected.Half.TOP); try { data.set(x, height + 2, z, bd); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } bd = bd.clone(); ((Bisected) bd).setHalf(Bisected.Half.BOTTOM); } - if(B.isAir(data.get(x, height + 1, z))) { + if (B.isAir(data.get(x, height + 1, z))) { data.set(x, height + 1, z, fixFaces(bd, x, height + 1, z)); } } else { - if(height < getDimension().getFluidHeight()) { + if (height < getDimension().getFluidHeight()) { max = getDimension().getFluidHeight(); } int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData()); - if(decorator.isScaleStack()) { + if (decorator.isScaleStack()) { stack = Math.min((int) Math.ceil((double) max * ((double) stack / 100)), decorator.getAbsoluteMaxStack()); } else { stack = Math.min(max, stack); } - if(stack == 1) { + if (stack == 1) { data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData())); return; } - for(int i = 0; i < stack; i++) { + for (int i = 0; i < stack; i++) { int h = height + i; double threshold = ((double) i) / (stack - 1); bd = threshold >= decorator.getTopThreshold() ? - decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : - decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData()); + decorator.getBlockDataForTop(biome, getRng(), realX, h, realZ, getData()) : + decorator.getBlockData100(biome, getRng(), realX, h, realZ, getData()); - if(bd == null) { + if (bd == null) { break; } - if(i == 0 && !underwater && !canGoOn(bd, bdx)) { + if (i == 0 && !underwater && !canGoOn(bd, bdx)) { break; } - if(underwater && height + 1 + i > getDimension().getFluidHeight()) { + if (underwater && height + 1 + i > getDimension().getFluidHeight()) { break; } - if(bd instanceof PointedDripstone) { + if (bd instanceof PointedDripstone) { PointedDripstone.Thickness th = PointedDripstone.Thickness.BASE; - if(stack == 2) { + if (stack == 2) { th = PointedDripstone.Thickness.FRUSTUM; - if(i == stack - 1) { + if (i == stack - 1) { th = PointedDripstone.Thickness.TIP; } } else { - if(i == stack - 1) { + if (i == stack - 1) { th = PointedDripstone.Thickness.TIP; - } else if(i == stack - 2) { + } else if (i == stack - 2) { th = PointedDripstone.Thickness.FRUSTUM; } } @@ -155,19 +155,19 @@ public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ } private BlockData fixFaces(BlockData b, int x, int y, int z) { - if(B.isVineBlock(b)) { - MultipleFacing data = (MultipleFacing)b.clone(); + if (B.isVineBlock(b)) { + MultipleFacing data = (MultipleFacing) b.clone(); boolean found = false; - for(BlockFace f : BlockFace.values()) { - if(!f.isCartesian()) + for (BlockFace f : BlockFace.values()) { + if (!f.isCartesian()) continue; Material m = getEngine().getMantle().get(x + f.getModX(), y + f.getModY(), z + f.getModZ()).getMaterial(); - if(m.isSolid()) { + if (m.isSolid()) { found = true; data.setFace(f, m.isSolid()); } } - if(!found) + if (!found) data.setFace(BlockFace.UP, true); return data; } diff --git a/src/main/java/com/volmit/iris/engine/framework/Engine.java b/src/main/java/com/volmit/iris/engine/framework/Engine.java index e82ea5b6c..794c7ec6f 100644 --- a/src/main/java/com/volmit/iris/engine/framework/Engine.java +++ b/src/main/java/com/volmit/iris/engine/framework/Engine.java @@ -24,7 +24,6 @@ import com.volmit.iris.core.gui.components.Renderer; import com.volmit.iris.core.loader.IrisData; import com.volmit.iris.core.loader.IrisRegistrant; -import com.volmit.iris.core.service.DolphinSVC; import com.volmit.iris.engine.IrisComplex; import com.volmit.iris.engine.data.cache.Cache; import com.volmit.iris.engine.data.chunk.TerrainChunk; @@ -68,7 +67,6 @@ import org.bukkit.block.data.BlockData; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import org.bukkit.generator.structure.StructureType; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; @@ -205,10 +203,10 @@ default IrisRegion getRegion(int x, int z) { default IrisBiome getCaveOrMantleBiome(int x, int y, int z) { MatterCavern m = getMantle().getMantle().get(x, y, z, MatterCavern.class); - if(m != null && m.getCustomBiome() != null && !m.getCustomBiome().isEmpty()) { + if (m != null && m.getCustomBiome() != null && !m.getCustomBiome().isEmpty()) { IrisBiome biome = getData().getBiomeLoader().load(m.getCustomBiome()); - if(biome != null) { + if (biome != null) { return biome; } } @@ -248,11 +246,11 @@ default int getHeight(int x, int z, boolean ignoreFluid) { @BlockCoordinates @Override default void catchBlockUpdates(int x, int y, int z, BlockData data) { - if(data == null) { + if (data == null) { return; } - if(B.isUpdatable(data)) { + if (B.isUpdatable(data)) { getMantle().updateBlock(x, y, z); } } @@ -262,20 +260,20 @@ default void catchBlockUpdates(int x, int y, int z, BlockData data) { @ChunkCoordinates @Override default void updateChunk(Chunk c) { - if(c.getWorld().isChunkLoaded(c.getX() + 1, c.getZ() + 1) - && c.getWorld().isChunkLoaded(c.getX(), c.getZ() + 1) - && c.getWorld().isChunkLoaded(c.getX() + 1, c.getZ()) - && c.getWorld().isChunkLoaded(c.getX() - 1, c.getZ() - 1) - && c.getWorld().isChunkLoaded(c.getX(), c.getZ() - 1) - && c.getWorld().isChunkLoaded(c.getX() - 1, c.getZ()) - && c.getWorld().isChunkLoaded(c.getX() + 1, c.getZ() - 1) - && c.getWorld().isChunkLoaded(c.getX() - 1, c.getZ() + 1) && getMantle().getMantle().isLoaded(c)) { + if (c.getWorld().isChunkLoaded(c.getX() + 1, c.getZ() + 1) + && c.getWorld().isChunkLoaded(c.getX(), c.getZ() + 1) + && c.getWorld().isChunkLoaded(c.getX() + 1, c.getZ()) + && c.getWorld().isChunkLoaded(c.getX() - 1, c.getZ() - 1) + && c.getWorld().isChunkLoaded(c.getX(), c.getZ() - 1) + && c.getWorld().isChunkLoaded(c.getX() - 1, c.getZ()) + && c.getWorld().isChunkLoaded(c.getX() + 1, c.getZ() - 1) + && c.getWorld().isChunkLoaded(c.getX() - 1, c.getZ() + 1) && getMantle().getMantle().isLoaded(c)) { getMantle().getMantle().raiseFlag(c.getX(), c.getZ(), MantleFlag.TILE, () -> J.s(() -> { getMantle().getMantle().iterateChunk(c.getX(), c.getZ(), TileWrapper.class, (x, y, z, tile) -> { int betterY = y + getWorld().minHeight(); - if(!TileData.setTileState(c.getBlock(x, betterY, z), tile.getData())) - Iris.warn("Failed to set tile entity data at [%d %d %d | %s] for tile %s!", x, betterY ,z, c.getBlock(x, betterY, z).getBlockData().getMaterial().getKey(), tile.getData().getTileId()); + if (!TileData.setTileState(c.getBlock(x, betterY, z), tile.getData())) + Iris.warn("Failed to set tile entity data at [%d %d %d | %s] for tile %s!", x, betterY, z, c.getBlock(x, betterY, z).getBlockData().getMaterial().getKey(), tile.getData().getTileId()); }); })); @@ -285,25 +283,25 @@ default void updateChunk(Chunk c) { RNG r = new RNG(Cache.key(c.getX(), c.getZ())); getMantle().getMantle().iterateChunk(c.getX(), c.getZ(), MatterCavern.class, (x, yf, z, v) -> { int y = yf + getWorld().minHeight(); - if(!B.isFluid(c.getBlock(x & 15, y, z & 15).getBlockData())) { + if (!B.isFluid(c.getBlock(x & 15, y, z & 15).getBlockData())) { return; } boolean u = false; - if(B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.DOWN).getBlockData())) { + if (B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.DOWN).getBlockData())) { u = true; - } else if(B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.WEST).getBlockData())) { + } else if (B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.WEST).getBlockData())) { u = true; - } else if(B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.EAST).getBlockData())) { + } else if (B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.EAST).getBlockData())) { u = true; - } else if(B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.SOUTH).getBlockData())) { + } else if (B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.SOUTH).getBlockData())) { u = true; - } else if(B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.NORTH).getBlockData())) { + } else if (B.isAir(c.getBlock(x & 15, y, z & 15).getRelative(BlockFace.NORTH).getBlockData())) { u = true; } - if(u) { + if (u) { updates.compute(Cache.key(x & 15, z & 15), (k, vv) -> { - if(vv != null) { + if (vv != null) { return Math.max(vv, y); } @@ -315,11 +313,11 @@ default void updateChunk(Chunk c) { updates.forEach((k, v) -> update(Cache.keyX(k), v, Cache.keyZ(k), c, r)); getMantle().getMantle().iterateChunk(c.getX(), c.getZ(), MatterUpdate.class, (x, yf, z, v) -> { int y = yf + getWorld().minHeight(); - if(v != null && v.isUpdate()) { + if (v != null && v.isUpdate()) { int vx = x & 15; int vz = z & 15; update(x, y, z, c, new RNG(Cache.key(c.getX(), c.getZ()))); - if(vx > 0 && vx < 15 && vz > 0 && vz < 15) { + if (vx > 0 && vx < 15 && vz > 0 && vz < 15) { updateLighting(x, y, z, c); } } @@ -335,11 +333,11 @@ default void updateLighting(int x, int y, int z, Chunk c) { Block block = c.getBlock(x, y, z); BlockData data = block.getBlockData(); - if(B.isLit(data)) { + if (B.isLit(data)) { try { block.setType(Material.AIR, false); block.setBlockData(data, true); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); } } @@ -351,21 +349,21 @@ default void update(int x, int y, int z, Chunk c, RNG rf) { Block block = c.getBlock(x, y, z); BlockData data = block.getBlockData(); blockUpdatedMetric(); - if(B.isStorage(data)) { + if (B.isStorage(data)) { RNG rx = rf.nextParallelRNG(BlockPosition.toLong(x, y, z)); InventorySlotType slot = null; - if(B.isStorageChest(data)) { + if (B.isStorageChest(data)) { slot = InventorySlotType.STORAGE; } - if(slot != null) { + if (slot != null) { KList tables = getLootTables(rx, block); try { InventoryHolder m = (InventoryHolder) block.getState(); addItems(false, m.getInventory(), rx, tables, slot, x, y, z, 15); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } } @@ -383,12 +381,12 @@ default void scramble(Inventory inventory, RNG rng) { boolean packedFull = false; splitting: - for(int i = 0; i < nitems.length; i++) { + for (int i = 0; i < nitems.length; i++) { ItemStack is = nitems[i]; - if(is != null && is.getAmount() > 1 && !packedFull) { - for(int j = 0; j < nitems.length; j++) { - if(nitems[j] == null) { + if (is != null && is.getAmount() > 1 && !packedFull) { + for (int j = 0; j < nitems.length; j++) { + if (nitems[j] == null) { int take = rng.nextInt(is.getAmount()); take = take == 0 ? 1 : take; is.setAmount(is.getAmount() - take); @@ -402,11 +400,11 @@ default void scramble(Inventory inventory, RNG rng) { } } - for(int i = 0; i < 4; i++) { + for (int i = 0; i < 4; i++) { try { Arrays.parallelSort(nitems, (a, b) -> rng.nextInt()); break; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -417,7 +415,7 @@ default void scramble(Inventory inventory, RNG rng) { @Override default void injectTables(KList list, IrisLootReference r) { - if(r.getMode().equals(IrisLootMode.CLEAR) || r.getMode().equals(IrisLootMode.REPLACE)) { + if (r.getMode().equals(IrisLootMode.CLEAR) || r.getMode().equals(IrisLootMode.REPLACE)) { list.clear(); } @@ -434,12 +432,12 @@ default KList getLootTables(RNG rng, Block b) { KList tables = new KList<>(); PlacedObject po = getObjectPlacement(rx, ry, rz); - if(po != null && po.getPlacement() != null) { - if(B.isStorageChest(b.getBlockData())) { + if (po != null && po.getPlacement() != null) { + if (B.isStorageChest(b.getBlockData())) { IrisLootTable table = po.getPlacement().getTable(b.getBlockData(), getData()); - if(table != null) { + if (table != null) { tables.add(table); - if(po.getPlacement().isOverrideGlobalLoot()) { + if (po.getPlacement().isOverrideGlobalLoot()) { return new KList<>(table); } } @@ -456,14 +454,14 @@ default KList getLootTables(RNG rng, Block b) { injectTables(tables, biomeSurface.getLoot()); injectTables(tables, biomeUnder.getLoot()); - if(tables.isNotEmpty()) { + if (tables.isNotEmpty()) { int target = (int) Math.round(tables.size() * multiplier); - while(tables.size() < target && tables.isNotEmpty()) { + while (tables.size() < target && tables.isNotEmpty()) { tables.add(tables.get(rng.i(tables.size() - 1))); } - while(tables.size() > target && tables.isNotEmpty()) { + while (tables.size() > target && tables.isNotEmpty()) { tables.remove(rng.i(tables.size() - 1)); } } @@ -476,31 +474,31 @@ default void addItems(boolean debug, Inventory inv, RNG rng, KList items = new KList<>(); int b = 4; - for(IrisLootTable i : tables) { - if(i == null) + for (IrisLootTable i : tables) { + if (i == null) continue; b++; items.addAll(i.getLoot(debug, rng, slot, x, y, z)); } - if(PaperLib.isPaper() && getWorld().hasRealWorld()) { + if (PaperLib.isPaper() && getWorld().hasRealWorld()) { PaperLib.getChunkAtAsync(getWorld().realWorld(), x >> 4, z >> 4).thenAccept((c) -> { Runnable r = () -> { - for(ItemStack i : items) { + for (ItemStack i : items) { inv.addItem(i); } scramble(inv, rng); }; - if(Bukkit.isPrimaryThread()) { + if (Bukkit.isPrimaryThread()) { r.run(); } else { J.s(r); } }); } else { - for(ItemStack i : items) { + for (ItemStack i : items) { inv.addItem(i); } @@ -520,7 +518,7 @@ default void clean() { @BlockCoordinates default IrisBiome getBiome(Location l) { - return getBiome(l.getBlockX(), l.getBlockY() - getWorld().minHeight() , l.getBlockZ()); + return getBiome(l.getBlockX(), l.getBlockY() - getWorld().minHeight(), l.getBlockZ()); } @BlockCoordinates @@ -560,17 +558,17 @@ default IrisPosition lookForStreamResult(T find, ProceduralStream stream, AtomicReference r = new AtomicReference<>(); BurstExecutor b = burst().burst(); - while(M.ms() - time.get() < timeout && r.get() == null) { + while (M.ms() - time.get() < timeout && r.get() == null) { b.queue(() -> { - for(int i = 0; i < 1000; i++) { - if(M.ms() - time.get() > timeout) { + for (int i = 0; i < 1000; i++) { + if (M.ms() - time.get() > timeout) { return; } int x = RNG.r.i(-29999970, 29999970); int z = RNG.r.i(-29999970, 29999970); checked.incrementAndGet(); - if(matcher.apply(stream.get(x, z), find)) { + if (matcher.apply(stream.get(x, z), find)) { r.set(new IrisPosition(x, 120, z)); time.set(0); } @@ -582,7 +580,7 @@ default IrisPosition lookForStreamResult(T find, ProceduralStream stream, } default IrisPosition lookForBiome(IrisBiome biome, long timeout, Consumer triesc) { - if(!getWorld().hasRealWorld()) { + if (!getWorld().hasRealWorld()) { Iris.error("Cannot GOTO without a bound world (headless mode)"); return null; } @@ -591,7 +589,7 @@ default IrisPosition lookForBiome(IrisBiome biome, long timeout, Consumer location = new AtomicReference<>(); - for(int i = 0; i < cpus; i++) { + for (int i = 0; i < cpus; i++) { J.a(() -> { try { Engine e; IrisBiome b; int x, z; - while(!found.get() && running.get()) { + while (!found.get() && running.get()) { try { x = RNG.r.i(-29999970, 29999970); z = RNG.r.i(-29999970, 29999970); b = getSurfaceBiome(x, z); - if(b != null && b.getLoadKey() == null) { + if (b != null && b.getLoadKey() == null) { continue; } - if(b != null && b.getLoadKey().equals(biome.getLoadKey())) { + if (b != null && b.getLoadKey().equals(biome.getLoadKey())) { found.lazySet(true); location.lazySet(new IrisPosition(x, getHeight(x, z), z)); } tries.getAndIncrement(); - } catch(Throwable ex) { + } catch (Throwable ex) { Iris.reportError(ex); ex.printStackTrace(); return; } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } }); } - while(!found.get() || location.get() == null) { + while (!found.get() || location.get() == null) { J.sleep(50); - if(cl.flip()) { + if (cl.flip()) { triesc.accept(tries.get()); } - if(M.ms() - s > timeout) { + if (M.ms() - s > timeout) { running.set(false); return null; } @@ -653,7 +651,7 @@ default IrisPosition lookForBiome(IrisBiome biome, long timeout, Consumer triesc) { - if(getWorld().hasRealWorld()) { + if (getWorld().hasRealWorld()) { Iris.error("Cannot GOTO without a bound world (headless mode)"); return null; } @@ -662,7 +660,7 @@ default IrisPosition lookForRegion(IrisRegion reg, long timeout, Consumer location = new AtomicReference<>(); - for(int i = 0; i < cpus; i++) { + for (int i = 0; i < cpus; i++) { J.a(() -> { Engine e; IrisRegion b; int x, z; - while(!found.get() && running.get()) { + while (!found.get() && running.get()) { try { x = RNG.r.i(-29999970, 29999970); z = RNG.r.i(-29999970, 29999970); b = getRegion(x, z); - if(b != null && b.getLoadKey() != null && b.getLoadKey().equals(reg.getLoadKey())) { + if (b != null && b.getLoadKey() != null && b.getLoadKey().equals(reg.getLoadKey())) { found.lazySet(true); location.lazySet(new IrisPosition(x, getHeight(x, z), z)); } tries.getAndIncrement(); - } catch(Throwable xe) { + } catch (Throwable xe) { Iris.reportError(xe); xe.printStackTrace(); return; @@ -698,14 +696,14 @@ default IrisPosition lookForRegion(IrisRegion reg, long timeout, Consumer timeout) { + if (M.ms() - s > timeout) { triesc.accept(tries.get()); running.set(false); return null; @@ -726,7 +724,7 @@ default int getHeight() { boolean isStudio(); default IrisBiome getBiome(int x, int y, int z) { - if(y <= getHeight(x, z) - 2) { + if (y <= getHeight(x, z) - 2) { return getCaveBiome(x, z); } @@ -734,7 +732,7 @@ default IrisBiome getBiome(int x, int y, int z) { } default IrisBiome getBiomeOrMantle(int x, int y, int z) { - if(y <= getHeight(x, z) - 2) { + if (y <= getHeight(x, z) - 2) { return getCaveOrMantleBiome(x, y, z); } @@ -744,7 +742,7 @@ default IrisBiome getBiomeOrMantle(int x, int y, int z) { default String getObjectPlacementKey(int x, int y, int z) { PlacedObject o = getObjectPlacement(x, y, z); - if(o != null && o.getObject() != null) { + if (o != null && o.getObject() != null) { return o.getObject().getLoadKey() + "@" + o.getId(); } @@ -753,7 +751,7 @@ default String getObjectPlacementKey(int x, int y, int z) { default PlacedObject getObjectPlacement(int x, int y, int z) { String objectAt = getMantle().getMantle().get(x, y, z, String.class); - if(objectAt == null || objectAt.isEmpty()) { + if (objectAt == null || objectAt.isEmpty()) { return null; } @@ -762,16 +760,16 @@ default PlacedObject getObjectPlacement(int x, int y, int z) { int id = Integer.parseInt(v[1]); IrisRegion region = getRegion(x, z); - for(IrisObjectPlacement i : region.getObjects()) { - if(i.getPlace().contains(object)) { + for (IrisObjectPlacement i : region.getObjects()) { + if (i.getPlace().contains(object)) { return new PlacedObject(i, getData().getObjectLoader().load(object), id, x, z); } } IrisBiome biome = getBiome(x, y, z); - for(IrisObjectPlacement i : biome.getObjects()) { - if(i.getPlace().contains(object)) { + for (IrisObjectPlacement i : biome.getObjects()) { + if (i.getPlace().contains(object)) { return new PlacedObject(i, getData().getObjectLoader().load(object), id, x, z); } } @@ -788,16 +786,16 @@ default IrisBiome getBiomeOrMantle(Location l) { default void gotoBiome(IrisBiome biome, Player player) { Set regionKeys = getDimension() - .getAllRegions(this).stream() - .filter((i) -> i.getAllBiomes(this).contains(biome)) - .map(IrisRegistrant::getLoadKey) - .collect(Collectors.toSet()); + .getAllRegions(this).stream() + .filter((i) -> i.getAllBiomes(this).contains(biome)) + .map(IrisRegistrant::getLoadKey) + .collect(Collectors.toSet()); Locator lb = Locator.surfaceBiome(biome.getLoadKey()); Locator locator = (engine, chunk) - -> regionKeys.contains(getRegion((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey()) - && lb.matches(engine, chunk); + -> regionKeys.contains(getRegion((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey()) + && lb.matches(engine, chunk); - if(!regionKeys.isEmpty()) { + if (!regionKeys.isEmpty()) { locator.find(player); } else { player.sendMessage(C.RED + biome.getName() + " is not in any defined regions!"); @@ -805,10 +803,10 @@ default void gotoBiome(IrisBiome biome, Player player) { } default void gotoJigsaw(IrisJigsawStructure s, Player player) { - if(s.getLoadKey().equals(getDimension().getStronghold())) { + if (s.getLoadKey().equals(getDimension().getStronghold())) { KList p = getDimension().getStrongholds(getSeedManager().getSpawn()); - if(p.isEmpty()) { + if (p.isEmpty()) { player.sendMessage(C.GOLD + "No strongholds in world."); } @@ -818,19 +816,19 @@ default void gotoJigsaw(IrisJigsawStructure s, Player player) { Iris.debug("Ps: " + p.size()); - for(Position2 i : p) { + for (Position2 i : p) { Iris.debug("- " + i.getX() + " " + i.getZ()); } - for(Position2 i : p) { + for (Position2 i : p) { double dx = i.distance(px); - if(dx < d) { + if (dx < d) { d = dx; pr = i; } } - if(pr != null) { + if (pr != null) { Location ll = new Location(player.getWorld(), pr.getX(), 40, pr.getZ()); J.s(() -> player.teleport(ll)); } @@ -838,36 +836,36 @@ default void gotoJigsaw(IrisJigsawStructure s, Player player) { return; } - if(getDimension().getJigsawStructures().stream() - .map(IrisJigsawStructurePlacement::getStructure) - .collect(Collectors.toSet()).contains(s.getLoadKey())) { + if (getDimension().getJigsawStructures().stream() + .map(IrisJigsawStructurePlacement::getStructure) + .collect(Collectors.toSet()).contains(s.getLoadKey())) { Locator.jigsawStructure(s.getLoadKey()).find(player); } else { Set biomeKeys = getDimension().getAllBiomes(this).stream() - .filter((i) -> i.getJigsawStructures() - .stream() - .anyMatch((j) -> j.getStructure().equals(s.getLoadKey()))) - .map(IrisRegistrant::getLoadKey) - .collect(Collectors.toSet()); + .filter((i) -> i.getJigsawStructures() + .stream() + .anyMatch((j) -> j.getStructure().equals(s.getLoadKey()))) + .map(IrisRegistrant::getLoadKey) + .collect(Collectors.toSet()); Set regionKeys = getDimension().getAllRegions(this).stream() - .filter((i) -> i.getAllBiomeIds().stream().anyMatch(biomeKeys::contains) - || i.getJigsawStructures() - .stream() - .anyMatch((j) -> j.getStructure().equals(s.getLoadKey()))) - .map(IrisRegistrant::getLoadKey) - .collect(Collectors.toSet()); + .filter((i) -> i.getAllBiomeIds().stream().anyMatch(biomeKeys::contains) + || i.getJigsawStructures() + .stream() + .anyMatch((j) -> j.getStructure().equals(s.getLoadKey()))) + .map(IrisRegistrant::getLoadKey) + .collect(Collectors.toSet()); Locator sl = Locator.jigsawStructure(s.getLoadKey()); Locator locator = (engine, chunk) -> { - if(biomeKeys.contains(getSurfaceBiome((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { + if (biomeKeys.contains(getSurfaceBiome((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { return sl.matches(engine, chunk); - } else if(regionKeys.contains(getRegion((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { + } else if (regionKeys.contains(getRegion((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { return sl.matches(engine, chunk); } return false; }; - if(!regionKeys.isEmpty()) { + if (!regionKeys.isEmpty()) { locator.find(player); } else { player.sendMessage(C.RED + s.getLoadKey() + " is not in any defined regions, biomes or dimensions!"); @@ -878,27 +876,27 @@ default void gotoJigsaw(IrisJigsawStructure s, Player player) { default void gotoObject(String s, Player player) { Set biomeKeys = getDimension().getAllBiomes(this).stream() - .filter((i) -> i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s))) - .map(IrisRegistrant::getLoadKey) - .collect(Collectors.toSet()); + .filter((i) -> i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s))) + .map(IrisRegistrant::getLoadKey) + .collect(Collectors.toSet()); Set regionKeys = getDimension().getAllRegions(this).stream() - .filter((i) -> i.getAllBiomeIds().stream().anyMatch(biomeKeys::contains) - || i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s))) - .map(IrisRegistrant::getLoadKey) - .collect(Collectors.toSet()); + .filter((i) -> i.getAllBiomeIds().stream().anyMatch(biomeKeys::contains) + || i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s))) + .map(IrisRegistrant::getLoadKey) + .collect(Collectors.toSet()); Locator sl = Locator.object(s); Locator locator = (engine, chunk) -> { - if(biomeKeys.contains(getSurfaceBiome((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { + if (biomeKeys.contains(getSurfaceBiome((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { return sl.matches(engine, chunk); - } else if(regionKeys.contains(getRegion((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { + } else if (regionKeys.contains(getRegion((chunk.getX() << 4) + 8, (chunk.getZ() << 4) + 8).getLoadKey())) { return sl.matches(engine, chunk); } return false; }; - if(!regionKeys.isEmpty()) { + if (!regionKeys.isEmpty()) { locator.find(player); } else { player.sendMessage(C.RED + s + " is not in any defined regions or biomes!"); @@ -906,7 +904,7 @@ default void gotoObject(String s, Player player) { } default void gotoRegion(IrisRegion r, Player player) { - if(!getDimension().getAllRegions(this).contains(r)) { + if (!getDimension().getAllRegions(this).contains(r)) { player.sendMessage(C.RED + r.getName() + " is not defined in the dimension!"); return; } @@ -919,7 +917,7 @@ default void gotoPOI(String type, Player p) { } default void cleanupMantleChunk(int x, int z) { - if(IrisSettings.get().getPerformance().isTrimMantleInStudio() || !isStudio()) { + if (IrisSettings.get().getPerformance().isTrimMantleInStudio() || !isStudio()) { J.a(() -> getMantle().cleanupChunk(x, z)); } } diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineAssignedModifier.java b/src/main/java/com/volmit/iris/engine/framework/EngineAssignedModifier.java index 71975dff0..b3a83e53e 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineAssignedModifier.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineAssignedModifier.java @@ -36,7 +36,7 @@ public EngineAssignedModifier(Engine engine, String name) { public void modify(int x, int z, Hunk output, boolean multicore, ChunkContext context) { try { onModify(x, z, output, multicore, context); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("Modifier Failure: " + getName()); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java b/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java index 5ddb2d903..92301892b 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java @@ -42,6 +42,7 @@ public abstract class EngineAssignedWorldManager extends EngineAssignedComponent implements EngineWorldManager, Listener { private final int taskId; + protected AtomicBoolean ignoreTP = new AtomicBoolean(false); public EngineAssignedWorldManager() { super(null, null); @@ -56,15 +57,13 @@ public EngineAssignedWorldManager(Engine engine) { @EventHandler public void on(IrisEngineHotloadEvent e) { - for(Player i : e.getEngine().getWorld().getPlayers()) { + for (Player i : e.getEngine().getWorld().getPlayers()) { i.playSound(i.getLocation(), Sound.BLOCK_AMETHYST_BLOCK_BREAK, 1f, 1.8f); VolmitSender s = new VolmitSender(i); s.sendTitle(C.IRIS + "Engine " + C.AQUA + "Hotloaded", 70, 60, 410); } } - protected AtomicBoolean ignoreTP = new AtomicBoolean(false); - // @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) // public void on(PlayerTeleportEvent e) { // if(ignoreTP.get()) { @@ -93,22 +92,22 @@ public void on(IrisEngineHotloadEvent e) { @EventHandler public void on(WorldSaveEvent e) { - if(e.getWorld().equals(getTarget().getWorld().realWorld())) { + if (e.getWorld().equals(getTarget().getWorld().realWorld())) { getEngine().save(); } } @EventHandler public void onItemUse(PlayerInteractEvent e) { - if(e.getItem() == null || e.getHand() != EquipmentSlot.HAND) { + if (e.getItem() == null || e.getHand() != EquipmentSlot.HAND) { return; } - if(e.getAction() == Action.LEFT_CLICK_BLOCK || e.getAction() == Action.LEFT_CLICK_AIR) { + if (e.getAction() == Action.LEFT_CLICK_BLOCK || e.getAction() == Action.LEFT_CLICK_AIR) { return; } - if(e.getPlayer().getWorld().equals(getTarget().getWorld().realWorld()) && e.getItem().getType() == Material.ENDER_EYE) { + if (e.getPlayer().getWorld().equals(getTarget().getWorld().realWorld()) && e.getItem().getType() == Material.ENDER_EYE) { KList positions = getEngine().getDimension().getStrongholds(getEngine().getSeedManager().getSpawn()); - if(positions.isEmpty()) { + if (positions.isEmpty()) { return; } @@ -116,16 +115,16 @@ public void onItemUse(PlayerInteractEvent e) { Position2 pr = positions.get(0); double d = pr.distance(playerPos); - for(Position2 pos : positions) { + for (Position2 pos : positions) { double distance = pos.distance(playerPos); - if(distance < d) { + if (distance < d) { d = distance; pr = pos; } } - if(e.getPlayer().getGameMode() != GameMode.CREATIVE) { - if(e.getItem().getAmount() > 1) { + if (e.getPlayer().getGameMode() != GameMode.CREATIVE) { + if (e.getItem().getAmount() > 1) { e.getPlayer().getInventory().getItemInMainHand().setAmount(e.getItem().getAmount() - 1); } else { e.getPlayer().getInventory().setItemInMainHand(null); @@ -141,28 +140,28 @@ public void onItemUse(PlayerInteractEvent e) { @EventHandler public void on(WorldUnloadEvent e) { - if(e.getWorld().equals(getTarget().getWorld().realWorld())) { + if (e.getWorld().equals(getTarget().getWorld().realWorld())) { getEngine().close(); } } @EventHandler public void on(BlockBreakEvent e) { - if(e.getPlayer().getWorld().equals(getTarget().getWorld().realWorld())) { + if (e.getPlayer().getWorld().equals(getTarget().getWorld().realWorld())) { onBlockBreak(e); } } @EventHandler public void on(BlockPlaceEvent e) { - if(e.getPlayer().getWorld().equals(getTarget().getWorld().realWorld())) { + if (e.getPlayer().getWorld().equals(getTarget().getWorld().realWorld())) { onBlockPlace(e); } } @EventHandler public void on(ChunkLoadEvent e) { - if(e.getChunk().getWorld().equals(getTarget().getWorld().realWorld())) { + if (e.getChunk().getWorld().equals(getTarget().getWorld().realWorld())) { onChunkLoad(e.getChunk(), e.isNewChunk()); } } diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineComponent.java b/src/main/java/com/volmit/iris/engine/framework/EngineComponent.java index a17e044a0..74cdfd6f1 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineComponent.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineComponent.java @@ -39,10 +39,10 @@ default MultiBurst burst() { default void close() { try { - if(this instanceof Listener) { + if (this instanceof Listener) { Iris.instance.unregisterListener((Listener) this); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineData.java b/src/main/java/com/volmit/iris/engine/framework/EngineData.java index 5217f5bb2..1364a86d8 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineData.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineData.java @@ -38,7 +38,7 @@ public static EngineData load(File f) { try { f.getParentFile().mkdirs(); return new Gson().fromJson(IO.readAll(f), EngineData.class); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -50,7 +50,7 @@ public void save(File f) { try { f.getParentFile().mkdirs(); IO.writeAll(f, new Gson().toJson(this)); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineDecorator.java b/src/main/java/com/volmit/iris/engine/framework/EngineDecorator.java index ccbc16ae4..c0e3898b5 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineDecorator.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineDecorator.java @@ -36,7 +36,7 @@ default void decorate(int x, int z, int realX, int realZ, Hunk data, @SuppressWarnings("BooleanMethodIsAlwaysInverted") default boolean canGoOn(BlockData decorant, BlockData atop) { - if(atop == null || B.isAir(atop)) { + if (atop == null || B.isAir(atop)) { return false; } diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineMode.java b/src/main/java/com/volmit/iris/engine/framework/EngineMode.java index a79b3177f..802ccaf6d 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineMode.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineMode.java @@ -31,6 +31,9 @@ import org.bukkit.block.data.BlockData; public interface EngineMode extends Staged { + public static final RollingSequence r = new RollingSequence(64); + public static final RollingSequence r2 = new RollingSequence(256); + void close(); Engine getEngine(); @@ -44,7 +47,7 @@ default EngineStage burst(EngineStage... stages) { BurstExecutor e = burst().burst(stages.length); e.setMulticore(multicore); - for(EngineStage i : stages) { + for (EngineStage i : stages) { e.queue(() -> i.generate(x, z, blocks, biomes, multicore, ctx)); } @@ -64,15 +67,12 @@ default void generateMatter(int x, int z, boolean multicore, ChunkContext contex getMantle().generateMatter(x, z, multicore, context); } - public static final RollingSequence r = new RollingSequence(64); - public static final RollingSequence r2 = new RollingSequence(256); - @BlockCoordinates default void generate(int x, int z, Hunk blocks, Hunk biomes, boolean multicore) { ChunkContext ctx = new ChunkContext(x, z, getComplex()); IrisContext.getOr(getEngine()).setChunkContext(ctx); - for(EngineStage i : getStages()) { + for (EngineStage i : getStages()) { i.generate(x, z, blocks, biomes, multicore, ctx); } } diff --git a/src/main/java/com/volmit/iris/engine/framework/EnginePlayer.java b/src/main/java/com/volmit/iris/engine/framework/EnginePlayer.java index 9528626d9..803819831 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EnginePlayer.java +++ b/src/main/java/com/volmit/iris/engine/framework/EnginePlayer.java @@ -49,26 +49,26 @@ public EnginePlayer(Engine engine, Player player) { public void tick() { sample(); - if(!IrisSettings.get().getWorld().isEffectSystem()) + if (!IrisSettings.get().getWorld().isEffectSystem()) return; J.a(() -> { - if(region != null) { - for(IrisEffect j : region.getEffects()) { + if (region != null) { + for (IrisEffect j : region.getEffects()) { try { j.apply(player, getEngine()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } } } - if(biome != null) { - for(IrisEffect j : biome.getEffects()) { + if (biome != null) { + for (IrisEffect j : biome.getEffects()) { try { j.apply(player, getEngine()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -83,12 +83,12 @@ public long ticksSinceLastSample() { public void sample() { try { - if(ticksSinceLastSample() > 55 && player.getLocation().distanceSquared(lastLocation) > 9 * 9) { + if (ticksSinceLastSample() > 55 && player.getLocation().distanceSquared(lastLocation) > 9 * 9) { lastLocation = player.getLocation().clone(); lastSample = M.ms(); sampleBiomeRegion(); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineStage.java b/src/main/java/com/volmit/iris/engine/framework/EngineStage.java index a92799d55..c863c8234 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineStage.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineStage.java @@ -29,7 +29,7 @@ public interface EngineStage { void generate(int x, int z, Hunk blocks, Hunk biomes, boolean multicore, ChunkContext context); default void close() { - if(this instanceof EngineComponent c) { + if (this instanceof EngineComponent c) { c.close(); } } diff --git a/src/main/java/com/volmit/iris/engine/framework/Fallible.java b/src/main/java/com/volmit/iris/engine/framework/Fallible.java index eb55a52a6..3ee51d4d1 100644 --- a/src/main/java/com/volmit/iris/engine/framework/Fallible.java +++ b/src/main/java/com/volmit/iris/engine/framework/Fallible.java @@ -24,7 +24,7 @@ public interface Fallible { default void fail(String error) { try { throw new RuntimeException(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); fail(error, e); } diff --git a/src/main/java/com/volmit/iris/engine/framework/IrisEngineMode.java b/src/main/java/com/volmit/iris/engine/framework/IrisEngineMode.java index edddc71fe..0f10b8807 100644 --- a/src/main/java/com/volmit/iris/engine/framework/IrisEngineMode.java +++ b/src/main/java/com/volmit/iris/engine/framework/IrisEngineMode.java @@ -33,7 +33,7 @@ public IrisEngineMode(Engine engine) { @Override public synchronized void close() { - if(closed) { + if (closed) { return; } diff --git a/src/main/java/com/volmit/iris/engine/framework/Locator.java b/src/main/java/com/volmit/iris/engine/framework/Locator.java index e023d6f01..8e57298f5 100644 --- a/src/main/java/com/volmit/iris/engine/framework/Locator.java +++ b/src/main/java/com/volmit/iris/engine/framework/Locator.java @@ -52,15 +52,63 @@ @FunctionalInterface public interface Locator { - boolean matches(Engine engine, Position2 chunk); - static void cancelSearch() { - if(LocatorCanceller.cancel != null) { + if (LocatorCanceller.cancel != null) { LocatorCanceller.cancel.run(); LocatorCanceller.cancel = null; } } + static Locator region(String loadKey) { + return (e, c) -> e.getRegion((c.getX() << 4) + 8, (c.getZ() << 4) + 8).getLoadKey().equals(loadKey); + } + + static Locator jigsawStructure(String loadKey) { + return (e, c) -> { + IrisJigsawStructure s = e.getStructureAt(c.getX(), c.getZ()); + return s != null && s.getLoadKey().equals(loadKey); + }; + } + + static Locator object(String loadKey) { + return (e, c) -> e.getObjectsAt(c.getX(), c.getZ()).contains(loadKey); + } + + static Locator surfaceBiome(String loadKey) { + return (e, c) -> e.getSurfaceBiome((c.getX() << 4) + 8, (c.getZ() << 4) + 8).getLoadKey().equals(loadKey); + } + + static Locator poi(String type) { + return (e, c) -> { + Set> pos = e.getPOIsAt((c.getX() << 4) + 8, (c.getZ() << 4) + 8); + return pos.stream().anyMatch(p -> p.getA().equals(type)); + }; + } + + static Locator caveBiome(String loadKey) { + return (e, c) -> e.getCaveBiome((c.getX() << 4) + 8, (c.getZ() << 4) + 8).getLoadKey().equals(loadKey); + } + + static Locator caveOrMantleBiome(String loadKey) { + return (e, c) -> { + AtomicBoolean found = new AtomicBoolean(false); + e.generateMatter(c.getX(), c.getZ(), true, new ChunkContext(c.getX() << 4, c.getZ() << 4, e.getComplex(), false)); + e.getMantle().getMantle().iterateChunk(c.getX(), c.getZ(), MatterCavern.class, (x, y, z, t) -> { + if (found.get()) { + return; + } + + if (t != null && t.getCustomBiome().equals(loadKey)) { + found.set(true); + } + }); + + return found.get(); + }; + } + + boolean matches(Engine engine, Position2 chunk); + default void find(Player player) { find(player, 30_000); } @@ -72,14 +120,14 @@ default void find(Player player, long timeout) { try { Position2 at = find(IrisToolbelt.access(player.getWorld()).getEngine(), new Position2(player.getLocation().getBlockX() >> 4, player.getLocation().getBlockZ() >> 4), timeout, checks::set).get(); - if(at != null) { + if (at != null) { J.s(() -> player.teleport(new Location(player.getWorld(), (at.getX() << 4) + 8, - IrisToolbelt.access(player.getWorld()).getEngine().getHeight( - (at.getX() << 4) + 8, - (at.getZ() << 4) + 8, false), - (at.getZ() << 4) + 8))); + IrisToolbelt.access(player.getWorld()).getEngine().getHeight( + (at.getX() << 4) + 8, + (at.getZ() << 4) + 8, false), + (at.getZ() << 4) + 8))); } - } catch(WrongEngineBroException | InterruptedException | ExecutionException e) { + } catch (WrongEngineBroException | InterruptedException | ExecutionException e) { e.printStackTrace(); } }) { @@ -101,7 +149,7 @@ public int getWorkCompleted() { } default Future find(Engine engine, Position2 pos, long timeout, Consumer checks) throws WrongEngineBroException { - if(engine.isClosed()) { + if (engine.isClosed()) { throw new WrongEngineBroException(); } @@ -121,15 +169,15 @@ default Future find(Engine engine, Position2 pos, long timeout, Consu Spiraler s = new Spiraler(100000, 100000, (x, z) -> next.set(new Position2(x, z))); s.setOffset(cursor.getX(), cursor.getZ()); s.next(); - while(!found.get() && !stop.get() && px.getMilliseconds() < timeout) { + while (!found.get() && !stop.get() && px.getMilliseconds() < timeout) { BurstExecutor e = burst.burst(tc); - for(int i = 0; i < tc; i++) { + for (int i = 0; i < tc; i++) { Position2 p = next.get(); s.next(); e.queue(() -> { - if(matches(engine, p)) { - if(foundPos.get() == null) { + if (matches(engine, p)) { + if (foundPos.get() == null) { foundPos.set(p); } @@ -145,59 +193,11 @@ default Future find(Engine engine, Position2 pos, long timeout, Consu LocatorCanceller.cancel = null; - if(found.get() && foundPos.get() != null) { + if (found.get() && foundPos.get() != null) { return foundPos.get(); } return null; }); } - - static Locator region(String loadKey) { - return (e, c) -> e.getRegion((c.getX() << 4) + 8, (c.getZ() << 4) + 8).getLoadKey().equals(loadKey); - } - - static Locator jigsawStructure(String loadKey) { - return (e, c) -> { - IrisJigsawStructure s = e.getStructureAt(c.getX(), c.getZ()); - return s != null && s.getLoadKey().equals(loadKey); - }; - } - - static Locator object(String loadKey) { - return (e, c) -> e.getObjectsAt(c.getX(), c.getZ()).contains(loadKey); - } - - static Locator surfaceBiome(String loadKey) { - return (e, c) -> e.getSurfaceBiome((c.getX() << 4) + 8, (c.getZ() << 4) + 8).getLoadKey().equals(loadKey); - } - - static Locator poi(String type) { - return (e, c) -> { - Set> pos = e.getPOIsAt((c.getX() << 4) + 8, (c.getZ() << 4) + 8); - return pos.stream().anyMatch(p -> p.getA().equals(type)); - }; - } - - static Locator caveBiome(String loadKey) { - return (e, c) -> e.getCaveBiome((c.getX() << 4) + 8, (c.getZ() << 4) + 8).getLoadKey().equals(loadKey); - } - - static Locator caveOrMantleBiome(String loadKey) { - return (e, c) -> { - AtomicBoolean found = new AtomicBoolean(false); - e.generateMatter(c.getX(), c.getZ(), true, new ChunkContext(c.getX() << 4, c.getZ() << 4, e.getComplex(), false)); - e.getMantle().getMantle().iterateChunk(c.getX(), c.getZ(), MatterCavern.class, (x, y, z, t) -> { - if(found.get()) { - return; - } - - if(t != null && t.getCustomBiome().equals(loadKey)) { - found.set(true); - } - }); - - return found.get(); - }; - } } diff --git a/src/main/java/com/volmit/iris/engine/framework/PregeneratedData.java b/src/main/java/com/volmit/iris/engine/framework/PregeneratedData.java index c0b99bf7a..8b8580227 100644 --- a/src/main/java/com/volmit/iris/engine/framework/PregeneratedData.java +++ b/src/main/java/com/volmit/iris/engine/framework/PregeneratedData.java @@ -44,17 +44,17 @@ public PregeneratedData(int height) { public Runnable inject(TerrainChunk tc) { blocks.iterateSync((x, y, z, b) -> { - if(b != null) { + if (b != null) { tc.setBlock(x, y, z, b); } Biome bf = biomes.get(x, y, z); - if(bf != null) { + if (bf != null) { tc.setBiome(x, y, z, bf); } }); - if(postMod.get()) { + if (postMod.get()) { return () -> Hunk.view(tc).insertSoftly(0, 0, 0, post, (b) -> b == null || B.isAirOrFluid(b)); } diff --git a/src/main/java/com/volmit/iris/engine/framework/SeedManager.java b/src/main/java/com/volmit/iris/engine/framework/SeedManager.java index cfd2996cc..b1544b38a 100644 --- a/src/main/java/com/volmit/iris/engine/framework/SeedManager.java +++ b/src/main/java/com/volmit/iris/engine/framework/SeedManager.java @@ -94,7 +94,7 @@ private CNG createSoup(long seed) { RNG e = new RNG((IRIS_TERRAIN_VERSION * 42) + IRIS_SIGNATURE); double gsoup = 0; int gk = a.i(1_000, 10_000); - for(char i : (a.s(4) + b.s(4) + c.s(4) + d.s(4) + e.s(4)).toCharArray()) { + for (char i : (a.s(4) + b.s(4) + c.s(4) + d.s(4) + e.s(4)).toCharArray()) { gsoup += ((gk * b.d(3, Math.PI)) / c.d(10, 18 * Math.E)) + 6_549; gsoup *= d.d(90.5, 1_234_567); gsoup += e.d(39.95, 99.25); diff --git a/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java b/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java index 644beb1af..7e2dc171a 100644 --- a/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java +++ b/src/main/java/com/volmit/iris/engine/jigsaw/PlannedPiece.java @@ -84,7 +84,7 @@ public String toString() { } public AxisAlignedBB getBox() { - if(box != null) { + if (box != null) { return box; } @@ -102,18 +102,18 @@ public boolean collidesWith(PlannedPiece p) { } public KList getAvailableConnectors() { - if(connected.isEmpty()) { + if (connected.isEmpty()) { return piece.getConnectors().copy(); } - if(connected.size() == piece.getConnectors().size()) { + if (connected.size() == piece.getConnectors().size()) { return new KList<>(); } KList c = new KList<>(); - for(IrisJigsawPieceConnector i : piece.getConnectors()) { - if(!connected.contains(i)) { + for (IrisJigsawPieceConnector i : piece.getConnectors()) { + if (!connected.contains(i)) { c.add(i); } } @@ -122,7 +122,7 @@ public KList getAvailableConnectors() { } public boolean connect(IrisJigsawPieceConnector c) { - if(piece.getConnectors().contains(c)) { + if (piece.getConnectors().contains(c)) { return connected.addIfMissing(c); } @@ -145,10 +145,10 @@ public void place(World world) { PlatformChunkGenerator a = IrisToolbelt.access(world); int minY = 0; - if(a != null) { + if (a != null) { minY = a.getEngine().getMinHeight(); - if(!a.getEngine().getDimension().isBedrock()) + if (!a.getEngine().getDimension().isBedrock()) minY--; //If the dimension has no bedrock, allow it to go a block lower } @@ -174,19 +174,19 @@ public void set(int x, int y, int z, BlockData d) { Block block = world.getBlockAt(x, y, z); //Prevent blocks being set in or bellow bedrock - if(y <= finalMinY || block.getType() == Material.BEDROCK) return; + if (y <= finalMinY || block.getType() == Material.BEDROCK) return; block.setBlockData(d); - if(a != null && getPiece().getPlacementOptions().getLoot().isNotEmpty() && - block.getState() instanceof InventoryHolder) { + if (a != null && getPiece().getPlacementOptions().getLoot().isNotEmpty() && + block.getState() instanceof InventoryHolder) { IrisLootTable table = getPiece().getPlacementOptions().getTable(block.getBlockData(), getData()); - if(table == null) return; + if (table == null) return; Engine engine = a.getEngine(); engine.addItems(false, ((InventoryHolder) block.getState()).getInventory(), - rng.nextParallelRNG(BlockPosition.toLong(x, y, z)), - new KList<>(table), InventorySlotType.STORAGE, x, y, z, 15); + rng.nextParallelRNG(BlockPosition.toLong(x, y, z)), + new KList<>(table), InventorySlotType.STORAGE, x, y, z, 15); } } @@ -234,7 +234,7 @@ public void setTile(int xx, int yy, int zz, TileData tile) @Override public Engine getEngine() { - if(IrisToolbelt.isIrisWorld(world)) { + if (IrisToolbelt.isIrisWorld(world)) { return IrisToolbelt.access(world).getEngine(); } diff --git a/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java b/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java index 42f14af78..4aa3ce341 100644 --- a/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java +++ b/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java @@ -34,11 +34,11 @@ @Data public class PlannedStructure { private static transient ConcurrentLinkedHashMap objectRotationCache - = new ConcurrentLinkedHashMap.Builder() - .initialCapacity(64) - .maximumWeightedCapacity(1024) - .concurrencyLevel(32) - .build(); + = new ConcurrentLinkedHashMap.Builder() + .initialCapacity(64) + .maximumWeightedCapacity(1024) + .concurrencyLevel(32) + .build(); private KList pieces; private IrisJigsawStructure structure; private IrisPosition position; @@ -57,7 +57,7 @@ public PlannedStructure(IrisJigsawStructure structure, IrisPosition position, RN this.data = structure.getLoader(); generateStartPiece(); - for(int i = 0; i < structure.getMaxDepth(); i++) { + for (int i = 0; i < structure.getMaxDepth(); i++) { generateOutwards(); } @@ -65,7 +65,7 @@ public PlannedStructure(IrisJigsawStructure structure, IrisPosition position, RN Iris.debug("JPlace: ROOT @ relative " + position.toString()); - for(PlannedPiece i : pieces) { + for (PlannedPiece i : pieces) { Iris.debug("Place: " + i.getObject().getLoadKey() + " at @ relative " + i.getPosition().toString()); } } @@ -75,7 +75,7 @@ public void place(IObjectPlacer placer, Mantle e, Engine eng) { options.getRotation().setEnabled(false); int startHeight = pieces.get(0).getPosition().getY(); - for(PlannedPiece i : pieces) { + for (PlannedPiece i : pieces) { place(i, startHeight, options, placer, e, eng); } } @@ -83,7 +83,7 @@ public void place(IObjectPlacer placer, Mantle e, Engine eng) { public void place(PlannedPiece i, int startHeight, IrisObjectPlacement o, IObjectPlacer placer, Mantle e, Engine eng) { IrisObjectPlacement options = o; - if(i.getPiece().getPlacementOptions() != null) { + if (i.getPiece().getPlacementOptions() != null) { options = i.getPiece().getPlacementOptions(); options.getRotation().setEnabled(false); } else { @@ -100,8 +100,8 @@ public void place(PlannedPiece i, int startHeight, IrisObjectPlacement o, IObjec int offset = i.getPosition().getY() - startHeight; int height; - if(i.getStructure().getStructure().getLockY() == -1) { - if(i.getStructure().getStructure().getOverrideYRange() != null) { + if (i.getStructure().getStructure().getLockY() == -1) { + if (i.getStructure().getStructure().getOverrideYRange() != null) { height = (int) i.getStructure().getStructure().getOverrideYRange().get(rng, xx, zz, getData()); } else { height = placer.getHighest(xx, zz, getData()); @@ -112,7 +112,7 @@ public void place(PlannedPiece i, int startHeight, IrisObjectPlacement o, IObjec height += offset + (v.getH() / 2); - if(options.getMode().equals(ObjectPlaceMode.PAINT)) { + if (options.getMode().equals(ObjectPlaceMode.PAINT)) { height = -1; } @@ -121,14 +121,14 @@ public void place(PlannedPiece i, int startHeight, IrisObjectPlacement o, IObjec } public void place(World world) { - for(PlannedPiece i : pieces) { + for (PlannedPiece i : pieces) { Iris.sq(() -> i.place(world)); } } private void generateOutwards() { - for(PlannedPiece i : getPiecesWithAvailableConnectors().shuffle(rng)) { - if(!generatePieceOutwards(i)) { + for (PlannedPiece i : getPiecesWithAvailableConnectors().shuffle(rng)) { + if (!generatePieceOutwards(i)) { i.setDead(true); } } @@ -137,8 +137,8 @@ private void generateOutwards() { private boolean generatePieceOutwards(PlannedPiece piece) { boolean b = false; - for(IrisJigsawPieceConnector i : piece.getAvailableConnectors().shuffleCopy(rng)) { - if(generateConnectorOutwards(piece, i)) { + for (IrisJigsawPieceConnector i : piece.getAvailableConnectors().shuffleCopy(rng)) { + if (generateConnectorOutwards(piece, i)) { b = true; } } @@ -147,8 +147,8 @@ private boolean generatePieceOutwards(PlannedPiece piece) { } private boolean generateConnectorOutwards(PlannedPiece piece, IrisJigsawPieceConnector pieceConnector) { - for(IrisJigsawPiece i : getShuffledPiecesFor(pieceConnector)) { - if(generateRotatedPiece(piece, pieceConnector, i)) { + for (IrisJigsawPiece i : getShuffledPiecesFor(pieceConnector)) { + if (generateRotatedPiece(piece, pieceConnector, i)) { return true; } } @@ -157,8 +157,8 @@ private boolean generateConnectorOutwards(PlannedPiece piece, IrisJigsawPieceCon } private boolean generateRotatedPiece(PlannedPiece piece, IrisJigsawPieceConnector pieceConnector, IrisJigsawPiece idea) { - if(!piece.getPiece().getPlacementOptions().getRotation().isEnabled()) { - if(generateRotatedPiece(piece, pieceConnector, idea, 0, 0, 0)) { + if (!piece.getPiece().getPlacementOptions().getRotation().isEnabled()) { + if (generateRotatedPiece(piece, pieceConnector, idea, 0, 0, 0)) { return true; } } @@ -166,23 +166,23 @@ private boolean generateRotatedPiece(PlannedPiece piece, IrisJigsawPieceConnecto KList forder1 = new KList().qadd(0).qadd(1).qadd(2).qadd(3).shuffle(rng); KList forder2 = new KList().qadd(0).qadd(1).qadd(2).qadd(3).shuffle(rng); - for(Integer i : forder1) { - if(pieceConnector.isRotateConnector()) { + for (Integer i : forder1) { + if (pieceConnector.isRotateConnector()) { assert pieceConnector.getDirection().getAxis() != null; - if(!pieceConnector.getDirection().getAxis().equals(Axis.Y)) { - for(Integer j : forder2) { - if(pieceConnector.getDirection().getAxis().equals(Axis.X) && generateRotatedPiece(piece, pieceConnector, idea, j, i, 0)) { + if (!pieceConnector.getDirection().getAxis().equals(Axis.Y)) { + for (Integer j : forder2) { + if (pieceConnector.getDirection().getAxis().equals(Axis.X) && generateRotatedPiece(piece, pieceConnector, idea, j, i, 0)) { return true; } - if(pieceConnector.getDirection().getAxis().equals(Axis.Z) && generateRotatedPiece(piece, pieceConnector, idea, 0, i, j)) { + if (pieceConnector.getDirection().getAxis().equals(Axis.Z) && generateRotatedPiece(piece, pieceConnector, idea, 0, i, j)) { return true; } } } } - if(generateRotatedPiece(piece, pieceConnector, idea, 0, i, 0)) { + if (generateRotatedPiece(piece, pieceConnector, idea, 0, i, 0)) { return true; } } @@ -191,14 +191,14 @@ private boolean generateRotatedPiece(PlannedPiece piece, IrisJigsawPieceConnecto } private boolean generateRotatedPiece(PlannedPiece piece, IrisJigsawPieceConnector pieceConnector, IrisJigsawPiece idea, IrisObjectRotation rotation) { - if(!idea.getPlacementOptions().getRotation().isEnabled()) { + if (!idea.getPlacementOptions().getRotation().isEnabled()) { rotation = piece.getRotation(); } PlannedPiece test = new PlannedPiece(this, piece.getPosition(), idea, rotation); - for(IrisJigsawPieceConnector j : test.getPiece().getConnectors().shuffleCopy(rng)) { - if(generatePositionedPiece(piece, pieceConnector, test, j)) { + for (IrisJigsawPieceConnector j : test.getPiece().getConnectors().shuffleCopy(rng)) { + if (generatePositionedPiece(piece, pieceConnector, test, j)) { return true; } } @@ -216,18 +216,18 @@ private boolean generatePositionedPiece(PlannedPiece piece, IrisJigsawPieceConne IrisDirection desiredDirection = pieceConnector.getDirection().reverse(); IrisPosition desiredPosition = connector.sub(new IrisPosition(desiredDirection.toVector())); - if(!pieceConnector.getTargetName().equals("*") && !pieceConnector.getTargetName().equals(testConnector.getName())) { + if (!pieceConnector.getTargetName().equals("*") && !pieceConnector.getTargetName().equals(testConnector.getName())) { return false; } - if(!testConnector.getDirection().equals(desiredDirection)) { + if (!testConnector.getDirection().equals(desiredDirection)) { return false; } IrisPosition shift = test.getWorldPosition(testConnector); test.setPosition(desiredPosition.sub(shift)); - if(collidesWith(test, piece)) { + if (collidesWith(test, piece)) { return false; } @@ -241,11 +241,11 @@ private boolean generatePositionedPiece(PlannedPiece piece, IrisJigsawPieceConne private KList getShuffledPiecesFor(IrisJigsawPieceConnector c) { KList p = new KList<>(); - for(String i : c.getPools().shuffleCopy(rng)) { - for(String j : getData().getJigsawPoolLoader().load(i).getPieces().shuffleCopy(rng)) { + for (String i : c.getPools().shuffleCopy(rng)) { + for (String j : getData().getJigsawPoolLoader().load(i).getPieces().shuffleCopy(rng)) { IrisJigsawPiece pi = getData().getJigsawPieceLoader().load(j); - if(pi == null || (terminating && !pi.isTerminal())) { + if (pi == null || (terminating && !pi.isTerminal())) { continue; } @@ -260,7 +260,7 @@ private void generateStartPiece() { } private void generateTerminators() { - if(getStructure().isTerminate()) { + if (getStructure().isTerminate()) { terminating = true; generateOutwards(); } @@ -273,7 +273,7 @@ public KList getPiecesWithAvailableConnectors() { public int getVolume() { int v = 0; - for(PlannedPiece i : pieces) { + for (PlannedPiece i : pieces) { v += i.getObject().getH() * i.getObject().getW() * i.getObject().getD(); } @@ -283,7 +283,7 @@ public int getVolume() { public int getMass() { int v = 0; - for(PlannedPiece i : pieces) { + for (PlannedPiece i : pieces) { v += i.getObject().getBlocks().size(); } @@ -291,12 +291,12 @@ public int getMass() { } public boolean collidesWith(PlannedPiece piece, PlannedPiece ignore) { - for(PlannedPiece i : pieces) { - if(i.equals(ignore)) { + for (PlannedPiece i : pieces) { + if (i.equals(ignore)) { continue; } - if(i.collidesWith(piece)) { + if (i.collidesWith(piece)) { return true; } } @@ -305,8 +305,8 @@ public boolean collidesWith(PlannedPiece piece, PlannedPiece ignore) { } public boolean contains(IrisPosition p) { - for(PlannedPiece i : pieces) { - if(i.contains(p)) { + for (PlannedPiece i : pieces) { + if (i.contains(p)) { return true; } } diff --git a/src/main/java/com/volmit/iris/engine/mantle/EngineMantle.java b/src/main/java/com/volmit/iris/engine/mantle/EngineMantle.java index 451e84ace..5dbd7a7d1 100644 --- a/src/main/java/com/volmit/iris/engine/mantle/EngineMantle.java +++ b/src/main/java/com/volmit/iris/engine/mantle/EngineMantle.java @@ -70,7 +70,7 @@ default int getHighest(int x, int z) { default KList findMarkers(int x, int z, MatterMarker marker) { KList p = new KList<>(); getMantle().iterateChunk(x, z, MatterMarker.class, (xx, yy, zz, mm) -> { - if(marker.equals(mm)) { + if (marker.equals(mm)) { p.add(new IrisPosition(xx + (x << 4), yy, zz + (z << 4))); } }); @@ -113,7 +113,7 @@ default void setTile(int x, int y, int z, TileData d) { @Override default BlockData get(int x, int y, int z) { BlockData block = getMantle().get(x, y, z, BlockData.class); - if(block == null) + if (block == null) return AIR; return block; } @@ -190,16 +190,16 @@ default int getRealRadius() { @ChunkCoordinates default void generateMatter(int x, int z, boolean multicore, ChunkContext context) { - synchronized(this) { - if(!getEngine().getDimension().isUseMantle()) { + synchronized (this) { + if (!getEngine().getDimension().isUseMantle()) { return; } int s = getRealRadius(); BurstExecutor burst = burst().burst(multicore); MantleWriter writer = getMantle().write(this, x, z, s * 2); - for(int i = -s; i <= s; i++) { - for(int j = -s; j <= s; j++) { + for (int i = -s; i <= s; i++) { + for (int j = -s; j <= s; j++) { int xx = i + x; int zz = j + z; burst.queue(() -> { @@ -207,7 +207,7 @@ default void generateMatter(int x, int z, boolean multicore, ChunkContext contex getMantle().raiseFlag(xx, zz, MantleFlag.PLANNED, () -> { MantleChunk mc = getMantle().getChunk(xx, zz); - for(MantleComponent k : getComponents()) { + for (MantleComponent k : getComponents()) { generateMantleComponent(writer, xx, zz, k, mc, context); } }); @@ -225,7 +225,7 @@ default void generateMantleComponent(MantleWriter writer, int x, int z, MantleCo @ChunkCoordinates default void insertMatter(int x, int z, Class t, Hunk blocks, boolean multicore) { - if(!getEngine().getDimension().isUseMantle()) { + if (!getEngine().getDimension().isUseMantle()) { return; } @@ -241,7 +241,7 @@ default void updateBlock(int x, int y, int z) { default void dropCavernBlock(int x, int y, int z) { Matter matter = getMantle().getChunk(x & 15, z & 15).get(y & 15); - if(matter != null) { + if (matter != null) { matter.slice(MatterCavern.class).set(x & 15, y & 15, z & 15, null); } } @@ -265,11 +265,11 @@ default int getLoadedRegionCount() { default boolean isCovered(int x, int z) { int s = getRealRadius(); - for(int i = -s; i <= s; i++) { - for(int j = -s; j <= s; j++) { + for (int i = -s; i <= s; i++) { + for (int j = -s; j <= s; j++) { int xx = i + x; int zz = j + z; - if(!getMantle().hasFlag(xx, zz, MantleFlag.REAL)) { + if (!getMantle().hasFlag(xx, zz, MantleFlag.REAL)) { return false; } } @@ -279,7 +279,7 @@ default boolean isCovered(int x, int z) { } default void cleanupChunk(int x, int z) { - if(!getMantle().hasFlag(x, z, MantleFlag.CLEANED) && isCovered(x, z)) { + if (!getMantle().hasFlag(x, z, MantleFlag.CLEANED) && isCovered(x, z)) { getMantle().raiseFlag(x, z, MantleFlag.CLEANED, () -> { getMantle().deleteChunkSlice(x, z, BlockData.class); getMantle().deleteChunkSlice(x, z, String.class); diff --git a/src/main/java/com/volmit/iris/engine/mantle/MantleWriter.java b/src/main/java/com/volmit/iris/engine/mantle/MantleWriter.java index 7e25db679..265e29c56 100644 --- a/src/main/java/com/volmit/iris/engine/mantle/MantleWriter.java +++ b/src/main/java/com/volmit/iris/engine/mantle/MantleWriter.java @@ -60,8 +60,8 @@ public MantleWriter(EngineMantle engineMantle, Mantle mantle, int x, int z, int this.x = x; this.z = z; - for(int i = -radius; i <= radius; i++) { - for(int j = -radius; j <= radius; j++) { + for (int i = -radius; i <= radius; i++) { + for (int j = -radius; j <= radius; j++) { cachedChunks.put(Cache.key(i + x, j + z), mantle.getChunk(i + x, j + z)); } } @@ -71,15 +71,15 @@ private static Set getBallooned(Set vset, double rad Set returnset = new HashSet<>(); int ceilrad = (int) Math.ceil(radius); - for(IrisPosition v : vset) { + for (IrisPosition v : vset) { int tipx = v.getX(); int tipy = v.getY(); int tipz = v.getZ(); - for(int loopx = tipx - ceilrad; loopx <= tipx + ceilrad; loopx++) { - for(int loopy = tipy - ceilrad; loopy <= tipy + ceilrad; loopy++) { - for(int loopz = tipz - ceilrad; loopz <= tipz + ceilrad; loopz++) { - if(hypot(loopx - tipx, loopy - tipy, loopz - tipz) <= radius) { + for (int loopx = tipx - ceilrad; loopx <= tipx + ceilrad; loopx++) { + for (int loopy = tipy - ceilrad; loopy <= tipy + ceilrad; loopy++) { + for (int loopz = tipz - ceilrad; loopz <= tipz + ceilrad; loopz++) { + if (hypot(loopx - tipx, loopy - tipy, loopz - tipz) <= radius) { returnset.add(new IrisPosition(loopx, loopy, loopz)); } } @@ -91,16 +91,16 @@ private static Set getBallooned(Set vset, double rad private static Set getHollowed(Set vset) { Set returnset = new KSet<>(); - for(IrisPosition v : vset) { + for (IrisPosition v : vset) { double x = v.getX(); double y = v.getY(); double z = v.getZ(); - if(!(vset.contains(new IrisPosition(x + 1, y, z)) - && vset.contains(new IrisPosition(x - 1, y, z)) - && vset.contains(new IrisPosition(x, y + 1, z)) - && vset.contains(new IrisPosition(x, y - 1, z)) - && vset.contains(new IrisPosition(x, y, z + 1)) - && vset.contains(new IrisPosition(x, y, z - 1)))) { + if (!(vset.contains(new IrisPosition(x + 1, y, z)) + && vset.contains(new IrisPosition(x - 1, y, z)) + && vset.contains(new IrisPosition(x, y + 1, z)) + && vset.contains(new IrisPosition(x, y - 1, z)) + && vset.contains(new IrisPosition(x, y, z + 1)) + && vset.contains(new IrisPosition(x, y, z - 1)))) { returnset.add(v); } } @@ -109,7 +109,7 @@ private static Set getHollowed(Set vset) { private static double hypot(double... pars) { double sum = 0; - for(double d : pars) { + for (double d : pars) { sum += Math.pow(d, 2); } return Math.sqrt(sum); @@ -123,30 +123,29 @@ private static double lengthSq(double x, double z) { return (x * x) + (z * z); } - public void setDataWarped(int x, int y, int z, T t, RNG rng, IrisData data, IrisGeneratorStyle style) - { - setData((int)Math.round(style.warp(rng, data, x, x, y, -z)), - (int)Math.round(style.warp(rng, data, y, z, -x, y)), - (int)Math.round(style.warp(rng, data, z, -y, z, x)), t); + public void setDataWarped(int x, int y, int z, T t, RNG rng, IrisData data, IrisGeneratorStyle style) { + setData((int) Math.round(style.warp(rng, data, x, x, y, -z)), + (int) Math.round(style.warp(rng, data, y, z, -x, y)), + (int) Math.round(style.warp(rng, data, z, -y, z, x)), t); } public void setData(int x, int y, int z, T t) { - if(t == null) { + if (t == null) { return; } int cx = x >> 4; int cz = z >> 4; - if(y < 0 || y >= mantle.getWorldHeight()) { + if (y < 0 || y >= mantle.getWorldHeight()) { return; } - if(cx >= this.x - radius && cx <= this.x + radius - && cz >= this.z - radius && cz <= this.z + radius) { + if (cx >= this.x - radius && cx <= this.x + radius + && cz >= this.z - radius && cz <= this.z + radius) { MantleChunk chunk = cachedChunks.get(Cache.key(cx, cz)); - if(chunk == null) { + if (chunk == null) { Iris.error("Mantle Writer Accessed " + cx + "," + cz + " and came up null (and yet within bounds!)"); return; } @@ -219,20 +218,13 @@ public Engine getEngine() { /** * Set a sphere into the mantle * - * @param cx - * the center x - * @param cy - * the center y - * @param cz - * the center z - * @param radius - * the radius of this sphere - * @param fill - * should it be filled? or just the outer shell? - * @param data - * the data to set - * @param - * the type of data to apply to the mantle + * @param cx the center x + * @param cy the center y + * @param cz the center z + * @param radius the radius of this sphere + * @param fill should it be filled? or just the outer shell? + * @param data the data to set + * @param the type of data to apply to the mantle */ public void setSphere(int cx, int cy, int cz, double radius, boolean fill, T data) { setElipsoid(cx, cy, cz, radius, radius, radius, fill, data); @@ -249,24 +241,15 @@ public void setElipsoidWarped(int cx, int cy, int cz, double rx, double ry, /** * Set an elipsoid into the mantle * - * @param cx - * the center x - * @param cy - * the center y - * @param cz - * the center z - * @param rx - * the x radius - * @param ry - * the y radius - * @param rz - * the z radius - * @param fill - * should it be filled or just the outer shell? - * @param data - * the data to set - * @param - * the type of data to apply to the mantle + * @param cx the center x + * @param cy the center y + * @param cz the center z + * @param rx the x radius + * @param ry the y radius + * @param rz the z radius + * @param fill should it be filled or just the outer shell? + * @param data the data to set + * @param the type of data to apply to the mantle */ public void setElipsoidFunction(int cx, int cy, int cz, double rx, double ry, double rz, boolean fill, Function3 data) { rx += 0.5; @@ -281,23 +264,23 @@ public void setElipsoidFunction(int cx, int cy, int cz, double rx, double ry double nextXn = 0; forX: - for(int x = 0; x <= ceilRadiusX; ++x) { + for (int x = 0; x <= ceilRadiusX; ++x) { final double xn = nextXn; nextXn = (x + 1) * invRadiusX; double nextYn = 0; forY: - for(int y = 0; y <= ceilRadiusY; ++y) { + for (int y = 0; y <= ceilRadiusY; ++y) { final double yn = nextYn; nextYn = (y + 1) * invRadiusY; double nextZn = 0; - for(int z = 0; z <= ceilRadiusZ; ++z) { + for (int z = 0; z <= ceilRadiusZ; ++z) { final double zn = nextZn; nextZn = (z + 1) * invRadiusZ; double distanceSq = lengthSq(xn, yn, zn); - if(distanceSq > 1) { - if(z == 0) { - if(y == 0) { + if (distanceSq > 1) { + if (z == 0) { + if (y == 0) { break forX; } break forY; @@ -305,8 +288,8 @@ public void setElipsoidFunction(int cx, int cy, int cz, double rx, double ry break; } - if(!fill) { - if(lengthSq(nextXn, yn, zn) <= 1 && lengthSq(xn, nextYn, zn) <= 1 && lengthSq(xn, yn, nextZn) <= 1) { + if (!fill) { + if (lengthSq(nextXn, yn, zn) <= 1 && lengthSq(xn, nextYn, zn) <= 1 && lengthSq(xn, yn, nextZn) <= 1) { continue; } } @@ -338,23 +321,23 @@ public void setElipsoidFunctionWarped(int cx, int cy, int cz, double rx, dou double nextXn = 0; forX: - for(int x = 0; x <= ceilRadiusX; ++x) { + for (int x = 0; x <= ceilRadiusX; ++x) { final double xn = nextXn; nextXn = (x + 1) * invRadiusX; double nextYn = 0; forY: - for(int y = 0; y <= ceilRadiusY; ++y) { + for (int y = 0; y <= ceilRadiusY; ++y) { final double yn = nextYn; nextYn = (y + 1) * invRadiusY; double nextZn = 0; - for(int z = 0; z <= ceilRadiusZ; ++z) { + for (int z = 0; z <= ceilRadiusZ; ++z) { final double zn = nextZn; nextZn = (z + 1) * invRadiusZ; double distanceSq = lengthSq(xn, yn, zn); - if(distanceSq > 1) { - if(z == 0) { - if(y == 0) { + if (distanceSq > 1) { + if (z == 0) { + if (y == 0) { break forX; } break forY; @@ -362,8 +345,8 @@ public void setElipsoidFunctionWarped(int cx, int cy, int cz, double rx, dou break; } - if(!fill) { - if(lengthSq(nextXn, yn, zn) <= 1 && lengthSq(xn, nextYn, zn) <= 1 && lengthSq(xn, yn, nextZn) <= 1) { + if (!fill) { + if (lengthSq(nextXn, yn, zn) <= 1 && lengthSq(xn, nextYn, zn) <= 1 && lengthSq(xn, yn, nextZn) <= 1) { continue; } } @@ -385,29 +368,21 @@ public void setElipsoidFunctionWarped(int cx, int cy, int cz, double rx, dou /** * Set a cuboid of data in the mantle * - * @param x1 - * the min x - * @param y1 - * the min y - * @param z1 - * the min z - * @param x2 - * the max x - * @param y2 - * the max y - * @param z2 - * the max z - * @param data - * the data to set - * @param - * the type of data to apply to the mantle + * @param x1 the min x + * @param y1 the min y + * @param z1 the min z + * @param x2 the max x + * @param y2 the max y + * @param z2 the max z + * @param data the data to set + * @param the type of data to apply to the mantle */ public void setCuboid(int x1, int y1, int z1, int x2, int y2, int z2, T data) { int j, k; - for(int i = x1; i <= x2; i++) { - for(j = x1; j <= x2; j++) { - for(k = x1; k <= x2; k++) { + for (int i = x1; i <= x2; i++) { + for (j = x1; j <= x2; j++) { + for (k = x1; k <= x2; k++) { setData(i, j, k, data); } } @@ -417,30 +392,23 @@ public void setCuboid(int x1, int y1, int z1, int x2, int y2, int z2, T data /** * Set a pyramid of data in the mantle * - * @param cx - * the center x - * @param cy - * the base y - * @param cz - * the center z - * @param data - * the data to set - * @param size - * the size of the pyramid (width of base & height) - * @param filled - * should it be filled or hollow - * @param - * the type of data to apply to the mantle + * @param cx the center x + * @param cy the base y + * @param cz the center z + * @param data the data to set + * @param size the size of the pyramid (width of base & height) + * @param filled should it be filled or hollow + * @param the type of data to apply to the mantle */ @SuppressWarnings("ConstantConditions") public void setPyramid(int cx, int cy, int cz, T data, int size, boolean filled) { int height = size; - for(int y = 0; y <= height; ++y) { + for (int y = 0; y <= height; ++y) { size--; - for(int x = 0; x <= size; ++x) { - for(int z = 0; z <= size; ++z) { - if((filled && z <= size && x <= size) || z == size || x == size) { + for (int x = 0; x <= size; ++x) { + for (int z = 0; z <= size; ++z) { + if ((filled && z <= size && x <= size) || z == size || x == size) { setData(x + cx, y + cy, z + cz, data); setData(-x + cx, y + cy, z + cz, data); setData(x + cx, y + cy, -z + cz, data); @@ -454,18 +422,12 @@ public void setPyramid(int cx, int cy, int cz, T data, int size, boolean fil /** * Set a 3d line * - * @param a - * the first point - * @param b - * the second point - * @param radius - * the radius - * @param filled - * hollow or filled? - * @param data - * the data - * @param - * the type of data to apply to the mantle + * @param a the first point + * @param b the second point + * @param radius the radius + * @param filled hollow or filled? + * @param data the data + * @param the type of data to apply to the mantle */ public void setLine(IrisPosition a, IrisPosition b, double radius, boolean filled, T data) { setLine(ImmutableList.of(a, b), radius, filled, data); @@ -478,21 +440,16 @@ public void setLine(List vectors, double radius, boolean fille /** * Set lines for points * - * @param vectors - * the points - * @param radius - * the radius - * @param filled - * hollow or filled? - * @param data - * the data to set - * @param - * the type of data to apply to the mantle + * @param vectors the points + * @param radius the radius + * @param filled hollow or filled? + * @param data the data to set + * @param the type of data to apply to the mantle */ public void setLineConsumer(List vectors, double radius, boolean filled, Function3 data) { Set vset = new KSet<>(); - for(int i = 0; vectors.size() != 0 && i < vectors.size() - 1; i++) { + for (int i = 0; vectors.size() != 0 && i < vectors.size() - 1; i++) { IrisPosition pos1 = vectors.get(i); IrisPosition pos2 = vectors.get(i + 1); int x1 = pos1.getX(); @@ -508,22 +465,22 @@ public void setLineConsumer(List vectors, double radius, boole int dy = Math.abs(y2 - y1); int dz = Math.abs(z2 - z1); - if(dx + dy + dz == 0) { + if (dx + dy + dz == 0) { vset.add(new IrisPosition(tipx, tipy, tipz)); continue; } int dMax = Math.max(Math.max(dx, dy), dz); - if(dMax == dx) { - for(int domstep = 0; domstep <= dx; domstep++) { + if (dMax == dx) { + for (int domstep = 0; domstep <= dx; domstep++) { tipx = x1 + domstep * (x2 - x1 > 0 ? 1 : -1); tipy = (int) Math.round(y1 + domstep * ((double) dy) / ((double) dx) * (y2 - y1 > 0 ? 1 : -1)); tipz = (int) Math.round(z1 + domstep * ((double) dz) / ((double) dx) * (z2 - z1 > 0 ? 1 : -1)); vset.add(new IrisPosition(tipx, tipy, tipz)); } - } else if(dMax == dy) { - for(int domstep = 0; domstep <= dy; domstep++) { + } else if (dMax == dy) { + for (int domstep = 0; domstep <= dy; domstep++) { tipy = y1 + domstep * (y2 - y1 > 0 ? 1 : -1); tipx = (int) Math.round(x1 + domstep * ((double) dx) / ((double) dy) * (x2 - x1 > 0 ? 1 : -1)); tipz = (int) Math.round(z1 + domstep * ((double) dz) / ((double) dy) * (z2 - z1 > 0 ? 1 : -1)); @@ -531,7 +488,7 @@ public void setLineConsumer(List vectors, double radius, boole vset.add(new IrisPosition(tipx, tipy, tipz)); } } else /* if (dMax == dz) */ { - for(int domstep = 0; domstep <= dz; domstep++) { + for (int domstep = 0; domstep <= dz; domstep++) { tipz = z1 + domstep * (z2 - z1 > 0 ? 1 : -1); tipy = (int) Math.round(y1 + domstep * ((double) dy) / ((double) dz) * (y2 - y1 > 0 ? 1 : -1)); tipx = (int) Math.round(x1 + domstep * ((double) dx) / ((double) dz) * (x2 - x1 > 0 ? 1 : -1)); @@ -543,7 +500,7 @@ public void setLineConsumer(List vectors, double radius, boole vset = getBallooned(vset, radius); - if(!filled) { + if (!filled) { vset = getHollowed(vset); } @@ -553,20 +510,13 @@ public void setLineConsumer(List vectors, double radius, boole /** * Set a cylinder in the mantle * - * @param cx - * the center x - * @param cy - * the base y - * @param cz - * the center z - * @param data - * the data to set - * @param radius - * the radius - * @param height - * the height of the cyl - * @param filled - * filled or not + * @param cx the center x + * @param cy the base y + * @param cz the center z + * @param data the data to set + * @param radius the radius + * @param height the height of the cyl + * @param filled filled or not */ public void setCylinder(int cx, int cy, int cz, T data, double radius, int height, boolean filled) { setCylinder(cx, cy, cz, data, radius, radius, height, filled); @@ -575,38 +525,30 @@ public void setCylinder(int cx, int cy, int cz, T data, double radius, int h /** * Set a cylinder in the mantle * - * @param cx - * the center x - * @param cy - * the base y - * @param cz - * the center z - * @param data - * the data to set - * @param radiusX - * the x radius - * @param radiusZ - * the z radius - * @param height - * the height of this cyl - * @param filled - * filled or hollow? + * @param cx the center x + * @param cy the base y + * @param cz the center z + * @param data the data to set + * @param radiusX the x radius + * @param radiusZ the z radius + * @param height the height of this cyl + * @param filled filled or hollow? */ public void setCylinder(int cx, int cy, int cz, T data, double radiusX, double radiusZ, int height, boolean filled) { int affected = 0; radiusX += 0.5; radiusZ += 0.5; - if(height == 0) { + if (height == 0) { return; - } else if(height < 0) { + } else if (height < 0) { height = -height; cy = cy - height; } - if(cy < 0) { + if (cy < 0) { cy = 0; - } else if(cy + height - 1 > getMantle().getWorldHeight()) { + } else if (cy + height - 1 > getMantle().getWorldHeight()) { height = getMantle().getWorldHeight() - cy + 1; } @@ -617,30 +559,30 @@ public void setCylinder(int cx, int cy, int cz, T data, double radiusX, doub double nextXn = 0; forX: - for(int x = 0; x <= ceilRadiusX; ++x) { + for (int x = 0; x <= ceilRadiusX; ++x) { final double xn = nextXn; nextXn = (x + 1) * invRadiusX; double nextZn = 0; - for(int z = 0; z <= ceilRadiusZ; ++z) { + for (int z = 0; z <= ceilRadiusZ; ++z) { final double zn = nextZn; nextZn = (z + 1) * invRadiusZ; double distanceSq = lengthSq(xn, zn); - if(distanceSq > 1) { - if(z == 0) { + if (distanceSq > 1) { + if (z == 0) { break forX; } break; } - if(!filled) { - if(lengthSq(nextXn, zn) <= 1 && lengthSq(xn, nextZn) <= 1) { + if (!filled) { + if (lengthSq(nextXn, zn) <= 1 && lengthSq(xn, nextZn) <= 1) { continue; } } - for(int y = 0; y < height; ++y) { + for (int y = 0; y < height; ++y) { setData(cx + x, cy + y, cz + z, data); setData(cx + -x, cy + y, cz + z, data); setData(cx + x, cy + y, cz + -z, data); @@ -653,25 +595,25 @@ public void setCylinder(int cx, int cy, int cz, T data, double radiusX, doub public void set(IrisPosition pos, T data) { try { setData(pos.getX(), pos.getY(), pos.getZ(), data); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("No set? " + data.toString() + " for " + pos.toString()); } } public void set(List positions, T data) { - for(IrisPosition i : positions) { + for (IrisPosition i : positions) { set(i, data); } } public void set(Set positions, T data) { - for(IrisPosition i : positions) { + for (IrisPosition i : positions) { set(i, data); } } public void setConsumer(Set positions, Function3 data) { - for(IrisPosition i : positions) { + for (IrisPosition i : positions) { set(i, data.apply(i.getX(), i.getY(), i.getZ())); } } @@ -684,11 +626,11 @@ public boolean isWithin(int x, int y, int z) { int cx = x >> 4; int cz = z >> 4; - if(y < 0 || y >= mantle.getWorldHeight()) { + if (y < 0 || y >= mantle.getWorldHeight()) { return false; } return cx >= this.x - radius && cx <= this.x + radius - && cz >= this.z - radius && cz <= this.z + radius; + && cz >= this.z - radius && cz <= this.z + radius; } } diff --git a/src/main/java/com/volmit/iris/engine/mantle/components/MantleCarvingComponent.java b/src/main/java/com/volmit/iris/engine/mantle/components/MantleCarvingComponent.java index 15b9e7edc..09f37e7c6 100644 --- a/src/main/java/com/volmit/iris/engine/mantle/components/MantleCarvingComponent.java +++ b/src/main/java/com/volmit/iris/engine/mantle/components/MantleCarvingComponent.java @@ -40,7 +40,7 @@ public void generateLayer(MantleWriter writer, int x, int z, ChunkContext contex RNG rng = new RNG(Cache.key(x, z) + seed()); int xxx = 8 + (x << 4); int zzz = 8 + (z << 4); - IrisRegion region =getComplex().getRegionStream().get(xxx, zzz); + IrisRegion region = getComplex().getRegionStream().get(xxx, zzz); IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz); carve(writer, rng, x, z, region, biome); } diff --git a/src/main/java/com/volmit/iris/engine/mantle/components/MantleFluidBodyComponent.java b/src/main/java/com/volmit/iris/engine/mantle/components/MantleFluidBodyComponent.java index 6224d37ac..eba06d39d 100644 --- a/src/main/java/com/volmit/iris/engine/mantle/components/MantleFluidBodyComponent.java +++ b/src/main/java/com/volmit/iris/engine/mantle/components/MantleFluidBodyComponent.java @@ -40,7 +40,7 @@ public void generateLayer(MantleWriter writer, int x, int z, ChunkContext contex RNG rng = new RNG(Cache.key(x, z) + seed() + 405666); int xxx = 8 + (x << 4); int zzz = 8 + (z << 4); - IrisRegion region =getComplex().getRegionStream().get(xxx, zzz); + IrisRegion region = getComplex().getRegionStream().get(xxx, zzz); IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz); generate(writer, rng, x, z, region, biome); } diff --git a/src/main/java/com/volmit/iris/engine/mantle/components/MantleJigsawComponent.java b/src/main/java/com/volmit/iris/engine/mantle/components/MantleJigsawComponent.java index a0b019948..fccbd9630 100644 --- a/src/main/java/com/volmit/iris/engine/mantle/components/MantleJigsawComponent.java +++ b/src/main/java/com/volmit/iris/engine/mantle/components/MantleJigsawComponent.java @@ -46,7 +46,7 @@ public void generateLayer(MantleWriter writer, int x, int z, ChunkContext contex RNG rng = new RNG(cng.fit(-Integer.MAX_VALUE, Integer.MAX_VALUE, x, z)); int xxx = 8 + (x << 4); int zzz = 8 + (z << 4); - IrisRegion region =getComplex().getRegionStream().get(xxx, zzz); + IrisRegion region = getComplex().getRegionStream().get(xxx, zzz); IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz); generateJigsaw(writer, rng, x, z, biome, region); } @@ -55,12 +55,12 @@ public void generateLayer(MantleWriter writer, int x, int z, ChunkContext contex private void generateJigsaw(MantleWriter writer, RNG rng, int x, int z, IrisBiome biome, IrisRegion region) { boolean placed = false; - if(getDimension().getStronghold() != null) { + if (getDimension().getStronghold() != null) { List poss = getDimension().getStrongholds(seed()); - if(poss != null) { - for(Position2 pos : poss) { - if(x == pos.getX() >> 4 && z == pos.getZ() >> 4) { + if (poss != null) { + for (Position2 pos : poss) { + if (x == pos.getX() >> 4 && z == pos.getZ() >> 4) { IrisJigsawStructure structure = getData().getJigsawStructureLoader().load(getDimension().getStronghold()); place(writer, pos.toIris(), structure, rng); placed = true; @@ -69,9 +69,9 @@ private void generateJigsaw(MantleWriter writer, RNG rng, int x, int z, IrisBiom } } - if(!placed) { - for(IrisJigsawStructurePlacement i : biome.getJigsawStructures()) { - if(rng.nextInt(i.getRarity()) == 0) { + if (!placed) { + for (IrisJigsawStructurePlacement i : biome.getJigsawStructures()) { + if (rng.nextInt(i.getRarity()) == 0) { IrisPosition position = new IrisPosition((x << 4) + rng.nextInt(15), 0, (z << 4) + rng.nextInt(15)); IrisJigsawStructure structure = getData().getJigsawStructureLoader().load(i.getStructure()); place(writer, position, structure, rng); @@ -80,9 +80,9 @@ private void generateJigsaw(MantleWriter writer, RNG rng, int x, int z, IrisBiom } } - if(!placed) { - for(IrisJigsawStructurePlacement i : region.getJigsawStructures()) { - if(rng.nextInt(i.getRarity()) == 0) { + if (!placed) { + for (IrisJigsawStructurePlacement i : region.getJigsawStructures()) { + if (rng.nextInt(i.getRarity()) == 0) { IrisPosition position = new IrisPosition((x << 4) + rng.nextInt(15), 0, (z << 4) + rng.nextInt(15)); IrisJigsawStructure structure = getData().getJigsawStructureLoader().load(i.getStructure()); place(writer, position, structure, rng); @@ -91,9 +91,9 @@ private void generateJigsaw(MantleWriter writer, RNG rng, int x, int z, IrisBiom } } - if(!placed) { - for(IrisJigsawStructurePlacement i : getDimension().getJigsawStructures()) { - if(rng.nextInt(i.getRarity()) == 0) { + if (!placed) { + for (IrisJigsawStructurePlacement i : getDimension().getJigsawStructures()) { + if (rng.nextInt(i.getRarity()) == 0) { IrisPosition position = new IrisPosition((x << 4) + rng.nextInt(15), 0, (z << 4) + rng.nextInt(15)); IrisJigsawStructure structure = getData().getJigsawStructureLoader().load(i.getStructure()); place(writer, position, structure, rng); @@ -108,32 +108,32 @@ public IrisJigsawStructure guess(int x, int z) { IrisBiome biome = getEngineMantle().getEngine().getSurfaceBiome((x << 4) + 8, (z << 4) + 8); IrisRegion region = getEngineMantle().getEngine().getRegion((x << 4) + 8, (z << 4) + 8); - if(getDimension().getStronghold() != null) { + if (getDimension().getStronghold() != null) { List poss = getDimension().getStrongholds(seed()); - if(poss != null) { - for(Position2 pos : poss) { - if(x == pos.getX() >> 4 && z == pos.getZ() >> 4) { + if (poss != null) { + for (Position2 pos : poss) { + if (x == pos.getX() >> 4 && z == pos.getZ() >> 4) { return getData().getJigsawStructureLoader().load(getDimension().getStronghold()); } } } } - for(IrisJigsawStructurePlacement i : biome.getJigsawStructures()) { - if(rng.nextInt(i.getRarity()) == 0) { + for (IrisJigsawStructurePlacement i : biome.getJigsawStructures()) { + if (rng.nextInt(i.getRarity()) == 0) { return getData().getJigsawStructureLoader().load(i.getStructure()); } } - for(IrisJigsawStructurePlacement i : region.getJigsawStructures()) { - if(rng.nextInt(i.getRarity()) == 0) { + for (IrisJigsawStructurePlacement i : region.getJigsawStructures()) { + if (rng.nextInt(i.getRarity()) == 0) { return getData().getJigsawStructureLoader().load(i.getStructure()); } } - for(IrisJigsawStructurePlacement i : getDimension().getJigsawStructures()) { - if(rng.nextInt(i.getRarity()) == 0) { + for (IrisJigsawStructurePlacement i : getDimension().getJigsawStructures()) { + if (rng.nextInt(i.getRarity()) == 0) { return getData().getJigsawStructureLoader().load(i.getStructure()); } } diff --git a/src/main/java/com/volmit/iris/engine/mantle/components/MantleObjectComponent.java b/src/main/java/com/volmit/iris/engine/mantle/components/MantleObjectComponent.java index 7e42f4fba..ac7fe51e8 100644 --- a/src/main/java/com/volmit/iris/engine/mantle/components/MantleObjectComponent.java +++ b/src/main/java/com/volmit/iris/engine/mantle/components/MantleObjectComponent.java @@ -35,7 +35,6 @@ import com.volmit.iris.util.mantle.MantleFlag; import com.volmit.iris.util.math.RNG; import com.volmit.iris.util.matter.MatterStructurePOI; -import com.volmit.iris.util.matter.slices.StructurePOIMatter; import java.util.Set; @@ -49,7 +48,7 @@ public void generateLayer(MantleWriter writer, int x, int z, ChunkContext contex RNG rng = new RNG(Cache.key(x, z) + seed()); int xxx = 8 + (x << 4); int zzz = 8 + (z << 4); - IrisRegion region =getComplex().getRegionStream().get(xxx, zzz); + IrisRegion region = getComplex().getRegionStream().get(xxx, zzz); IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz); placeObjects(writer, rng, x, z, biome, region); } @@ -58,12 +57,12 @@ public void generateLayer(MantleWriter writer, int x, int z, ChunkContext contex private void placeObjects(MantleWriter writer, RNG rng, int x, int z, IrisBiome biome, IrisRegion region) { long s = Cache.key(x, z) + seed(); RNG rnp = new RNG(s); - for(IrisObjectPlacement i : biome.getSurfaceObjects()) { - if(rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { + for (IrisObjectPlacement i : biome.getSurfaceObjects()) { + if (rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { try { placeObject(writer, rnp, x << 4, z << 4, i); rnp.setSeed(s); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Failed to place objects in the following biome: " + biome.getName()); Iris.error("Object(s) " + i.getPlace().toString(", ") + " (" + e.getClass().getSimpleName() + ")."); @@ -73,12 +72,12 @@ private void placeObjects(MantleWriter writer, RNG rng, int x, int z, IrisBiome } } - for(IrisObjectPlacement i : region.getSurfaceObjects()) { - if(rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { + for (IrisObjectPlacement i : region.getSurfaceObjects()) { + if (rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { try { placeObject(writer, rnp, x << 4, z << 4, i); rnp.setSeed(s); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Failed to place objects in the following region: " + region.getName()); Iris.error("Object(s) " + i.getPlace().toString(", ") + " (" + e.getClass().getSimpleName() + ")."); @@ -91,9 +90,9 @@ private void placeObjects(MantleWriter writer, RNG rng, int x, int z, IrisBiome @BlockCoordinates private void placeObject(MantleWriter writer, RNG rng, int x, int z, IrisObjectPlacement objectPlacement) { - for(int i = 0; i < objectPlacement.getDensity(rng, x, z, getData()); i++) { + for (int i = 0; i < objectPlacement.getDensity(rng, x, z, getData()); i++) { IrisObject v = objectPlacement.getScale().get(rng, objectPlacement.getObject(getComplex(), rng)); - if(v == null) { + if (v == null) { return; } int xx = rng.i(x, x + 15); @@ -101,7 +100,7 @@ private void placeObject(MantleWriter writer, RNG rng, int x, int z, IrisObjectP int id = rng.i(0, Integer.MAX_VALUE); v.place(xx, -1, zz, writer, objectPlacement, rng, (b, data) -> { writer.setData(b.getX(), b.getY(), b.getZ(), v.getLoadKey() + "@" + id); - if(objectPlacement.isDolphinTarget() && objectPlacement.isUnderwater() && B.isStorageChest(data)) { + if (objectPlacement.isDolphinTarget() && objectPlacement.isUnderwater() && B.isStorageChest(data)) { writer.setData(b.getX(), b.getY(), b.getZ(), MatterStructurePOI.BURIED_TREASURE); } }, null, getData()); @@ -111,9 +110,9 @@ private void placeObject(MantleWriter writer, RNG rng, int x, int z, IrisObjectP @BlockCoordinates private Set guessPlacedKeys(RNG rng, int x, int z, IrisObjectPlacement objectPlacement) { Set f = new KSet<>(); - for(int i = 0; i < objectPlacement.getDensity(rng, x, z, getData()); i++) { + for (int i = 0; i < objectPlacement.getDensity(rng, x, z, getData()); i++) { IrisObject v = objectPlacement.getScale().get(rng, objectPlacement.getObject(getComplex(), rng)); - if(v == null) { + if (v == null) { continue; } @@ -130,15 +129,15 @@ public Set guess(int x, int z) { IrisBiome biome = getEngineMantle().getEngine().getSurfaceBiome((x << 4) + 8, (z << 4) + 8); IrisRegion region = getEngineMantle().getEngine().getRegion((x << 4) + 8, (z << 4) + 8); Set v = new KSet<>(); - for(IrisObjectPlacement i : biome.getSurfaceObjects()) { - if(rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { + for (IrisObjectPlacement i : biome.getSurfaceObjects()) { + if (rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { v.addAll(guessPlacedKeys(rngd, x, z, i)); rngd.setSeed(s); } } - for(IrisObjectPlacement i : region.getSurfaceObjects()) { - if(rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { + for (IrisObjectPlacement i : region.getSurfaceObjects()) { + if (rng.chance(i.getChance() + rng.d(-0.005, 0.005))) { v.addAll(guessPlacedKeys(rngd, x, z, i)); rngd.setSeed(s); } diff --git a/src/main/java/com/volmit/iris/engine/mode/ModeEnclosure.java b/src/main/java/com/volmit/iris/engine/mode/ModeEnclosure.java index fd4180f7b..1e66e180e 100644 --- a/src/main/java/com/volmit/iris/engine/mode/ModeEnclosure.java +++ b/src/main/java/com/volmit/iris/engine/mode/ModeEnclosure.java @@ -31,8 +31,8 @@ public ModeEnclosure(Engine engine) { var biome = new IrisBiomeActuator(getEngine()); registerStage(burst( - (x, z, k, p, m, c) -> terrain.actuate(x, z, k, m, c), - (x, z, k, p, m, c) -> biome.actuate(x, z, p, m, c) + (x, z, k, p, m, c) -> terrain.actuate(x, z, k, m, c), + (x, z, k, p, m, c) -> biome.actuate(x, z, p, m, c) )); } } diff --git a/src/main/java/com/volmit/iris/engine/mode/ModeIslands.java b/src/main/java/com/volmit/iris/engine/mode/ModeIslands.java index 2aef78e69..ef3abeae1 100644 --- a/src/main/java/com/volmit/iris/engine/mode/ModeIslands.java +++ b/src/main/java/com/volmit/iris/engine/mode/ModeIslands.java @@ -31,8 +31,8 @@ public ModeIslands(Engine engine) { var biome = new IrisBiomeActuator(getEngine()); registerStage(burst( - (x, z, k, p, m, c) -> terrain.actuate(x, z, k, m, c), - (x, z, k, p, m, c) -> biome.actuate(x, z, p, m, c) + (x, z, k, p, m, c) -> terrain.actuate(x, z, k, m, c), + (x, z, k, p, m, c) -> biome.actuate(x, z, p, m, c) )); } } diff --git a/src/main/java/com/volmit/iris/engine/mode/ModeOverworld.java b/src/main/java/com/volmit/iris/engine/mode/ModeOverworld.java index ab4b0bbb4..3645b7d8c 100644 --- a/src/main/java/com/volmit/iris/engine/mode/ModeOverworld.java +++ b/src/main/java/com/volmit/iris/engine/mode/ModeOverworld.java @@ -44,25 +44,25 @@ public ModeOverworld(Engine engine) { EngineStage sBiome = (x, z, k, p, m, c) -> biome.actuate(x, z, p, m, c); EngineStage sGenMatter = (x, z, k, p, m, c) -> generateMatter(x >> 4, z >> 4, m, c); EngineStage sTerrain = (x, z, k, p, m, c) -> terrain.actuate(x, z, k, m, c); - EngineStage sDecorant = (x, z, k, p, m, c) -> decorant.actuate(x, z, k, m, c); - EngineStage sCave = (x, z, k, p, m, c) -> cave.modify(x >> 4, z >> 4, k, m, c); - EngineStage sDeposit = (x, z, k, p, m, c) -> deposit.modify(x, z, k, m,c); - EngineStage sPost = (x, z, k, p, m, c) -> post.modify(x, z, k, m, c); - EngineStage sInsertMatter = (x, z, K, p, m, c) -> getMantle().insertMatter(x >> 4, z >> 4, BlockData.class, K, m); - EngineStage sPerfection = (x, z, k, p, m, c) -> perfection.modify(x, z, k, m, c); + EngineStage sDecorant = (x, z, k, p, m, c) -> decorant.actuate(x, z, k, m, c); + EngineStage sCave = (x, z, k, p, m, c) -> cave.modify(x >> 4, z >> 4, k, m, c); + EngineStage sDeposit = (x, z, k, p, m, c) -> deposit.modify(x, z, k, m, c); + EngineStage sPost = (x, z, k, p, m, c) -> post.modify(x, z, k, m, c); + EngineStage sInsertMatter = (x, z, K, p, m, c) -> getMantle().insertMatter(x >> 4, z >> 4, BlockData.class, K, m); + EngineStage sPerfection = (x, z, k, p, m, c) -> perfection.modify(x, z, k, m, c); registerStage(burst( - sGenMatter, - sTerrain + sGenMatter, + sTerrain )); registerStage(burst( - sCave, - sPost + sCave, + sPost )); registerStage(burst( - sDeposit, - sInsertMatter, - sDecorant + sDeposit, + sInsertMatter, + sDecorant )); registerStage(sPerfection); diff --git a/src/main/java/com/volmit/iris/engine/mode/ModeSuperFlat.java b/src/main/java/com/volmit/iris/engine/mode/ModeSuperFlat.java index 2b45709b3..5a0e93caf 100644 --- a/src/main/java/com/volmit/iris/engine/mode/ModeSuperFlat.java +++ b/src/main/java/com/volmit/iris/engine/mode/ModeSuperFlat.java @@ -31,8 +31,8 @@ public ModeSuperFlat(Engine engine) { var biome = new IrisBiomeActuator(getEngine()); registerStage(burst( - (x, z, k, p, m, c) -> terrain.actuate(x, z, k, m, c), - (x, z, k, p, m, c) -> biome.actuate(x, z, p, m, c) + (x, z, k, p, m, c) -> terrain.actuate(x, z, k, m, c), + (x, z, k, p, m, c) -> biome.actuate(x, z, p, m, c) )); } } diff --git a/src/main/java/com/volmit/iris/engine/modifier/IrisCarveModifier.java b/src/main/java/com/volmit/iris/engine/modifier/IrisCarveModifier.java index 018ccdefb..8fe8d1405 100644 --- a/src/main/java/com/volmit/iris/engine/modifier/IrisCarveModifier.java +++ b/src/main/java/com/volmit/iris/engine/modifier/IrisCarveModifier.java @@ -61,11 +61,11 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch KMap> positions = new KMap<>(); KMap walls = new KMap<>(); Consumer4 iterator = (xx, yy, zz, c) -> { - if(c == null) { + if (c == null) { return; } - if(yy >= getEngine().getWorld().maxHeight() - getEngine().getWorld().minHeight() || yy <= 0) { // Yes, skip bedrock + if (yy >= getEngine().getWorld().maxHeight() - getEngine().getWorld().minHeight() || yy <= 0) { // Yes, skip bedrock return; } @@ -74,7 +74,7 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch BlockData current = output.get(rx, yy, rz); - if(B.isFluid(current)) { + if (B.isFluid(current)) { return; } @@ -82,32 +82,32 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch //todo: Fix chunk decoration not working on chunk's border - if(rz < 15 && mantle.get(xx, yy, zz + 1, MatterCavern.class) == null) { + if (rz < 15 && mantle.get(xx, yy, zz + 1, MatterCavern.class) == null) { walls.put(new IrisPosition(rx, yy, rz + 1), c); } - if(rx < 15 && mantle.get(xx + 1, yy, zz, MatterCavern.class) == null) { + if (rx < 15 && mantle.get(xx + 1, yy, zz, MatterCavern.class) == null) { walls.put(new IrisPosition(rx + 1, yy, rz), c); } - if(rz > 0 && mantle.get(xx, yy, zz - 1, MatterCavern.class) == null) { + if (rz > 0 && mantle.get(xx, yy, zz - 1, MatterCavern.class) == null) { walls.put(new IrisPosition(rx, yy, rz - 1), c); } - if(rx > 0 && mantle.get(xx - 1, yy, zz, MatterCavern.class) == null) { + if (rx > 0 && mantle.get(xx - 1, yy, zz, MatterCavern.class) == null) { walls.put(new IrisPosition(rx - 1, yy, rz), c); } - if(current.getMaterial().isAir()) { + if (current.getMaterial().isAir()) { return; } - if(c.isWater()) { + if (c.isWater()) { output.set(rx, yy, rz, WATER); - } else if(c.isLava()) { + } else if (c.isLava()) { output.set(rx, yy, rz, LAVA); } else { - if(getEngine().getDimension().getCaveLavaHeight() > yy) { + if (getEngine().getDimension().getCaveLavaHeight() > yy) { output.set(rx, yy, rz, LAVA); } else { output.set(rx, yy, rz, AIR); @@ -119,21 +119,21 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch walls.forEach((i, v) -> { IrisBiome biome = v.getCustomBiome().isEmpty() - ? getEngine().getCaveBiome(i.getX() + (x << 4), i.getZ() + (z << 4)) - : getEngine().getData().getBiomeLoader().load(v.getCustomBiome()); + ? getEngine().getCaveBiome(i.getX() + (x << 4), i.getZ() + (z << 4)) + : getEngine().getData().getBiomeLoader().load(v.getCustomBiome()); - if(biome != null) { + if (biome != null) { biome.setInferredType(InferredType.CAVE); BlockData d = biome.getWall().get(rng, i.getX() + (x << 4), i.getY(), i.getZ() + (z << 4), getData()); - if(d != null && B.isSolid(output.get(i.getX(), i.getY(), i.getZ())) && i.getY() <= context.getHeight().get(i.getX(), i.getZ())) { + if (d != null && B.isSolid(output.get(i.getX(), i.getY(), i.getZ())) && i.getY() <= context.getHeight().get(i.getX(), i.getZ())) { output.set(i.getX(), i.getY(), i.getZ(), d); } } }); positions.forEach((k, v) -> { - if(v.isEmpty()) { + if (v.isEmpty()) { return; } @@ -144,15 +144,15 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch zone.setFloor(v.get(0)); int buf = v.get(0) - 1; - for(Integer i : v) { - if(i < 0 || i > getEngine().getHeight()) { + for (Integer i : v) { + if (i < 0 || i > getEngine().getHeight()) { continue; } - if(i == buf + 1) { + if (i == buf + 1) { buf = i; zone.ceiling = buf; - } else if(zone.isValid(getEngine())) { + } else if (zone.isValid(getEngine())) { processZone(output, mc, mantle, zone, rx, rz, rx + (x << 4), rz + (z << 4)); zone = new CaveZone(); zone.setFloor(i); @@ -160,7 +160,7 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch } } - if(zone.isValid(getEngine())) { + if (zone.isValid(getEngine())) { processZone(output, mc, mantle, zone, rx, rz, rx + (x << 4), rz + (z << 4)); } }); @@ -175,62 +175,62 @@ private void processZone(Hunk output, MantleChunk mc, Mantle mantle, int thickness = zone.airThickness(); String customBiome = ""; - if(B.isDecorant(output.getClosest(rx, zone.ceiling + 1, rz))) { + if (B.isDecorant(output.getClosest(rx, zone.ceiling + 1, rz))) { output.set(rx, zone.ceiling + 1, rz, AIR); } - if(B.isDecorant(output.get(rx, zone.ceiling, rz))) { + if (B.isDecorant(output.get(rx, zone.ceiling, rz))) { output.set(rx, zone.ceiling, rz, AIR); } - if(M.r(1D / 16D)) { + if (M.r(1D / 16D)) { mantle.set(xx, zone.ceiling, zz, MarkerMatter.CAVE_CEILING); } - if(M.r(1D / 16D)) { + if (M.r(1D / 16D)) { mantle.set(xx, zone.floor, zz, MarkerMatter.CAVE_FLOOR); } - for(int i = zone.floor; i <= zone.ceiling; i++) { + for (int i = zone.floor; i <= zone.ceiling; i++) { MatterCavern cavernData = (MatterCavern) mc.getOrCreate(i >> 4).slice(MatterCavern.class) - .get(rx, i & 15, rz); + .get(rx, i & 15, rz); - if(cavernData != null && !cavernData.getCustomBiome().isEmpty()) { + if (cavernData != null && !cavernData.getCustomBiome().isEmpty()) { customBiome = cavernData.getCustomBiome(); break; } } IrisBiome biome = customBiome.isEmpty() - ? getEngine().getCaveBiome(xx, zz) - : getEngine().getData().getBiomeLoader().load(customBiome); + ? getEngine().getCaveBiome(xx, zz) + : getEngine().getData().getBiomeLoader().load(customBiome); - if(biome == null) { + if (biome == null) { return; } biome.setInferredType(InferredType.CAVE); - for(IrisDecorator i : biome.getDecorators()) { - if(i.getPartOf().equals(IrisDecorationPart.NONE) && B.isSolid(output.get(rx, zone.getFloor() - 1, rz))) { + for (IrisDecorator i : biome.getDecorators()) { + if (i.getPartOf().equals(IrisDecorationPart.NONE) && B.isSolid(output.get(rx, zone.getFloor() - 1, rz))) { decorant.getSurfaceDecorator().decorate(rx, rz, xx, xx, xx, zz, zz, zz, output, biome, zone.getFloor() - 1, zone.airThickness()); - } else if(i.getPartOf().equals(IrisDecorationPart.CEILING) && B.isSolid(output.get(rx, zone.getCeiling() + 1, rz))) { + } else if (i.getPartOf().equals(IrisDecorationPart.CEILING) && B.isSolid(output.get(rx, zone.getCeiling() + 1, rz))) { decorant.getCeilingDecorator().decorate(rx, rz, xx, xx, xx, zz, zz, zz, output, biome, zone.getCeiling(), zone.airThickness()); } } KList blocks = biome.generateLayers(getDimension(), xx, zz, rng, 3, zone.floor, getData(), getComplex()); - for(int i = 0; i < zone.floor - 1; i++) { - if(!blocks.hasIndex(i)) { + for (int i = 0; i < zone.floor - 1; i++) { + if (!blocks.hasIndex(i)) { break; } - if(!B.isSolid(output.get(rx, zone.floor - i - 1, rz))) { + if (!B.isSolid(output.get(rx, zone.floor - i - 1, rz))) { continue; } - if(B.isOre(output.get(rx, zone.floor - i - 1, rz))) { + if (B.isOre(output.get(rx, zone.floor - i - 1, rz))) { continue; } @@ -239,20 +239,20 @@ private void processZone(Hunk output, MantleChunk mc, Mantle mantle, blocks = biome.generateCeilingLayers(getDimension(), xx, zz, rng, 3, zone.ceiling, getData(), getComplex()); - if(zone.ceiling + 1 < mantle.getWorldHeight()) { - for(int i = 0; i < zone.ceiling + 1; i++) { - if(!blocks.hasIndex(i)) { + if (zone.ceiling + 1 < mantle.getWorldHeight()) { + for (int i = 0; i < zone.ceiling + 1; i++) { + if (!blocks.hasIndex(i)) { break; } BlockData b = blocks.get(i); BlockData up = output.get(rx, zone.ceiling + i + 1, rz); - if(!B.isSolid(up)) { + if (!B.isSolid(up)) { continue; } - if(B.isOre(up)) { + if (B.isOre(up)) { output.set(rx, zone.ceiling + i + 1, rz, B.toDeepSlateOre(up, b)); continue; } diff --git a/src/main/java/com/volmit/iris/engine/modifier/IrisDepositModifier.java b/src/main/java/com/volmit/iris/engine/modifier/IrisDepositModifier.java index f09ab816c..5d0917c66 100644 --- a/src/main/java/com/volmit/iris/engine/modifier/IrisDepositModifier.java +++ b/src/main/java/com/volmit/iris/engine/modifier/IrisDepositModifier.java @@ -51,22 +51,22 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch public void generateDeposits(RNG rx, Hunk terrain, int x, int z, boolean multicore, ChunkContext context) { RNG ro = rx.nextParallelRNG(x * x).nextParallelRNG(z * z); - IrisRegion region = context.getRegion().get(7,7); - IrisBiome biome = context.getBiome().get(7,7); + IrisRegion region = context.getRegion().get(7, 7); + IrisBiome biome = context.getBiome().get(7, 7); BurstExecutor burst = burst().burst(multicore); - for(IrisDepositGenerator k : getDimension().getDeposits()) { + for (IrisDepositGenerator k : getDimension().getDeposits()) { burst.queue(() -> generate(k, terrain, ro, x, z, false, context)); } - for(IrisDepositGenerator k : region.getDeposits()) { - for(int l = 0; l < ro.i(k.getMinPerChunk(), k.getMaxPerChunk()); l++) { + for (IrisDepositGenerator k : region.getDeposits()) { + for (int l = 0; l < ro.i(k.getMinPerChunk(), k.getMaxPerChunk()); l++) { burst.queue(() -> generate(k, terrain, ro, x, z, false, context)); } } - for(IrisDepositGenerator k : biome.getDeposits()) { - for(int l = 0; l < ro.i(k.getMinPerChunk(), k.getMaxPerChunk()); l++) { + for (IrisDepositGenerator k : biome.getDeposits()) { + for (int l = 0; l < ro.i(k.getMinPerChunk(), k.getMaxPerChunk()); l++) { burst.queue(() -> generate(k, terrain, ro, x, z, false, context)); } } @@ -78,13 +78,13 @@ public void generate(IrisDepositGenerator k, Hunk data, RNG rng, int } public void generate(IrisDepositGenerator k, Hunk data, RNG rng, int cx, int cz, boolean safe, HeightMap he, ChunkContext context) { - for(int l = 0; l < rng.i(k.getMinPerChunk(), k.getMaxPerChunk()); l++) { + for (int l = 0; l < rng.i(k.getMinPerChunk(), k.getMaxPerChunk()); l++) { IrisObject clump = k.getClump(rng, getData()); int af = (int) Math.floor(clump.getW() / 2D); int bf = (int) Math.floor(16D - (clump.getW() / 2D)); - if(af > bf || af < 0 || bf > 15 || af > 15 || bf < 0) { + if (af > bf || af < 0 || bf > 15 || af > 15 || bf < 0) { af = 6; bf = 9; } @@ -93,10 +93,10 @@ public void generate(IrisDepositGenerator k, Hunk data, RNG rng, int int x = rng.i(af, bf); int z = rng.i(af, bf); int height = (he != null ? he.getHeight((cx << 4) + x, (cz << 4) + z) : (int) (Math.round( - context.getHeight().get( x, z) + context.getHeight().get(x, z) ))) - 7; - if(height <= 0) { + if (height <= 0) { return; } @@ -104,26 +104,26 @@ public void generate(IrisDepositGenerator k, Hunk data, RNG rng, int // TODO: WARNING HEIGHT int a = Math.min(height, Math.min(getEngine().getHeight(), k.getMaxHeight())); - if(i >= a) { + if (i >= a) { return; } int h = rng.i(i, a); - if(h > k.getMaxHeight() || h < k.getMinHeight() || h > height - 2) { + if (h > k.getMaxHeight() || h < k.getMinHeight() || h > height - 2) { return; } - for(BlockVector j : clump.getBlocks().keySet()) { + for (BlockVector j : clump.getBlocks().keySet()) { int nx = j.getBlockX() + x; int ny = j.getBlockY() + h; int nz = j.getBlockZ() + z; - if(ny > height || nx > 15 || nx < 0 || ny > getEngine().getHeight() || ny < 0 || nz < 0 || nz > 15) { + if (ny > height || nx > 15 || nx < 0 || ny > getEngine().getHeight() || ny < 0 || nz < 0 || nz > 15) { continue; } - if(!getEngine().getMantle().isCarved((cx << 4) + nx, ny, (cz << 4) + nz)) { + if (!getEngine().getMantle().isCarved((cx << 4) + nx, ny, (cz << 4) + nz)) { data.set(nx, ny, nz, B.toDeepSlateOre(data.get(nx, ny, nz), clump.getBlocks().get(j))); } } diff --git a/src/main/java/com/volmit/iris/engine/modifier/IrisPerfectionModifier.java b/src/main/java/com/volmit/iris/engine/modifier/IrisPerfectionModifier.java index df0f2f3de..9aa9085e4 100644 --- a/src/main/java/com/volmit/iris/engine/modifier/IrisPerfectionModifier.java +++ b/src/main/java/com/volmit/iris/engine/modifier/IrisPerfectionModifier.java @@ -50,27 +50,27 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch List surfaces = new ArrayList<>(); List ceilings = new ArrayList<>(); BurstExecutor burst = burst().burst(multicore); - while(changed.get()) { + while (changed.get()) { passes++; changed.set(false); - for(int i = 0; i < 16; i++) { + for (int i = 0; i < 16; i++) { int finalI = i; burst.queue(() -> { - for(int j = 0; j < 16; j++) { + for (int j = 0; j < 16; j++) { surfaces.clear(); ceilings.clear(); int top = getHeight(output, finalI, j); boolean inside = true; surfaces.add(top); - for(int k = top; k >= 0; k--) { + for (int k = top; k >= 0; k--) { BlockData b = output.get(finalI, k, j); boolean now = b != null && !(B.isAir(b) || B.isFluid(b)); - if(now != inside) { + if (now != inside) { inside = now; - if(inside) { + if (inside) { surfaces.add(k); } else { ceilings.add(k + 1); @@ -78,37 +78,37 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch } } - for(int k : surfaces) { + for (int k : surfaces) { BlockData tip = output.get(finalI, k, j); - if(tip == null) { + if (tip == null) { continue; } boolean remove = false; boolean remove2 = false; - if(B.isDecorant(tip)) { + if (B.isDecorant(tip)) { BlockData bel = output.get(finalI, k - 1, j); - if(bel == null) { + if (bel == null) { remove = true; - } else if(!B.canPlaceOnto(tip.getMaterial(), bel.getMaterial())) { + } else if (!B.canPlaceOnto(tip.getMaterial(), bel.getMaterial())) { remove = true; - } else if(bel instanceof Bisected) { + } else if (bel instanceof Bisected) { BlockData bb = output.get(finalI, k - 2, j); - if(bb == null || !B.canPlaceOnto(bel.getMaterial(), bb.getMaterial())) { + if (bb == null || !B.canPlaceOnto(bel.getMaterial(), bb.getMaterial())) { remove = true; remove2 = true; } } - if(remove) { + if (remove) { changed.set(true); changes.getAndIncrement(); output.set(finalI, k, j, AIR); - if(remove2) { + if (remove2) { changes.getAndIncrement(); output.set(finalI, k - 1, j, AIR); } @@ -124,10 +124,10 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch } private int getHeight(Hunk output, int x, int z) { - for(int i = output.getHeight() - 1; i >= 0; i--) { + for (int i = output.getHeight() - 1; i >= 0; i--) { BlockData b = output.get(x, i, z); - if(b != null && !B.isAir(b) && !B.isFluid(b)) { + if (b != null && !B.isAir(b) && !B.isFluid(b)) { return i; } } diff --git a/src/main/java/com/volmit/iris/engine/modifier/IrisPostModifier.java b/src/main/java/com/volmit/iris/engine/modifier/IrisPostModifier.java index 8d25982cd..6d85e3205 100644 --- a/src/main/java/com/volmit/iris/engine/modifier/IrisPostModifier.java +++ b/src/main/java/com/volmit/iris/engine/modifier/IrisPostModifier.java @@ -51,8 +51,8 @@ public void onModify(int x, int z, Hunk output, boolean multicore, Ch AtomicInteger i = new AtomicInteger(); AtomicInteger j = new AtomicInteger(); Hunk sync = output.synchronize(); - for(i.set(0); i.get() < output.getWidth(); i.getAndIncrement()) { - for(j.set(0); j.get() < output.getDepth(); j.getAndIncrement()) { + for (i.set(0); i.get() < output.getWidth(); i.getAndIncrement()) { + for (j.set(0); j.get() < output.getDepth(); j.getAndIncrement()) { int ii = i.get(); int jj = j.get(); post(ii, jj, sync, ii + x, jj + z, context); @@ -72,7 +72,7 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat // Floating Nibs int g = 0; - if(h < 1) { + if (h < 1) { return; } @@ -81,11 +81,11 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat g += hc < h - 1 ? 1 : 0; g += hd < h - 1 ? 1 : 0; - if(g == 4 && isAir(x, h - 1, z, currentPostX, currentPostZ, currentData)) { + if (g == 4 && isAir(x, h - 1, z, currentPostX, currentPostZ, currentData)) { setPostBlock(x, h, z, AIR, currentPostX, currentPostZ, currentData); - for(int i = h - 1; i > 0; i--) { - if(!isAir(x, i, z, currentPostX, currentPostZ, currentData)) { + for (int i = h - 1; i > 0; i--) { + if (!isAir(x, i, z, currentPostX, currentPostZ, currentData)) { h = i; break; } @@ -99,13 +99,13 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat g += hc == h - 1 ? 1 : 0; g += hd == h - 1 ? 1 : 0; - if(g >= 4) { + if (g >= 4) { BlockData bc = getPostBlock(x, h, z, currentPostX, currentPostZ, currentData); BlockData b = getPostBlock(x, h + 1, z, currentPostX, currentPostZ, currentData); Material m = bc.getMaterial(); - if((b.getMaterial().isOccluding() && b.getMaterial().isSolid())) { - if(m.isSolid()) { + if ((b.getMaterial().isOccluding() && b.getMaterial().isSolid())) { + if (m.isSolid()) { setPostBlock(x, h, z, b, currentPostX, currentPostZ, currentData); h--; } @@ -118,7 +118,7 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat g += hc == h + 1 ? 1 : 0; g += hd == h + 1 ? 1 : 0; - if(g >= 4) { + if (g >= 4) { BlockData ba = getPostBlock(x, ha, z, currentPostX, currentPostZ, currentData); BlockData bb = getPostBlock(x, hb, z, currentPostX, currentPostZ, currentData); BlockData bc = getPostBlock(x, hc, z, currentPostX, currentPostZ, currentData); @@ -129,7 +129,7 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat g = B.isSolid(bc) ? g + 1 : g; g = B.isSolid(bd) ? g + 1 : g; - if(g >= 3) { + if (g >= 3) { setPostBlock(x, h + 1, z, getPostBlock(x, h, z, currentPostX, currentPostZ, currentData), currentPostX, currentPostZ, currentData); h++; } @@ -139,18 +139,18 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat // Wall Patcher IrisBiome biome = context.getBiome().get(currentPostX, currentPostZ); - if(getDimension().isPostProcessingWalls()) { - if(!biome.getWall().getPalette().isEmpty()) { - if(ha < h - 2 || hb < h - 2 || hc < h - 2 || hd < h - 2) { + if (getDimension().isPostProcessingWalls()) { + if (!biome.getWall().getPalette().isEmpty()) { + if (ha < h - 2 || hb < h - 2 || hc < h - 2 || hd < h - 2) { boolean brokeGround = false; int max = Math.abs(Math.max(h - ha, Math.max(h - hb, Math.max(h - hc, h - hd)))); - for(int i = h; i > h - max; i--) { + for (int i = h; i > h - max; i--) { BlockData d = biome.getWall().get(rng, x + i, i + h, z + i, getData()); - if(d != null) { - if(isAirOrWater(x, i, z, currentPostX, currentPostZ, currentData)) { - if(brokeGround) { + if (d != null) { + if (isAirOrWater(x, i, z, currentPostX, currentPostZ, currentData)) { + if (brokeGround) { break; } @@ -166,28 +166,28 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat } // Slab - if(getDimension().isPostProcessingSlabs()) { + if (getDimension().isPostProcessingSlabs()) { //@builder - if((ha == h + 1 && isSolidNonSlab(x + 1, ha, z, currentPostX, currentPostZ, currentData)) - || (hb == h + 1 && isSolidNonSlab(x, hb, z + 1, currentPostX, currentPostZ, currentData)) - || (hc == h + 1 && isSolidNonSlab(x - 1, hc, z, currentPostX, currentPostZ, currentData)) - || (hd == h + 1 && isSolidNonSlab(x, hd, z - 1, currentPostX, currentPostZ, currentData))) + if ((ha == h + 1 && isSolidNonSlab(x + 1, ha, z, currentPostX, currentPostZ, currentData)) + || (hb == h + 1 && isSolidNonSlab(x, hb, z + 1, currentPostX, currentPostZ, currentData)) + || (hc == h + 1 && isSolidNonSlab(x - 1, hc, z, currentPostX, currentPostZ, currentData)) + || (hd == h + 1 && isSolidNonSlab(x, hd, z - 1, currentPostX, currentPostZ, currentData))) //@done { BlockData d = biome.getSlab().get(rng, x, h, z, getData()); - if(d != null) { + if (d != null) { boolean cancel = B.isAir(d); - if(d.getMaterial().equals(Material.SNOW) && h + 1 <= getDimension().getFluidHeight()) { + if (d.getMaterial().equals(Material.SNOW) && h + 1 <= getDimension().getFluidHeight()) { cancel = true; } - if(isSnowLayer(x, h, z, currentPostX, currentPostZ, currentData)) { + if (isSnowLayer(x, h, z, currentPostX, currentPostZ, currentData)) { cancel = true; } - if(!cancel && isAirOrWater(x, h + 1, z, currentPostX, currentPostZ, currentData)) { + if (!cancel && isAirOrWater(x, h + 1, z, currentPostX, currentPostZ, currentData)) { setPostBlock(x, h + 1, z, d, currentPostX, currentPostZ, currentData); h++; } @@ -198,24 +198,24 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat // Waterlogging BlockData b = getPostBlock(x, h, z, currentPostX, currentPostZ, currentData); - if(b instanceof Waterlogged) { + if (b instanceof Waterlogged) { Waterlogged ww = (Waterlogged) b.clone(); boolean w = false; - if(h <= getDimension().getFluidHeight() + 1) { - if(isWaterOrWaterlogged(x, h + 1, z, currentPostX, currentPostZ, currentData)) { + if (h <= getDimension().getFluidHeight() + 1) { + if (isWaterOrWaterlogged(x, h + 1, z, currentPostX, currentPostZ, currentData)) { w = true; - } else if((isWaterOrWaterlogged(x + 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x - 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z + 1, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z - 1, currentPostX, currentPostZ, currentData))) { + } else if ((isWaterOrWaterlogged(x + 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x - 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z + 1, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z - 1, currentPostX, currentPostZ, currentData))) { w = true; } } - if(w != ww.isWaterlogged()) { + if (w != ww.isWaterlogged()) { ww.setWaterlogged(w); setPostBlock(x, h, z, ww, currentPostX, currentPostZ, currentData); } - } else if(b.getMaterial().equals(Material.AIR) && h <= getDimension().getFluidHeight()) { - if((isWaterOrWaterlogged(x + 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x - 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z + 1, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z - 1, currentPostX, currentPostZ, currentData))) { + } else if (b.getMaterial().equals(Material.AIR) && h <= getDimension().getFluidHeight()) { + if ((isWaterOrWaterlogged(x + 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x - 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z + 1, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z - 1, currentPostX, currentPostZ, currentData))) { setPostBlock(x, h, z, WATER, currentPostX, currentPostZ, currentData); } } @@ -223,7 +223,7 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat // Foliage b = getPostBlock(x, h + 1, z, currentPostX, currentPostZ, currentData); - if(B.isVineBlock(b) && b instanceof MultipleFacing f) { + if (B.isVineBlock(b) && b instanceof MultipleFacing f) { int finalH = h + 1; f.getAllowedFaces().forEach(face -> { @@ -233,10 +233,10 @@ private void post(int currentPostX, int currentPostZ, Hunk currentDat setPostBlock(x, h + 1, z, b, currentPostX, currentPostZ, currentData); } - if(B.isFoliage(b) || b.getMaterial().equals(Material.DEAD_BUSH)) { + if (B.isFoliage(b) || b.getMaterial().equals(Material.DEAD_BUSH)) { Material onto = getPostBlock(x, h, z, currentPostX, currentPostZ, currentData).getMaterial(); - if(!B.canPlaceOnto(b.getMaterial(), onto) && !B.isDecorant(b)) { + if (!B.canPlaceOnto(b.getMaterial(), onto) && !B.isDecorant(b)) { setPostBlock(x, h + 1, z, AIR, currentPostX, currentPostZ, currentData); } } @@ -293,7 +293,7 @@ public boolean isLiquid(int x, int y, int z, int currentPostX, int currentPostZ, } public void setPostBlock(int x, int y, int z, BlockData d, int currentPostX, int currentPostZ, Hunk currentData) { - if(y < currentData.getHeight()) { + if (y < currentData.getHeight()) { currentData.set(x & 15, y, z & 15, d); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IRare.java b/src/main/java/com/volmit/iris/engine/object/IRare.java index c11a9c3f1..56f4da4d4 100644 --- a/src/main/java/com/volmit/iris/engine/object/IRare.java +++ b/src/main/java/com/volmit/iris/engine/object/IRare.java @@ -27,37 +27,37 @@ public interface IRare { static ProceduralStream stream(ProceduralStream noise, List possibilities) { return ProceduralStream.of((x, z) -> pick(possibilities, noise.get(x, z)), - (x, y, z) -> pick(possibilities, noise.get(x, y, z)), - new Interpolated() { - @Override - public double toDouble(T t) { - return 0; - } - - @Override - public T fromDouble(double d) { - return null; - } - }); + (x, y, z) -> pick(possibilities, noise.get(x, y, z)), + new Interpolated() { + @Override + public double toDouble(T t) { + return 0; + } + + @Override + public T fromDouble(double d) { + return null; + } + }); } static T pickSlowly(List possibilities, double noiseValue) { - if(possibilities.isEmpty()) { + if (possibilities.isEmpty()) { return null; } - if(possibilities.size() == 1) { + if (possibilities.size() == 1) { return possibilities.get(0); } KList rarityTypes = new KList<>(); int totalRarity = 0; - for(T i : possibilities) { + for (T i : possibilities) { totalRarity += IRare.get(i); } - for(T i : possibilities) { + for (T i : possibilities) { rarityTypes.addMultiple(i, totalRarity / IRare.get(i)); } @@ -65,23 +65,23 @@ static T pickSlowly(List possibilities, double noiseValue) } static T pick(List possibilities, double noiseValue) { - if(possibilities.isEmpty()) { + if (possibilities.isEmpty()) { return null; } - if(possibilities.size() == 1) { + if (possibilities.size() == 1) { return possibilities.get(0); } int totalWeight = 0; // This is he baseline int buffer = 0; - for(T i : possibilities) { // Im adding all of the rarity together + for (T i : possibilities) { // Im adding all of the rarity together totalWeight += i.getRarity(); } double threshold = totalWeight * (possibilities.size() - 1) * noiseValue; - for(T i : possibilities) { + for (T i : possibilities) { buffer += totalWeight - i.getRarity(); - if(buffer >= threshold) { + if (buffer >= threshold) { return i; } } @@ -90,18 +90,18 @@ static T pick(List possibilities, double noiseValue) { static T pickOld(List possibilities, double noiseValue) { - if(possibilities.isEmpty()) { + if (possibilities.isEmpty()) { return null; } - if(possibilities.size() == 1) { + if (possibilities.size() == 1) { return possibilities.get(0); } double completeWeight = 0.0; double highestWeight = 0.0; - for(T item : possibilities) { + for (T item : possibilities) { double weight = Math.max(item.getRarity(), 1); highestWeight = Math.max(highestWeight, weight); completeWeight += weight; @@ -110,10 +110,10 @@ static T pickOld(List possibilities, double noiseValue) { double r = noiseValue * completeWeight; double countWeight = 0.0; - for(T item : possibilities) { + for (T item : possibilities) { double weight = Math.max(highestWeight - Math.max(item.getRarity(), 1), 1); countWeight += weight; - if(countWeight >= r) { + if (countWeight >= r) { return item; } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisAttributeModifier.java b/src/main/java/com/volmit/iris/engine/object/IrisAttributeModifier.java index a352ff238..6108680f6 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisAttributeModifier.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisAttributeModifier.java @@ -61,13 +61,13 @@ public class IrisAttributeModifier { private double chance = 1; public void apply(RNG rng, ItemMeta meta) { - if(rng.nextDouble() < getChance()) { + if (rng.nextDouble() < getChance()) { meta.addAttributeModifier(getAttribute(), new AttributeModifier(getName(), getAmount(rng), getOperation())); } } public void apply(RNG rng, Attributable meta) { - if(rng.nextDouble() < getChance()) { + if (rng.nextDouble() < getChance()) { meta.getAttribute(getAttribute()).addModifier(new AttributeModifier(getName(), getAmount(rng), getOperation())); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisAxisRotationClamp.java b/src/main/java/com/volmit/iris/engine/object/IrisAxisRotationClamp.java index 636178bae..44b1bf421 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisAxisRotationClamp.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisAxisRotationClamp.java @@ -73,19 +73,19 @@ public boolean isLocked() { } public double getRadians(int rng) { - if(forceLock) { + if (forceLock) { return Math.toRadians(Math.ceil(Math.abs((max % 360D)))); } - if(isUnlimited()) { - if(interval < 1) { + if (isUnlimited()) { + if (interval < 1) { interval = 1; } return Math.toRadians((interval * (Math.ceil(Math.abs((rng % 360D) / interval)))) % 360D); } - if(min == max && min != 0) { + if (min == max && min != 0) { return Math.toRadians(max); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisBiome.java b/src/main/java/com/volmit/iris/engine/object/IrisBiome.java index 7712c7af2..b61ab3224 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisBiome.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisBiome.java @@ -172,14 +172,14 @@ public class IrisBiome extends IrisRegistrant implements IRare { private KList ores = new KList<>(); public BlockData generateOres(int x, int y, int z, RNG rng, IrisData data) { - if(ores.isEmpty()) { + if (ores.isEmpty()) { return null; } BlockData b = null; - for(IrisOreGenerator i : ores) { + for (IrisOreGenerator i : ores) { b = i.generate(x, y, z, rng, data); - if(b != null) { + if (b != null) { return b; } } @@ -199,7 +199,7 @@ public double getGenLinkMax(String loadKey) { { KMap l = new KMap<>(); - for(IrisBiomeGeneratorLink i : getGenerators()) { + for (IrisBiomeGeneratorLink i : getGenerators()) { l.put(i.getGenerator(), i.getMax()); } @@ -214,7 +214,7 @@ public double getGenLinkMin(String loadKey) { { KMap l = new KMap<>(); - for(IrisBiomeGeneratorLink i : getGenerators()) { + for (IrisBiomeGeneratorLink i : getGenerators()) { l.put(i.getGenerator(), i.getMin()); } @@ -229,7 +229,7 @@ public IrisBiomeGeneratorLink getGenLink(String loadKey) { { KMap l = new KMap<>(); - for(IrisBiomeGeneratorLink i : getGenerators()) { + for (IrisBiomeGeneratorLink i : getGenerators()) { l.put(i.getGenerator(), i); } @@ -242,7 +242,7 @@ public IrisBiome getRealCarvingBiome(IrisData data) { { IrisBiome biome = data.getBiomeLoader().load(getCarvingBiome()); - if(biome == null) { + if (biome == null) { biome = this; } @@ -255,8 +255,8 @@ public KList getSurfaceObjects() { { KList o = getObjects().copy(); - for(IrisObjectPlacement i : o.copy()) { - if(!i.getCarvingSupport().supportsSurface()) { + for (IrisObjectPlacement i : o.copy()) { + if (!i.getCarvingSupport().supportsSurface()) { o.remove(i); } } @@ -270,8 +270,8 @@ public KList getCarvingObjects() { { KList o = getObjects().copy(); - for(IrisObjectPlacement i : o.copy()) { - if(!i.getCarvingSupport().supportsCarving()) { + for (IrisObjectPlacement i : o.copy()) { + if (!i.getCarvingSupport().supportsCarving()) { o.remove(i); } } @@ -283,7 +283,7 @@ public KList getCarvingObjects() { public double getHeight(Engine xg, double x, double z, long seed) { double height = 0; - for(IrisBiomeGeneratorLink i : generators) { + for (IrisBiomeGeneratorLink i : generators) { height += i.getHeight(xg, x, z, seed); } @@ -292,7 +292,7 @@ public double getHeight(Engine xg, double x, double z, long seed) { public CNG getBiomeGenerator(RNG random) { return biomeGenerator.aquire(() -> - biomeStyle.create(random.nextParallelRNG(213949 + 228888 + getRarity() + getName().length()), getLoader())); + biomeStyle.create(random.nextParallelRNG(213949 + 228888 + getRarity() + getName().length()), getLoader())); } public CNG getChildrenGenerator(RNG random, int sig, double scale) { @@ -300,54 +300,54 @@ public CNG getChildrenGenerator(RNG random, int sig, double scale) { } public KList generateLayers(IrisDimension dim, double wx, double wz, RNG random, int maxDepth, int height, IrisData rdata, IrisComplex complex) { - if(isLockLayers()) { + if (isLockLayers()) { return generateLockedLayers(wx, wz, random, maxDepth, height, rdata, complex); } KList data = new KList<>(); - if(maxDepth <= 0) { + if (maxDepth <= 0) { return data; } - for(int i = 0; i < layers.size(); i++) { + for (int i = 0; i < layers.size(); i++) { CNG hgen = getLayerHeightGenerators(random, rdata).get(i); double d = hgen.fit(layers.get(i).getMinHeight(), layers.get(i).getMaxHeight(), wx / layers.get(i).getZoom(), wz / layers.get(i).getZoom()); IrisSlopeClip sc = getLayers().get(i).getSlopeCondition(); - if(!sc.isDefault()) { - if(!sc.isValid(complex.getSlopeStream().get(wx, wz))) { + if (!sc.isDefault()) { + if (!sc.isValid(complex.getSlopeStream().get(wx, wz))) { d = 0; } } - if(d <= 0) { + if (d <= 0) { continue; } - for(int j = 0; j < d; j++) { - if(data.size() >= maxDepth) { + for (int j = 0; j < d; j++) { + if (data.size() >= maxDepth) { break; } try { data.add(getLayers().get(i).get(random.nextParallelRNG(i + j), (wx + j) / layers.get(i).getZoom(), j, (wz - j) / layers.get(i).getZoom(), rdata)); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } } - if(data.size() >= maxDepth) { + if (data.size() >= maxDepth) { break; } - if(dim.isExplodeBiomePalettes()) { - for(int j = 0; j < dim.getExplodeBiomePaletteSize(); j++) { + if (dim.isExplodeBiomePalettes()) { + for (int j = 0; j < dim.getExplodeBiomePaletteSize(); j++) { data.add(BARRIER); - if(data.size() >= maxDepth) { + if (data.size() >= maxDepth) { break; } } @@ -360,40 +360,40 @@ public KList generateLayers(IrisDimension dim, double wx, double wz, public KList generateCeilingLayers(IrisDimension dim, double wx, double wz, RNG random, int maxDepth, int height, IrisData rdata, IrisComplex complex) { KList data = new KList<>(); - if(maxDepth <= 0) { + if (maxDepth <= 0) { return data; } - for(int i = 0; i < caveCeilingLayers.size(); i++) { + for (int i = 0; i < caveCeilingLayers.size(); i++) { CNG hgen = getLayerHeightGenerators(random, rdata).get(i); double d = hgen.fit(caveCeilingLayers.get(i).getMinHeight(), caveCeilingLayers.get(i).getMaxHeight(), wx / caveCeilingLayers.get(i).getZoom(), wz / caveCeilingLayers.get(i).getZoom()); - if(d <= 0) { + if (d <= 0) { continue; } - for(int j = 0; j < d; j++) { - if(data.size() >= maxDepth) { + for (int j = 0; j < d; j++) { + if (data.size() >= maxDepth) { break; } try { data.add(getCaveCeilingLayers().get(i).get(random.nextParallelRNG(i + j), (wx + j) / caveCeilingLayers.get(i).getZoom(), j, (wz - j) / caveCeilingLayers.get(i).getZoom(), rdata)); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } } - if(data.size() >= maxDepth) { + if (data.size() >= maxDepth) { break; } - if(dim.isExplodeBiomePalettes()) { - for(int j = 0; j < dim.getExplodeBiomePaletteSize(); j++) { + if (dim.isExplodeBiomePalettes()) { + for (int j = 0; j < dim.getExplodeBiomePaletteSize(); j++) { data.add(BARRIER); - if(data.size() >= maxDepth) { + if (data.size() >= maxDepth) { break; } } @@ -407,41 +407,41 @@ public KList generateLockedLayers(double wx, double wz, RNG random, i KList data = new KList<>(); KList real = new KList<>(); int maxDepth = Math.min(maxDepthf, getLockLayersMax()); - if(maxDepth <= 0) { + if (maxDepth <= 0) { return data; } - for(int i = 0; i < layers.size(); i++) { + for (int i = 0; i < layers.size(); i++) { CNG hgen = getLayerHeightGenerators(random, rdata).get(i); double d = hgen.fit(layers.get(i).getMinHeight(), layers.get(i).getMaxHeight(), wx / layers.get(i).getZoom(), wz / layers.get(i).getZoom()); IrisSlopeClip sc = getLayers().get(i).getSlopeCondition(); - if(!sc.isDefault()) { - if(!sc.isValid(complex.getSlopeStream().get(wx, wz))) { + if (!sc.isDefault()) { + if (!sc.isValid(complex.getSlopeStream().get(wx, wz))) { d = 0; } } - if(d <= 0) { + if (d <= 0) { continue; } - for(int j = 0; j < d; j++) { + for (int j = 0; j < d; j++) { try { data.add(getLayers().get(i).get(random.nextParallelRNG(i + j), (wx + j) / layers.get(i).getZoom(), j, (wz - j) / layers.get(i).getZoom(), rdata)); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } } } - if(data.isEmpty()) { + if (data.isEmpty()) { return real; } - for(int i = 0; i < maxDepth; i++) { + for (int i = 0; i < maxDepth; i++) { int offset = (512 - height) - i; int index = offset % data.size(); real.add(data.get(Math.max(index, 0))); @@ -455,7 +455,7 @@ public int getMaxHeight() { { int maxHeight = 0; - for(IrisBiomeGeneratorLink i : getGenerators()) { + for (IrisBiomeGeneratorLink i : getGenerators()) { maxHeight += i.getMax(); } @@ -468,14 +468,14 @@ public int getMaxWithObjectHeight(IrisData data) { { int maxHeight = 0; - for(IrisBiomeGeneratorLink i : getGenerators()) { + for (IrisBiomeGeneratorLink i : getGenerators()) { maxHeight += i.getMax(); } int gg = 0; - for(IrisObjectPlacement i : getObjects()) { - for(IrisObject j : data.getObjectLoader().loadAll(i.getPlace())) { + for (IrisObjectPlacement i : getObjects()) { + for (IrisObject j : data.getObjectLoader().loadAll(i.getPlace())) { gg = Math.max(gg, j.getH()); } } @@ -492,28 +492,28 @@ public IrisBiome infer(InferredType t, InferredType type) { public KList generateSeaLayers(double wx, double wz, RNG random, int maxDepth, IrisData rdata) { KList data = new KList<>(); - for(int i = 0; i < seaLayers.size(); i++) { + for (int i = 0; i < seaLayers.size(); i++) { CNG hgen = getLayerSeaHeightGenerators(random, rdata).get(i); int d = hgen.fit(seaLayers.get(i).getMinHeight(), seaLayers.get(i).getMaxHeight(), wx / seaLayers.get(i).getZoom(), wz / seaLayers.get(i).getZoom()); - if(d < 0) { + if (d < 0) { continue; } - for(int j = 0; j < d; j++) { - if(data.size() >= maxDepth) { + for (int j = 0; j < d; j++) { + if (data.size() >= maxDepth) { break; } try { data.add(getSeaLayers().get(i).get(random.nextParallelRNG(i + j), (wx + j) / seaLayers.get(i).getZoom(), j, (wz - j) / seaLayers.get(i).getZoom(), rdata)); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } } - if(data.size() >= maxDepth) { + if (data.size() >= maxDepth) { break; } } @@ -528,7 +528,7 @@ public KList getLayerHeightGenerators(RNG rng, IrisData rdata) { int m = 7235; - for(IrisBiomePaletteLayer i : getLayers()) { + for (IrisBiomePaletteLayer i : getLayers()) { layerHeightGenerators.add(i.getHeightGenerator(rng.nextParallelRNG((m++) * m * m * m), rdata)); } @@ -543,7 +543,7 @@ public KList getLayerSeaHeightGenerators(RNG rng, IrisData data) { int m = 7735; - for(IrisBiomePaletteLayer i : getSeaLayers()) { + for (IrisBiomePaletteLayer i : getSeaLayers()) { layerSeaHeightGenerators.add(i.getHeightGenerator(rng.nextParallelRNG((m++) * m * m * m), data)); } @@ -552,7 +552,7 @@ public KList getLayerSeaHeightGenerators(RNG rng, IrisData data) { } public boolean isLand() { - if(inferredType == null) { + if (inferredType == null) { return true; } @@ -560,7 +560,7 @@ public boolean isLand() { } public boolean isSea() { - if(inferredType == null) { + if (inferredType == null) { return false; } return inferredType.equals(InferredType.SEA); @@ -572,18 +572,18 @@ public boolean isAquatic() { @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean isShore() { - if(inferredType == null) { + if (inferredType == null) { return false; } return inferredType.equals(InferredType.SHORE); } public Biome getSkyBiome(RNG rng, double x, double y, double z) { - if(biomeSkyScatter.size() == 1) { + if (biomeSkyScatter.size() == 1) { return biomeSkyScatter.get(0); } - if(biomeSkyScatter.isEmpty()) { + if (biomeSkyScatter.isEmpty()) { return getGroundBiome(rng, x, y, z); } @@ -591,7 +591,7 @@ public Biome getSkyBiome(RNG rng, double x, double y, double z) { } public IrisBiomeCustom getCustomBiome(RNG rng, double x, double y, double z) { - if(customDerivitives.size() == 1) { + if (customDerivitives.size() == 1) { return customDerivitives.get(0); } @@ -603,7 +603,7 @@ public KList getRealChildren(DataProvider g) { { KList realChildren = new KList<>(); - for(String i : getChildren()) { + for (String i : getChildren()) { realChildren.add(g.getData().getBiomeLoader().load(i)); } @@ -616,8 +616,8 @@ public KList getAllChildren(DataProvider g, int limit) { m.addAll(getChildren()); limit--; - if(limit > 0) { - for(String i : getChildren()) { + if (limit > 0) { + for (String i : getChildren()) { IrisBiome b = g.getData().getBiomeLoader().load(i); m.addAll(b.getAllChildren(g, limit)); } @@ -628,11 +628,11 @@ public KList getAllChildren(DataProvider g, int limit) { //TODO: Test public Biome getGroundBiome(RNG rng, double x, double y, double z) { - if(biomeScatter.isEmpty()) { + if (biomeScatter.isEmpty()) { return getDerivative(); } - if(biomeScatter.size() == 1) { + if (biomeScatter.size() == 1) { return biomeScatter.get(0); } @@ -640,7 +640,7 @@ public Biome getGroundBiome(RNG rng, double x, double y, double z) { } public BlockData getSurfaceBlock(int x, int z, RNG rng, IrisData idm) { - if(getLayers().isEmpty()) { + if (getLayers().isEmpty()) { return B.get("AIR"); } @@ -648,12 +648,12 @@ public BlockData getSurfaceBlock(int x, int z, RNG rng, IrisData idm) { } public Color getColor(Engine engine, RenderType type) { - switch(type) { + switch (type) { case BIOME, HEIGHT, CAVE_LAND, REGION, BIOME_SEA, BIOME_LAND -> { return this.cacheColor.aquire(() -> { - if(this.color == null) { + if (this.color == null) { RandomColor randomColor = new RandomColor(getName().hashCode()); - if(this.getVanillaDerivative() == null) { + if (this.getVanillaDerivative() == null) { Iris.warn("No vanilla biome found for " + getName()); return new Color(randomColor.randomColor()); } @@ -667,7 +667,7 @@ public Color getColor(Engine engine, RenderType type) { try { return Color.decode(this.color); - } catch(NumberFormatException e) { + } catch (NumberFormatException e) { Iris.warn("Could not parse color \"" + this.color + "\" for biome " + getName()); return new Color(new RandomColor(getName().hashCode()).randomColor()); } @@ -677,7 +677,7 @@ public Color getColor(Engine engine, RenderType type) { return cacheColorObjectDensity.aquire(() -> { double density = 0; - for(IrisObjectPlacement i : getObjects()) { + for (IrisObjectPlacement i : getObjects()) { density += i.getDensity() * i.getChance(); } @@ -688,7 +688,7 @@ public Color getColor(Engine engine, RenderType type) { return cacheColorDecoratorLoad.aquire(() -> { double density = 0; - for(IrisDecorator i : getDecorators()) { + for (IrisDecorator i : getDecorators()) { density += i.getChance() * Math.min(1, i.getStackMax()) * 256; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisBiomeCustom.java b/src/main/java/com/volmit/iris/engine/object/IrisBiomeCustom.java index 065ec4d71..e57f96e77 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisBiomeCustom.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisBiomeCustom.java @@ -96,7 +96,7 @@ public String generateJson() { effects.put("water_color", parseColor(getWaterColor())); effects.put("water_fog_color", parseColor(getWaterFogColor())); - if(ambientParticle != null) { + if (ambientParticle != null) { JSONObject particle = new JSONObject(); JSONObject po = new JSONObject(); po.put("type", ambientParticle.getParticle().name().toLowerCase()); @@ -105,11 +105,11 @@ public String generateJson() { effects.put("particle", particle); } - if(!getGrassColor().isEmpty()) { + if (!getGrassColor().isEmpty()) { effects.put("grass_color", parseColor(getGrassColor())); } - if(!getFoliageColor().isEmpty()) { + if (!getFoliageColor().isEmpty()) { effects.put("foliage_color", parseColor(getFoliageColor())); } @@ -129,15 +129,15 @@ public String generateJson() { j.put("carvers", new JSONObject()); j.put("features", new JSONArray()); - if(spawnRarity > 0) { + if (spawnRarity > 0) { j.put("creature_spawn_probability", spawnRarity); } - if(getSpawns() != null && getSpawns().isNotEmpty()) { + if (getSpawns() != null && getSpawns().isNotEmpty()) { JSONObject spawners = new JSONObject(); KMap groups = new KMap<>(); - for(IrisBiomeCustomSpawn i : getSpawns()) { + for (IrisBiomeCustomSpawn i : getSpawns()) { JSONArray g = groups.computeIfAbsent(i.getGroup(), (k) -> new JSONArray()); JSONObject o = new JSONObject(); o.put("type", "minecraft:" + i.getType().name().toLowerCase()); @@ -147,7 +147,7 @@ public String generateJson() { g.put(o); } - for(IrisBiomeCustomSpawnType i : groups.k()) { + for (IrisBiomeCustomSpawnType i : groups.k()) { spawners.put(i.name().toLowerCase(Locale.ROOT), groups.get(i)); } @@ -161,7 +161,7 @@ private int parseColor(String c) { String v = (c.startsWith("#") ? c : "#" + c).trim(); try { return Color.decode(v).getRGB(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Error Parsing '''color''', (" + c + ")"); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisBiomeGeneratorLink.java b/src/main/java/com/volmit/iris/engine/object/IrisBiomeGeneratorLink.java index 71af6ce5e..177283f74 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisBiomeGeneratorLink.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisBiomeGeneratorLink.java @@ -57,7 +57,7 @@ public IrisGenerator getCachedGenerator(DataProvider g) { { IrisGenerator gen = g.getData().getGeneratorLoader().load(getGenerator()); - if(gen == null) { + if (gen == null) { gen = new IrisGenerator(); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisBiomePaletteLayer.java b/src/main/java/com/volmit/iris/engine/object/IrisBiomePaletteLayer.java index 649ea3e3d..c2fa1b59f 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisBiomePaletteLayer.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisBiomePaletteLayer.java @@ -69,11 +69,11 @@ public CNG getHeightGenerator(RNG rng, IrisData data) { } public BlockData get(RNG rng, double x, double y, double z, IrisData data) { - if(getBlockData(data).isEmpty()) { + if (getBlockData(data).isEmpty()) { return null; } - if(getBlockData(data).size() == 1) { + if (getBlockData(data).size() == 1) { return getBlockData(data).get(0); } @@ -98,10 +98,10 @@ public KList getBlockData(IrisData data) { return blockData.aquire(() -> { KList blockData = new KList<>(); - for(IrisBlockData ix : palette) { + for (IrisBlockData ix : palette) { BlockData bx = ix.getBlockData(data); - if(bx != null) { - for(int i = 0; i < ix.getWeight(); i++) { + if (bx != null) { + for (int i = 0; i < ix.getWeight(); i++) { blockData.add(bx); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisBlockData.java b/src/main/java/com/volmit/iris/engine/object/IrisBlockData.java index 40fe5aa72..b926883a1 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisBlockData.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisBlockData.java @@ -70,18 +70,18 @@ public static IrisBlockData from(String j) { IrisBlockData b = new IrisBlockData(); String v = j.toLowerCase().trim(); - if(v.contains("[")) { + if (v.contains("[")) { KList props = new KList<>(); String rp = v.split("\\Q[\\E")[1].replaceAll("\\Q]\\E", ""); b.setBlock(v.split("\\Q[\\E")[0]); - if(rp.contains(",")) { + if (rp.contains(",")) { props.add(rp.split("\\Q,\\E")); } else { props.add(rp); } - for(String i : props) { + for (String i : props) { Object kg = filter(i.split("\\Q=\\E")[1]); b.data.put(i.split("\\Q=\\E")[0], kg); } @@ -93,23 +93,23 @@ public static IrisBlockData from(String j) { } private static Object filter(String string) { - if(string.equals("true")) { + if (string.equals("true")) { return true; } - if(string.equals("false")) { + if (string.equals("false")) { return false; } try { return Integer.parseInt(string); - } catch(Throwable ignored) { + } catch (Throwable ignored) { // Checks } try { return Double.valueOf(string).intValue(); - } catch(Throwable ignored) { + } catch (Throwable ignored) { // Checks } @@ -117,13 +117,13 @@ private static Object filter(String string) { } public String computeProperties(KMap data) { - if(data.isEmpty()) { + if (data.isEmpty()) { return ""; } KList r = new KList<>(); - for(Map.Entry entry : data.entrySet()) { + for (Map.Entry entry : data.entrySet()) { r.add(entry.getKey() + "=" + filter(entry.getValue().toString())); } @@ -141,37 +141,37 @@ public BlockData getBlockData(IrisData data) { IrisBlockData customData = data.getBlockLoader().load(getBlock(), false); - if(customData != null) { + if (customData != null) { b = customData.getBlockData(data); - if(b != null) { + if (b != null) { b = b.clone(); String st = b.getAsString(true); - if(st.contains("[")) { + if (st.contains("[")) { st = st.split("\\Q[\\E")[0]; } KMap cdata = customData.getData().copy(); - for(String i : getData().keySet()) { + for (String i : getData().keySet()) { cdata.put(i, getData().get(i)); } String sx = keyify(st) + computeProperties(cdata); - if(debug) { + if (debug) { Iris.debug("Block Data used " + sx + " (CUSTOM)"); } BlockData bx = B.get(sx); - if(bx != null) { + if (bx != null) { return bx; } - if(b != null) { + if (b != null) { return b; } } @@ -180,15 +180,15 @@ public BlockData getBlockData(IrisData data) { String ss = keyify(getBlock()) + computeProperties(); b = B.get(ss); - if(debug) { + if (debug) { Iris.debug("Block Data used " + ss); } - if(b != null) { + if (b != null) { return b; } - if(backup != null) { + if (backup != null) { return backup.getBlockData(data); } @@ -198,10 +198,10 @@ public BlockData getBlockData(IrisData data) { public TileData tryGetTile() { //TODO Do like a registry thing with the tile data registry. Also update the parsing of data to include **block** entities. - if(data.containsKey("entitySpawn")) { + if (data.containsKey("entitySpawn")) { TileSpawner spawner = new TileSpawner(); - String name = (String)data.get("entitySpawn"); - if(name.contains(":")) + String name = (String) data.get("entitySpawn"); + if (name.contains(":")) name = name.split(":")[1]; spawner.setEntityType(EntityType.fromName(name)); return spawner; @@ -210,7 +210,7 @@ public TileData tryGetTile() { } private String keyify(String dat) { - if(dat.contains(":")) { + if (dat.contains(":")) { return dat; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisBlockDrops.java b/src/main/java/com/volmit/iris/engine/object/IrisBlockDrops.java index 6b3be8d59..bcc2b4b5f 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisBlockDrops.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisBlockDrops.java @@ -59,10 +59,10 @@ public boolean shouldDropFor(BlockData data, IrisData rdata) { KList list = this.data.aquire(() -> { KList b = new KList<>(); - for(IrisBlockData i : getBlocks()) { + for (IrisBlockData i : getBlocks()) { BlockData dd = i.getBlockData(rdata); - if(dd != null) { + if (dd != null) { b.add(dd); } } @@ -70,8 +70,8 @@ public boolean shouldDropFor(BlockData data, IrisData rdata) { return b.removeDuplicates(); }); - for(BlockData i : list) { - if(exactBlocks ? i.equals(data) : i.getMaterial().equals(data.getMaterial())) { + for (BlockData i : list) { + if (exactBlocks ? i.equals(data) : i.getMaterial().equals(data.getMaterial())) { return true; } } @@ -80,8 +80,8 @@ public boolean shouldDropFor(BlockData data, IrisData rdata) { } public void fillDrops(boolean debug, KList d) { - for(IrisLoot i : getDrops()) { - if(RNG.r.i(1, i.getRarity()) == i.getRarity()) { + for (IrisLoot i : getDrops()) { + if (RNG.r.i(1, i.getRarity()) == i.getRarity()) { d.add(i.get(debug, RNG.r)); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCarving.java b/src/main/java/com/volmit/iris/engine/object/IrisCarving.java index 6ee2055b5..bf7efa6af 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCarving.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCarving.java @@ -67,37 +67,37 @@ public void doCarving(MantleWriter writer, RNG rng, Engine engine, int x, int y, @BlockCoordinates public void doCarving(MantleWriter writer, RNG rng, Engine engine, int x, int y, int z, int waterHint) { - if(caves.isNotEmpty()) { - for(IrisCavePlacer i : caves) { + if (caves.isNotEmpty()) { + for (IrisCavePlacer i : caves) { i.generateCave(writer, rng, engine, x, y, z, waterHint); } } - if(ravines.isNotEmpty()) { - for(IrisRavinePlacer i : ravines) { + if (ravines.isNotEmpty()) { + for (IrisRavinePlacer i : ravines) { i.generateRavine(writer, rng, engine, x, y, z, waterHint); } } - if(spheres.isNotEmpty()) { - for(IrisSphere i : spheres) { - if(rng.nextInt(i.getRarity()) == 0) { + if (spheres.isNotEmpty()) { + for (IrisSphere i : spheres) { + if (rng.nextInt(i.getRarity()) == 0) { i.generate(rng, engine, writer, x, y, z); } } } - if(elipsoids.isNotEmpty()) { - for(IrisElipsoid i : elipsoids) { - if(rng.nextInt(i.getRarity()) == 0) { + if (elipsoids.isNotEmpty()) { + for (IrisElipsoid i : elipsoids) { + if (rng.nextInt(i.getRarity()) == 0) { i.generate(rng, engine, writer, x, y, z); } } } - if(pyramids.isNotEmpty()) { - for(IrisPyramid i : pyramids) { - if(rng.nextInt(i.getRarity()) == 0) { + if (pyramids.isNotEmpty()) { + for (IrisPyramid i : pyramids) { + if (rng.nextInt(i.getRarity()) == 0) { i.generate(rng, engine, writer, x, y, z); } } @@ -107,23 +107,23 @@ public void doCarving(MantleWriter writer, RNG rng, Engine engine, int x, int y, public int getMaxRange(IrisData data) { int max = 0; - for(IrisCavePlacer i : caves) { + for (IrisCavePlacer i : caves) { max = Math.max(max, i.getSize(data)); } - for(IrisRavinePlacer i : ravines) { + for (IrisRavinePlacer i : ravines) { max = Math.max(max, i.getSize(data)); } - if(elipsoids.isNotEmpty()) { + if (elipsoids.isNotEmpty()) { max = (int) Math.max(elipsoids.stream().mapToDouble(IrisElipsoid::maxSize).max().getAsDouble(), max); } - if(spheres.isNotEmpty()) { + if (spheres.isNotEmpty()) { max = (int) Math.max(spheres.stream().mapToDouble(IrisSphere::maxSize).max().getAsDouble(), max); } - if(pyramids.isNotEmpty()) { + if (pyramids.isNotEmpty()) { max = (int) Math.max(pyramids.stream().mapToDouble(IrisPyramid::maxSize).max().getAsDouble(), max); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCave.java b/src/main/java/com/volmit/iris/engine/object/IrisCave.java index ce0f918a6..32ab22439 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCave.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCave.java @@ -76,12 +76,12 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, }); int highestWater = Math.max(waterHint, -1); - if(highestWater == -1) { - for(IrisPosition i : points) { + if (highestWater == -1) { + for (IrisPosition i : points) { double yy = i.getY() + girth; int th = engine.getHeight(x, z, true); - if(yy > th && th < engine.getDimension().getFluidHeight()) { + if (yy > th && th < engine.getDimension().getFluidHeight()) { highestWater = Math.max(highestWater, (int) yy); break; } @@ -91,7 +91,7 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, int h = Math.min(Math.max(highestWater, waterHint), engine.getDimension().getFluidHeight()); - for(IrisPosition i : points) { + for (IrisPosition i : points) { fork.doCarving(writer, rng, engine, i.getX(), i.getY(), i.getZ(), h); } @@ -99,8 +99,8 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, MatterCavern w = new MatterCavern(true, customBiome, (byte) 1); writer.setLineConsumer(points, - girth, true, - (xf, yf, zf) -> yf <= h ? w : c); + girth, true, + (xf, yf, zf) -> yf <= h ? w : c); } @Override diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java b/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java index f0031f816..17dd4623d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java @@ -64,24 +64,24 @@ public void generateCave(MantleWriter mantle, RNG rng, Engine engine, int x, int } public void generateCave(MantleWriter mantle, RNG rng, Engine engine, int x, int y, int z, int waterHint) { - if(fail.get()) { + if (fail.get()) { return; } - if(rng.nextInt(rarity) != 0) { + if (rng.nextInt(rarity) != 0) { return; } IrisData data = engine.getData(); IrisCave cave = getRealCave(data); - if(cave == null) { + if (cave == null) { Iris.warn("Unable to locate cave for generation!"); fail.set(true); return; } - if(y == -1) { + if (y == -1) { int h = (int) caveStartHeight.get(rng, x, z, data); int ma = breakSurface ? h : (int) (engine.getComplex().getHeightStream().get(x, z) - 9); y = Math.min(h, ma); @@ -89,7 +89,7 @@ public void generateCave(MantleWriter mantle, RNG rng, Engine engine, int x, int try { cave.generate(mantle, rng, engine, x + rng.nextInt(15), y, z + rng.nextInt(15), waterHint); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); fail.set(true); } @@ -98,7 +98,7 @@ public void generateCave(MantleWriter mantle, RNG rng, Engine engine, int x, int public int getSize(IrisData data) { IrisCave cave = getRealCave(data); - if(cave != null) { + if (cave != null) { return cave.getMaxSize(data); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisColor.java b/src/main/java/com/volmit/iris/engine/object/IrisColor.java index 2d6494bbf..bfbb7cf7d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisColor.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisColor.java @@ -55,7 +55,7 @@ public class IrisColor { private int blue = 0; public static Color blend(Color... c) { - if(c == null || c.length <= 0) { + if (c == null || c.length <= 0) { return null; } float ratio = 1f / ((float) c.length); @@ -65,7 +65,7 @@ public static Color blend(Color... c) { int g = 0; int b = 0; - for(Color value : c) { + for (Color value : c) { int rgb = value.getRGB(); int a1 = (rgb >> 24 & 0xff); int r1 = ((rgb & 0xff0000) >> 16); @@ -82,11 +82,11 @@ public static Color blend(Color... c) { public Color getColor() { return color.aquire(() -> { - if(hex != null) { + if (hex != null) { String v = (hex.startsWith("#") ? hex : "#" + hex).trim(); try { return Color.decode(v); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -101,11 +101,11 @@ public org.bukkit.Color getBukkitColor() { } public int getAsRGB() { - if(hex != null) { + if (hex != null) { try { - if(hex.startsWith("#")) hex = hex.substring(1); + if (hex.startsWith("#")) hex = hex.substring(1); return Integer.parseInt(hex, 16); - } catch(NumberFormatException e) { + } catch (NumberFormatException e) { return 0; } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCommand.java b/src/main/java/com/volmit/iris/engine/object/IrisCommand.java index b0bbb7698..36f47fb44 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCommand.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCommand.java @@ -61,17 +61,17 @@ public boolean isValid(World world) { } public void run(Location at) { - if(!isValid(at.getWorld())) { + if (!isValid(at.getWorld())) { return; } - for(String command : commands) { + for (String command : commands) { command = (command.startsWith("/") ? command.replaceFirst("/", "") : command) - .replaceAll("\\Q{x}\\E", String.valueOf(at.getBlockX())) - .replaceAll("\\Q{y}\\E", String.valueOf(at.getBlockY())) - .replaceAll("\\Q{z}\\E", String.valueOf(at.getBlockZ())); + .replaceAll("\\Q{x}\\E", String.valueOf(at.getBlockX())) + .replaceAll("\\Q{y}\\E", String.valueOf(at.getBlockY())) + .replaceAll("\\Q{z}\\E", String.valueOf(at.getBlockZ())); final String finalCommand = command; - if(repeat) { + if (repeat) { Bukkit.getScheduler().scheduleSyncRepeatingTask(Iris.instance, () -> Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), finalCommand), delay, repeatDelay); } else { Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, () -> Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), finalCommand), delay); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCommandRegistry.java b/src/main/java/com/volmit/iris/engine/object/IrisCommandRegistry.java index 3df5d6270..e9599d56f 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCommandRegistry.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCommandRegistry.java @@ -65,18 +65,18 @@ public class IrisCommandRegistry { private boolean commandAllRandomLocations = true; public void run(Player p) { - if(rawCommands.isNotEmpty()) { + if (rawCommands.isNotEmpty()) { Location part = p.getLocation().clone().add( - commandRandomAltX ? RNG.r.d(-commandOffsetX, commandOffsetX) : commandOffsetX, - commandRandomAltY ? RNG.r.d(-commandOffsetY, commandOffsetY) : commandOffsetY, - commandRandomAltZ ? RNG.r.d(-commandOffsetZ, commandOffsetZ) : commandOffsetZ); - for(IrisCommand rawCommand : rawCommands) { + commandRandomAltX ? RNG.r.d(-commandOffsetX, commandOffsetX) : commandOffsetX, + commandRandomAltY ? RNG.r.d(-commandOffsetY, commandOffsetY) : commandOffsetY, + commandRandomAltZ ? RNG.r.d(-commandOffsetZ, commandOffsetZ) : commandOffsetZ); + for (IrisCommand rawCommand : rawCommands) { rawCommand.run(part); - if(commandAllRandomLocations) { + if (commandAllRandomLocations) { part = p.getLocation().clone().add( - commandRandomAltX ? RNG.r.d(-commandOffsetX, commandOffsetX) : commandOffsetX, - commandRandomAltY ? RNG.r.d(-commandOffsetY, commandOffsetY) : commandOffsetY, - commandRandomAltZ ? RNG.r.d(-commandOffsetZ, commandOffsetZ) : commandOffsetZ); + commandRandomAltX ? RNG.r.d(-commandOffsetX, commandOffsetX) : commandOffsetX, + commandRandomAltY ? RNG.r.d(-commandOffsetY, commandOffsetY) : commandOffsetY, + commandRandomAltZ ? RNG.r.d(-commandOffsetZ, commandOffsetZ) : commandOffsetZ); } } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCompat.java b/src/main/java/com/volmit/iris/engine/object/IrisCompat.java index 726d191ae..6ff2975ee 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCompat.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCompat.java @@ -48,11 +48,11 @@ public static IrisCompat configured(File f) { J.attemptAsync(() -> IO.writeAll(new File(f.getParentFile(), "compat.default.json"), defa)); - if(!f.exists()) { + if (!f.exists()) { J.a(() -> { try { IO.writeAll(f, defa); - } catch(IOException e) { + } catch (IOException e) { Iris.error("Failed to writeNodeData to compat file"); Iris.reportError(e); } @@ -63,14 +63,14 @@ public static IrisCompat configured(File f) { try { IrisCompat rea = new Gson().fromJson(IO.readAll(f), IrisCompat.class); - for(IrisCompatabilityBlockFilter i : rea.getBlockFilters()) { + for (IrisCompatabilityBlockFilter i : rea.getBlockFilters()) { def.getBlockFilters().add(i); } - for(IrisCompatabilityItemFilter i : rea.getItemFilters()) { + for (IrisCompatabilityItemFilter i : rea.getItemFilters()) { def.getItemFilters().add(i); } - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } @@ -264,21 +264,21 @@ public BlockData getBlock(String n) { BlockData tx = B.getOrNull(buf); - if(tx != null) { + if (tx != null) { return tx; } searching: - while(true) { - if(err-- <= 0) { + while (true) { + if (err-- <= 0) { return B.get("STONE"); } - for(IrisCompatabilityBlockFilter i : blockFilters) { - if(i.getWhen().equalsIgnoreCase(buf)) { + for (IrisCompatabilityBlockFilter i : blockFilters) { + if (i.getWhen().equalsIgnoreCase(buf)) { BlockData b = i.getReplace(); - if(b != null) { + if (b != null) { return b; } @@ -296,28 +296,28 @@ public Material getItem(String n) { int err = 16; Material txf = B.getMaterialOrNull(buf); - if(txf != null) { + if (txf != null) { return txf; } int nomore = 64; searching: - while(true) { - if(nomore < 0) { + while (true) { + if (nomore < 0) { return B.getMaterial("STONE"); } nomore--; - if(err-- <= 0) { + if (err-- <= 0) { break; } - for(IrisCompatabilityItemFilter i : itemFilters) { - if(i.getWhen().equalsIgnoreCase(buf)) { + for (IrisCompatabilityItemFilter i : itemFilters) { + if (i.getWhen().equalsIgnoreCase(buf)) { Material b = i.getReplace(); - if(b != null) { + if (b != null) { return b; } @@ -332,28 +332,28 @@ public Material getItem(String n) { buf = n; BlockData tx = B.getOrNull(buf); - if(tx != null) { + if (tx != null) { return tx.getMaterial(); } nomore = 64; searching: - while(true) { - if(nomore < 0) { + while (true) { + if (nomore < 0) { return B.getMaterial("STONE"); } nomore--; - if(err-- <= 0) { + if (err-- <= 0) { return B.getMaterial("STONE"); } - for(IrisCompatabilityBlockFilter i : blockFilters) { - if(i.getWhen().equalsIgnoreCase(buf)) { + for (IrisCompatabilityBlockFilter i : blockFilters) { + if (i.getWhen().equalsIgnoreCase(buf)) { BlockData b = i.getReplace(); - if(b != null) { + if (b != null) { return b.getMaterial(); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityBlockFilter.java b/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityBlockFilter.java index 227b9b473..4c4520f3a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityBlockFilter.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityBlockFilter.java @@ -59,7 +59,7 @@ public BlockData getReplace() { { BlockData b = B.getOrNull(supplement); - if(b == null) { + if (b == null) { return null; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityItemFilter.java b/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityItemFilter.java index 39fcb9ccf..520092841 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityItemFilter.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisCompatabilityItemFilter.java @@ -56,7 +56,7 @@ public Material getReplace() { { Material b = B.getMaterialOrNull(supplement); - if(b == null) { + if (b == null) { return null; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisDecorator.java b/src/main/java/com/volmit/iris/engine/object/IrisDecorator.java index 8a4439581..50f8e112d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisDecorator.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisDecorator.java @@ -77,9 +77,9 @@ public class IrisDecorator { private int stackMax = 1; @DependsOn({"stackMin", "stackMax"}) @Desc(""" - Changes stackMin and stackMin from being absolute block heights and instead uses them as a percentage to scale the stack based on the cave height + Changes stackMin and stackMin from being absolute block heights and instead uses them as a percentage to scale the stack based on the cave height - Within a cave, setting them stackMin/max to 50 would make the stack 50% of the cave height""") + Within a cave, setting them stackMin/max to 50 would make the stack 50% of the cave height""") private boolean scaleStack = false; @Required @MinNumber(0) @@ -101,19 +101,19 @@ public class IrisDecorator { private double topThreshold = 1.0; public int getHeight(RNG rng, double x, double z, IrisData data) { - if(stackMin == stackMax) { + if (stackMin == stackMax) { return stackMin; } return getHeightGenerator(rng, data) - .fit(stackMin, stackMax, - x / heightVariance.getZoom(), - z / heightVariance.getZoom()) + 1; + .fit(stackMin, stackMax, + x / heightVariance.getZoom(), + z / heightVariance.getZoom()) + 1; } public CNG getHeightGenerator(RNG rng, IrisData data) { return heightGenerator.aquire(() -> - heightVariance.create(rng.nextParallelRNG(getBlockData(data).size() + stackMax + stackMin), data)); + heightVariance.create(rng.nextParallelRNG(getBlockData(data).size() + stackMax + stackMin), data)); } public CNG getGenerator(RNG rng, IrisData data) { @@ -122,9 +122,9 @@ public CNG getGenerator(RNG rng, IrisData data) { public CNG getVarianceGenerator(RNG rng, IrisData data) { return varianceGenerator.aquire(() -> - variance.create( - rng.nextParallelRNG(getBlockData(data).size()), data) - .scale(1D / variance.getZoom())); + variance.create( + rng.nextParallelRNG(getBlockData(data).size()), data) + .scale(1D / variance.getZoom())); } public KList add(String b) { @@ -133,7 +133,7 @@ public KList add(String b) { } public BlockData getBlockData(IrisBiome b, RNG rng, double x, double z, IrisData data) { - if(getBlockData(data).isEmpty()) { + if (getBlockData(data).isEmpty()) { Iris.warn("Empty Block Data for " + b.getName()); return null; } @@ -141,8 +141,8 @@ public BlockData getBlockData(IrisBiome b, RNG rng, double x, double z, IrisData double xx = x / style.getZoom(); double zz = z / style.getZoom(); - if(getGenerator(rng, data).fitDouble(0D, 1D, xx, zz) <= chance) { - if(getBlockData(data).size() == 1) { + if (getGenerator(rng, data).fitDouble(0D, 1D, xx, zz) <= chance) { + if (getBlockData(data).size() == 1) { return getBlockData(data).get(0); } @@ -153,7 +153,7 @@ public BlockData getBlockData(IrisBiome b, RNG rng, double x, double z, IrisData } public BlockData getBlockData100(IrisBiome b, RNG rng, double x, double y, double z, IrisData data) { - if(getBlockData(data).isEmpty()) { + if (getBlockData(data).isEmpty()) { Iris.warn("Empty Block Data for " + b.getName()); return null; } @@ -162,13 +162,13 @@ public BlockData getBlockData100(IrisBiome b, RNG rng, double x, double y, doubl double yy = y; double zz = z; - if(!getVarianceGenerator(rng, data).isStatic()) { + if (!getVarianceGenerator(rng, data).isStatic()) { xx = x / style.getZoom(); yy = y / style.getZoom(); zz = z / style.getZoom(); } - if(getBlockData(data).size() == 1) { + if (getBlockData(data).size() == 1) { return getBlockData(data).get(0); } @@ -176,15 +176,15 @@ public BlockData getBlockData100(IrisBiome b, RNG rng, double x, double y, doubl } public BlockData getBlockDataForTop(IrisBiome b, RNG rng, double x, double y, double z, IrisData data) { - if(getBlockDataTops(data).isEmpty()) { + if (getBlockDataTops(data).isEmpty()) { return getBlockData100(b, rng, x, y, z, data); } double xx = x / style.getZoom(); double zz = z / style.getZoom(); - if(getGenerator(rng, data).fitDouble(0D, 1D, xx, zz) <= chance) { //Exclude y from here - if(getBlockData(data).size() == 1) { + if (getGenerator(rng, data).fitDouble(0D, 1D, xx, zz) <= chance) { //Exclude y from here + if (getBlockData(data).size() == 1) { return getBlockDataTops(data).get(0); } @@ -198,10 +198,10 @@ public KList getBlockData(IrisData data) { return blockData.aquire(() -> { KList blockData = new KList<>(); - for(IrisBlockData i : palette) { + for (IrisBlockData i : palette) { BlockData bx = i.getBlockData(data); - if(bx != null) { - for(int n = 0; n < i.getWeight(); n++) { + if (bx != null) { + for (int n = 0; n < i.getWeight(); n++) { blockData.add(bx); } } @@ -215,10 +215,10 @@ public KList getBlockDataTops(IrisData data) { return blockDataTops.aquire(() -> { KList blockDataTops = new KList<>(); - for(IrisBlockData i : topPalette) { + for (IrisBlockData i : topPalette) { BlockData bx = i.getBlockData(data); - if(bx != null) { - for(int n = 0; n < i.getWeight(); n++) { + if (bx != null) { + for (int n = 0; n < i.getWeight(); n++) { blockDataTops.add(bx); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisDepositGenerator.java b/src/main/java/com/volmit/iris/engine/object/IrisDepositGenerator.java index 2e4b2dd59..f7ab0c36e 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisDepositGenerator.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisDepositGenerator.java @@ -84,7 +84,7 @@ public IrisObject getClump(RNG rng, IrisData rdata) { RNG rngv = rng.nextParallelRNG(3957778); KList objectsf = new KList<>(); - for(int i = 0; i < varience; i++) { + for (int i = 0; i < varience; i++) { objectsf.add(generateClumpObject(rngv.nextParallelRNG(2349 * i + 3598), rdata)); } @@ -103,10 +103,10 @@ private IrisObject generateClumpObject(RNG rngv, IrisData rdata) { int w = dim / 2; IrisObject o = new IrisObject(dim, dim, dim); - if(s == 1) { + if (s == 1) { o.getBlocks().put(o.getCenter(), nextBlock(rngv, rdata)); } else { - while(s > 0) { + while (s > 0) { s--; BlockVector ang = new BlockVector(rngv.i(-w, w), rngv.i(-w, w), rngv.i(-w, w)); BlockVector pos = o.getCenter().clone().add(ang).toBlockVector(); @@ -126,10 +126,10 @@ public KList getBlockData(IrisData rdata) { { KList blockData = new KList<>(); - for(IrisBlockData ix : palette) { + for (IrisBlockData ix : palette) { BlockData bx = ix.getBlockData(rdata); - if(bx != null) { + if (bx != null) { blockData.add(bx); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisDimension.java b/src/main/java/com/volmit/iris/engine/object/IrisDimension.java index 0a4598df7..a66aa9f0c 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisDimension.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisDimension.java @@ -52,6 +52,23 @@ public class IrisDimension extends IrisRegistrant { public static final BlockData STONE = Material.STONE.createBlockData(); public static final BlockData WATER = Material.WATER.createBlockData(); + private static final String DP_OVERWORLD_DEFAULT = """ + { + "ultrawarm": false, + "natural": true, + "coordinate_scale": 1.0, + "has_skylight": true, + "has_ceiling": false, + "ambient_light": 0, + "piglin_safe": false, + "bed_works": true, + "respawn_anchor_works": false, + "has_raids": true, + "monster_spawn_block_light_limit": 7, + "monster_spawn_light_level": 1, + "infiniburn": "#minecraft:infiniburn_overworld", + "effects": "minecraft:overworld" + }"""; private final transient AtomicCache parallaxSize = new AtomicCache<>(); private final transient AtomicCache rockLayerGenerator = new AtomicCache<>(); private final transient AtomicCache fluidLayerGenerator = new AtomicCache<>(); @@ -69,7 +86,6 @@ public class IrisDimension extends IrisRegistrant { @MaxNumber(2032) @Desc("Maximum height at which players can be teleported to through gameplay.") private int logicalHeight = 256; - @RegistryListResource(IrisJigsawStructure.class) @Desc("If defined, Iris will place the given jigsaw structure where minecraft should place the overworld stronghold.") private String stronghold; @@ -244,14 +260,14 @@ public int getMinHeight() { } public BlockData generateOres(int x, int y, int z, RNG rng, IrisData data) { - if(ores.isEmpty()) { + if (ores.isEmpty()) { return null; } BlockData b = null; - for(IrisOreGenerator i : ores) { + for (IrisOreGenerator i : ores) { b = i.generate(x, y, z, rng, data); - if(b != null) { + if (b != null) { return b; } } @@ -264,11 +280,11 @@ public KList getStrongholds(long seed) { int jump = strongholdJumpDistance; RNG rng = new RNG((seed * 223) + 12945); - for(int i = 0; i < maxStrongholds + 1; i++) { + for (int i = 0; i < maxStrongholds + 1; i++) { int m = i + 1; pos.add(new Position2( - (int) ((rng.i(jump * i) + (jump * i)) * (rng.b() ? -1D : 1D)), - (int) ((rng.i(jump * i) + (jump * i)) * (rng.b() ? -1D : 1D)) + (int) ((rng.i(jump * i) + (jump * i)) * (rng.b() ? -1D : 1D)), + (int) ((rng.i(jump * i) + (jump * i)) * (rng.b() ? -1D : 1D)) )); } @@ -279,7 +295,7 @@ public KList getStrongholds(long seed) { } public int getFluidHeight() { - return fluidHeight - (int)dimensionHeight.getMin(); + return fluidHeight - (int) dimensionHeight.getMin(); } public CNG getCoordFracture(RNG rng, int signature) { @@ -318,7 +334,7 @@ public double cosRotate() { public KList getAllRegions(DataProvider g) { KList r = new KList<>(); - for(String i : getRegions()) { + for (String i : getRegions()) { r.add(g.getData().getRegionLoader().load(i)); } @@ -328,7 +344,7 @@ public KList getAllRegions(DataProvider g) { public KList getAllAnyRegions() { KList r = new KList<>(); - for(String i : getRegions()) { + for (String i : getRegions()) { r.add(IrisData.loadAnyRegion(i)); } @@ -342,8 +358,8 @@ public KList getAllBiomes(DataProvider g) { public KList getAllAnyBiomes() { KList r = new KList<>(); - for(IrisRegion i : getAllAnyRegions()) { - if(i == null) { + for (IrisRegion i : getAllAnyRegions()) { + if (i == null) { continue; } @@ -354,7 +370,7 @@ public KList getAllAnyBiomes() { } public IrisGeneratorStyle getBiomeStyle(InferredType type) { - switch(type) { + switch (type) { case CAVE: return caveBiomeStyle; case LAND: @@ -376,14 +392,14 @@ public boolean installDataPack(DataProvider data, File datapacks) { IO.delete(new File(datapacks, "iris/data/" + getLoadKey().toLowerCase())); - for(IrisBiome i : getAllBiomes(data)) { - if(i.isCustom()) { + for (IrisBiome i : getAllBiomes(data)) { + if (i.isCustom()) { write = true; - for(IrisBiomeCustom j : i.getCustomDerivitives()) { + for (IrisBiomeCustom j : i.getCustomDerivitives()) { File output = new File(datapacks, "iris/data/" + getLoadKey().toLowerCase() + "/worldgen/biome/" + j.getId() + ".json"); - if(!output.exists()) { + if (!output.exists()) { changed = true; } @@ -391,7 +407,7 @@ public boolean installDataPack(DataProvider data, File datapacks) { output.getParentFile().mkdirs(); try { IO.writeAll(output, j.generateJson()); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -399,23 +415,23 @@ public boolean installDataPack(DataProvider data, File datapacks) { } } - if(!dimensionHeight.equals(new IrisRange(-64, 320)) && this.name.equalsIgnoreCase("overworld")) { - Iris.verbose(" Installing Data Pack Dimension Type: \"minecraft:overworld\""); - changed = writeDimensionType(changed, datapacks); - } + if (!dimensionHeight.equals(new IrisRange(-64, 320)) && this.name.equalsIgnoreCase("overworld")) { + Iris.verbose(" Installing Data Pack Dimension Type: \"minecraft:overworld\""); + changed = writeDimensionType(changed, datapacks); + } - if(write) { + if (write) { File mcm = new File(datapacks, "iris/pack.mcmeta"); try { IO.writeAll(mcm, """ - { - "pack": { - "description": "Iris Data Pack. This pack contains all installed Iris Packs' resources.", - "pack_format": 10 + { + "pack": { + "description": "Iris Data Pack. This pack contains all installed Iris Packs' resources.", + "pack_format": 10 + } } - } - """); - } catch(IOException e) { + """); + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -442,12 +458,12 @@ public void scanForErrors(JSONObject p, VolmitSender sender) { public boolean writeDimensionType(boolean changed, File datapacks) { File dimType = new File(datapacks, "iris/data/minecraft/dimension_type/overworld.json"); - if(!dimType.exists()) + if (!dimType.exists()) changed = true; dimType.getParentFile().mkdirs(); try { IO.writeAll(dimType, generateDatapackJson()); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -461,22 +477,4 @@ private String generateDatapackJson() { obj.put("logical_height", logicalHeight); return obj.toString(4); } - - private static final String DP_OVERWORLD_DEFAULT = """ - { - "ultrawarm": false, - "natural": true, - "coordinate_scale": 1.0, - "has_skylight": true, - "has_ceiling": false, - "ambient_light": 0, - "piglin_safe": false, - "bed_works": true, - "respawn_anchor_works": false, - "has_raids": true, - "monster_spawn_block_light_limit": 7, - "monster_spawn_light_level": 1, - "infiniburn": "#minecraft:infiniburn_overworld", - "effects": "minecraft:overworld" - }"""; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisDirection.java b/src/main/java/com/volmit/iris/engine/object/IrisDirection.java index d0f56086f..bd8c70d4d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisDirection.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisDirection.java @@ -67,7 +67,7 @@ public enum IrisDirection { } public static IrisDirection getDirection(BlockFace f) { - return switch(f) { + return switch (f) { case DOWN -> DOWN_NEGATIVE_Y; case EAST, EAST_NORTH_EAST, EAST_SOUTH_EAST -> EAST_POSITIVE_X; case NORTH, NORTH_NORTH_WEST, NORTH_EAST, NORTH_NORTH_EAST, NORTH_WEST -> NORTH_NEGATIVE_Z; @@ -79,9 +79,9 @@ public static IrisDirection getDirection(BlockFace f) { } public static IrisDirection fromJigsawBlock(String direction) { - for(IrisDirection i : IrisDirection.values()) { - if(i.name().toLowerCase().split("\\Q_\\E")[0] - .equals(direction.split("\\Q_\\E")[0])) { + for (IrisDirection i : IrisDirection.values()) { + if (i.name().toLowerCase().split("\\Q_\\E")[0] + .equals(direction.split("\\Q_\\E")[0])) { return i; } } @@ -90,7 +90,7 @@ public static IrisDirection fromJigsawBlock(String direction) { } public static IrisDirection getDirection(Jigsaw.Orientation orientation) { - return switch(orientation) { + return switch (orientation) { case DOWN_EAST, UP_EAST, EAST_UP -> EAST_POSITIVE_X; case DOWN_NORTH, UP_NORTH, NORTH_UP -> NORTH_NEGATIVE_Z; case DOWN_SOUTH, UP_SOUTH, SOUTH_UP -> SOUTH_POSITIVE_Z; @@ -103,11 +103,11 @@ public static IrisDirection closest(Vector v) { double m = Double.MAX_VALUE; IrisDirection s = null; - for(IrisDirection i : values()) { + for (IrisDirection i : values()) { Vector x = i.toVector(); double g = x.distance(v); - if(g < m) { + if (g < m) { m = g; s = i; } @@ -120,11 +120,11 @@ public static IrisDirection closest(Vector v, IrisDirection... d) { double m = Double.MAX_VALUE; IrisDirection s = null; - for(IrisDirection i : d) { + for (IrisDirection i : d) { Vector x = i.toVector(); double g = x.distance(v); - if(g < m) { + if (g < m) { m = g; s = i; } @@ -137,11 +137,11 @@ public static IrisDirection closest(Vector v, KList d) { double m = Double.MAX_VALUE; IrisDirection s = null; - for(IrisDirection i : d) { + for (IrisDirection i : d) { Vector x = i.toVector(); double g = x.distance(v); - if(g < m) { + if (g < m) { m = g; s = i; } @@ -157,8 +157,8 @@ public static KList news() { public static IrisDirection getDirection(Vector v) { Vector k = VectorMath.triNormalize(v.clone().normalize()); - for(IrisDirection i : udnews()) { - if(i.x == k.getBlockX() && i.y == k.getBlockY() && i.z == k.getBlockZ()) { + for (IrisDirection i : udnews()) { + if (i.x == k.getBlockX() && i.y == k.getBlockY() && i.z == k.getBlockZ()) { return i; } } @@ -174,25 +174,24 @@ public static KList udnews() { * Get the directional value from the given byte from common directional blocks * (MUST BE BETWEEN 0 and 5 INCLUSIVE) * - * @param b - * the byte + * @param b the byte * @return the direction or null if the byte is outside of the inclusive range * 0-5 */ public static IrisDirection fromByte(byte b) { - if(b > 5 || b < 0) { + if (b > 5 || b < 0) { return null; } - if(b == 0) { + if (b == 0) { return DOWN_NEGATIVE_Y; - } else if(b == 1) { + } else if (b == 1) { return UP_POSITIVE_Y; - } else if(b == 2) { + } else if (b == 2) { return NORTH_NEGATIVE_Z; - } else if(b == 3) { + } else if (b == 3) { return SOUTH_POSITIVE_Z; - } else if(b == 4) { + } else if (b == 4) { return WEST_NEGATIVE_X; } else { return EAST_POSITIVE_X; @@ -200,25 +199,25 @@ public static IrisDirection fromByte(byte b) { } public static void calculatePermutations() { - if(permute != null) { + if (permute != null) { return; } permute = new KMap<>(); - for(IrisDirection i : udnews()) { - for(IrisDirection j : udnews()) { + for (IrisDirection i : udnews()) { + for (IrisDirection j : udnews()) { GBiset b = new GBiset<>(i, j); - if(i.equals(j)) { + if (i.equals(j)) { permute.put(b, new DOP("DIRECT") { @Override public Vector op(Vector v) { return v; } }); - } else if(i.reverse().equals(j)) { - if(i.isVertical()) { + } else if (i.reverse().equals(j)) { + if (i.isVertical()) { permute.put(b, new DOP("R180CCZ") { @Override public Vector op(Vector v) { @@ -233,42 +232,42 @@ public Vector op(Vector v) { } }); } - } else if(getDirection(VectorMath.rotate90CX(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CX(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CX") { @Override public Vector op(Vector v) { return VectorMath.rotate90CX(v); } }); - } else if(getDirection(VectorMath.rotate90CCX(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CCX(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CCX") { @Override public Vector op(Vector v) { return VectorMath.rotate90CCX(v); } }); - } else if(getDirection(VectorMath.rotate90CY(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CY(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CY") { @Override public Vector op(Vector v) { return VectorMath.rotate90CY(v); } }); - } else if(getDirection(VectorMath.rotate90CCY(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CCY(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CCY") { @Override public Vector op(Vector v) { return VectorMath.rotate90CCY(v); } }); - } else if(getDirection(VectorMath.rotate90CZ(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CZ(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CZ") { @Override public Vector op(Vector v) { return VectorMath.rotate90CZ(v); } }); - } else if(getDirection(VectorMath.rotate90CCZ(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CCZ(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CCZ") { @Override public Vector op(Vector v) { @@ -289,7 +288,7 @@ public Vector op(Vector v) { @Override public String toString() { - return switch(this) { + return switch (this) { case DOWN_NEGATIVE_Y -> "Down"; case EAST_POSITIVE_X -> "East"; case NORTH_NEGATIVE_Z -> "North"; @@ -309,7 +308,7 @@ public Vector toVector() { } public boolean isCrooked(IrisDirection to) { - if(equals(to.reverse())) { + if (equals(to.reverse())) { return false; } @@ -319,9 +318,9 @@ public boolean isCrooked(IrisDirection to) { public Vector angle(Vector initial, IrisDirection d) { calculatePermutations(); - for(Map.Entry, DOP> entry : permute.entrySet()) { + for (Map.Entry, DOP> entry : permute.entrySet()) { GBiset i = entry.getKey(); - if(i.getA().equals(this) && i.getB().equals(d)) { + if (i.getA().equals(this) && i.getB().equals(d)) { return entry.getValue().op(initial); } } @@ -330,7 +329,7 @@ public Vector angle(Vector initial, IrisDirection d) { } public IrisDirection reverse() { - switch(this) { + switch (this) { case DOWN_NEGATIVE_Y: return UP_POSITIVE_Y; case EAST_POSITIVE_X: @@ -372,7 +371,7 @@ public CuboidDirection f() { * @return the byte value */ public byte byteValue() { - switch(this) { + switch (this) { case DOWN_NEGATIVE_Y: return 0; case EAST_POSITIVE_X: @@ -393,7 +392,7 @@ public byte byteValue() { } public BlockFace getFace() { - return switch(this) { + return switch (this) { case DOWN_NEGATIVE_Y -> BlockFace.DOWN; case EAST_POSITIVE_X -> BlockFace.EAST; case NORTH_NEGATIVE_Z -> BlockFace.NORTH; @@ -405,7 +404,7 @@ public BlockFace getFace() { } public Axis getAxis() { - return switch(this) { + return switch (this) { case DOWN_NEGATIVE_Y, UP_POSITIVE_Y -> Axis.Y; case EAST_POSITIVE_X, WEST_NEGATIVE_X -> Axis.X; case NORTH_NEGATIVE_Z, SOUTH_POSITIVE_Z -> Axis.Z; diff --git a/src/main/java/com/volmit/iris/engine/object/IrisDuration.java b/src/main/java/com/volmit/iris/engine/object/IrisDuration.java index f8f6659ea..0eaf13391 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisDuration.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisDuration.java @@ -65,15 +65,15 @@ public String toString() { public long toMilliseconds() { return getMilliseconds() - + TimeUnit.SECONDS.toMillis(getSeconds()) - + TimeUnit.MINUTES.toMillis(getMinutes()) - + TimeUnit.HOURS.toMillis(getHours()) - + TimeUnit.DAYS.toMillis(getDays()) - + (getMinecraftTicks() * 50L) - + (getMinecraftHours() * 50000L) - + (getMinecraftWeeks() * 50000L) - + (getMinecraftDays() * 24000L) - + (getMinecraftWeeks() * 168000L) - + (getMinecraftLunarCycles() * 192000L); + + TimeUnit.SECONDS.toMillis(getSeconds()) + + TimeUnit.MINUTES.toMillis(getMinutes()) + + TimeUnit.HOURS.toMillis(getHours()) + + TimeUnit.DAYS.toMillis(getDays()) + + (getMinecraftTicks() * 50L) + + (getMinecraftHours() * 50000L) + + (getMinecraftWeeks() * 50000L) + + (getMinecraftDays() * 24000L) + + (getMinecraftWeeks() * 168000L) + + (getMinecraftLunarCycles() * 192000L); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisEffect.java b/src/main/java/com/volmit/iris/engine/object/IrisEffect.java index b20b4d5b3..c28467877 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisEffect.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisEffect.java @@ -160,19 +160,19 @@ public PotionEffectType getRealType() { { PotionEffectType t = PotionEffectType.LUCK; - if(getPotionEffect().isEmpty()) { + if (getPotionEffect().isEmpty()) { return t; } try { - for(PotionEffectType i : PotionEffectType.values()) { - if(i.getName().toUpperCase().replaceAll("\\Q \\E", "_").equals(getPotionEffect())) { + for (PotionEffectType i : PotionEffectType.values()) { + if (i.getName().toUpperCase().replaceAll("\\Q \\E", "_").equals(getPotionEffect())) { t = i; return t; } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -184,51 +184,51 @@ public PotionEffectType getRealType() { } public void apply(Player p, Engine g) { - if(!canTick()) { + if (!canTick()) { return; } - if(RNG.r.nextInt(chance) != 0) { + if (RNG.r.nextInt(chance) != 0) { return; } - if(sound != null) { + if (sound != null) { Location part = p.getLocation().clone().add(RNG.r.i(-soundDistance, soundDistance), RNG.r.i(-soundDistance, soundDistance), RNG.r.i(-soundDistance, soundDistance)); J.s(() -> p.playSound(part, getSound(), (float) volume, (float) RNG.r.d(minPitch, maxPitch))); } - if(particleEffect != null) { + if (particleEffect != null) { Location part = p.getLocation().clone().add(p.getLocation().getDirection().clone().multiply(RNG.r.i(particleDistance) + particleAway)).clone().add(p.getLocation().getDirection().clone().rotateAroundY(Math.toRadians(90)).multiply(RNG.r.d(-particleDistanceWidth, particleDistanceWidth))); part.setY(Math.round(g.getHeight(part.getBlockX(), part.getBlockZ())) + 1); part.add(RNG.r.d(), 0, RNG.r.d()); int offset = p.getWorld().getMinHeight(); - if(extra != 0) { + if (extra != 0) { J.s(() -> p.spawnParticle(particleEffect, part.getX(), part.getY() + offset + RNG.r.i(particleOffset), - part.getZ(), - particleCount, - randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, - randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, - randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ, - extra)); + part.getZ(), + particleCount, + randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, + randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, + randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ, + extra)); } else { J.s(() -> p.spawnParticle(particleEffect, part.getX(), part.getY() + offset + RNG.r.i(particleOffset), part.getZ(), - particleCount, - randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, - randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, - randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ)); + particleCount, + randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, + randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, + randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ)); } } - if(commandRegistry != null) { + if (commandRegistry != null) { commandRegistry.run(p); } - if(potionStrength > -1) { - if(p.hasPotionEffect(getRealType())) { + if (potionStrength > -1) { + if (p.hasPotionEffect(getRealType())) { PotionEffect e = p.getPotionEffect(getRealType()); - if(e.getAmplifier() > getPotionStrength()) { + if (e.getAmplifier() > getPotionStrength()) { return; } @@ -236,46 +236,46 @@ public void apply(Player p, Engine g) { } J.s(() -> p.addPotionEffect(new PotionEffect(getRealType(), - RNG.r.i(Math.min(potionTicksMax, potionTicksMin), - Math.max(potionTicksMax, potionTicksMin)), - getPotionStrength(), - true, false, false))); + RNG.r.i(Math.min(potionTicksMax, potionTicksMin), + Math.max(potionTicksMax, potionTicksMin)), + getPotionStrength(), + true, false, false))); } } public void apply(Entity p) { - if(!canTick()) { + if (!canTick()) { return; } - if(RNG.r.nextInt(chance) != 0) { + if (RNG.r.nextInt(chance) != 0) { return; } - if(sound != null) { + if (sound != null) { Location part = p.getLocation().clone().add(RNG.r.i(-soundDistance, soundDistance), RNG.r.i(-soundDistance, soundDistance), RNG.r.i(-soundDistance, soundDistance)); J.s(() -> p.getWorld().playSound(part, getSound(), (float) volume, (float) RNG.r.d(minPitch, maxPitch))); } - if(particleEffect != null) { + if (particleEffect != null) { Location part = p.getLocation().clone().add(0, 0.25, 0).add(new Vector(1, 1, 1).multiply(RNG.r.d())).subtract(new Vector(1, 1, 1).multiply(RNG.r.d())); part.add(RNG.r.d(), 0, RNG.r.d()); int offset = p.getWorld().getMinHeight(); - if(extra != 0) { + if (extra != 0) { J.s(() -> p.getWorld().spawnParticle(particleEffect, part.getX(), part.getY() + offset + RNG.r.i(particleOffset), - part.getZ(), - particleCount, - randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, - randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, - randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ, - extra)); + part.getZ(), + particleCount, + randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, + randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, + randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ, + extra)); } else { J.s(() -> p.getWorld().spawnParticle(particleEffect, part.getX(), part.getY() + offset + RNG.r.i(particleOffset), part.getZ(), - particleCount, - randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, - randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, - randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ)); + particleCount, + randomAltX ? RNG.r.d(-particleAltX, particleAltX) : particleAltX, + randomAltY ? RNG.r.d(-particleAltY, particleAltY) : particleAltY, + randomAltZ ? RNG.r.d(-particleAltZ, particleAltZ) : particleAltZ)); } } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisElipsoid.java b/src/main/java/com/volmit/iris/engine/object/IrisElipsoid.java index 82c5a9b41..d902af348 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisElipsoid.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisElipsoid.java @@ -49,9 +49,9 @@ public class IrisElipsoid implements IRare { @SuppressWarnings("SuspiciousNameCombination") public void generate(RNG rng, Engine engine, MantleWriter writer, int x, int y, int z) { writer.setElipsoid(x, y, z, - xRadius.get(rng, z, y, engine.getData()), - yRadius.get(rng, x, z, engine.getData()), - zRadius.get(rng, y, x, engine.getData()), true, matterNodeCache.aquire(() -> CavernMatter.get(getCustomBiome(), 0))); + xRadius.get(rng, z, y, engine.getData()), + yRadius.get(rng, x, z, engine.getData()), + zRadius.get(rng, y, x, engine.getData()), true, matterNodeCache.aquire(() -> CavernMatter.get(getCustomBiome(), 0))); } public double maxSize() { diff --git a/src/main/java/com/volmit/iris/engine/object/IrisEnchantment.java b/src/main/java/com/volmit/iris/engine/object/IrisEnchantment.java index 76e66fd67..0a332d9fc 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisEnchantment.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisEnchantment.java @@ -59,18 +59,18 @@ public class IrisEnchantment { public void apply(RNG rng, ItemMeta meta) { try { Enchantment enchant = Enchantment.getByKey(NamespacedKey.minecraft(getEnchantment())); - if(enchant == null) { + if (enchant == null) { Iris.warn("Unknown Enchantment: " + getEnchantment()); return; } - if(rng.nextDouble() < chance) { - if(meta instanceof EnchantmentStorageMeta) { + if (rng.nextDouble() < chance) { + if (meta instanceof EnchantmentStorageMeta) { ((EnchantmentStorageMeta) meta).addStoredEnchant(enchant, getLevel(rng), true); return; } meta.addEnchant(enchant, getLevel(rng), true); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisEngineChunkData.java b/src/main/java/com/volmit/iris/engine/object/IrisEngineChunkData.java index 4b579e240..24a9c007a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisEngineChunkData.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisEngineChunkData.java @@ -28,10 +28,10 @@ public class IrisEngineChunkData { private KList cooldowns = new KList<>(); public void cleanup(Engine engine) { - for(IrisEngineSpawnerCooldown i : getCooldowns().copy()) { + for (IrisEngineSpawnerCooldown i : getCooldowns().copy()) { IrisSpawner sp = engine.getData().getSpawnerLoader().load(i.getSpawner()); - if(sp == null || i.canSpawn(sp.getMaximumRate())) { + if (sp == null || i.canSpawn(sp.getMaximumRate())) { getCooldowns().remove(i); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisEngineData.java b/src/main/java/com/volmit/iris/engine/object/IrisEngineData.java index 0166d8ee1..418340124 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisEngineData.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisEngineData.java @@ -38,8 +38,8 @@ public void removeChunk(int x, int z) { public IrisEngineChunkData getChunk(int x, int z) { long k = Cache.key(x, z); - for(IrisEngineChunkData i : chunks) { - if(i.getChunk() == k) { + for (IrisEngineChunkData i : chunks) { + if (i.getChunk() == k) { return i; } } @@ -51,18 +51,18 @@ public IrisEngineChunkData getChunk(int x, int z) { } public void cleanup(Engine engine) { - for(IrisEngineSpawnerCooldown i : getSpawnerCooldowns().copy()) { + for (IrisEngineSpawnerCooldown i : getSpawnerCooldowns().copy()) { IrisSpawner sp = engine.getData().getSpawnerLoader().load(i.getSpawner()); - if(sp == null || i.canSpawn(sp.getMaximumRate())) { + if (sp == null || i.canSpawn(sp.getMaximumRate())) { getSpawnerCooldowns().remove(i); } } - for(IrisEngineChunkData i : chunks.copy()) { + for (IrisEngineChunkData i : chunks.copy()) { i.cleanup(engine); - if(i.isEmpty()) { + if (i.isEmpty()) { getChunks().remove(i); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisEntity.java b/src/main/java/com/volmit/iris/engine/object/IrisEntity.java index 99f272719..db8aefd4a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisEntity.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisEntity.java @@ -172,22 +172,22 @@ public Entity spawn(Engine gen, Location at) { } public Entity spawn(Engine gen, Location at, RNG rng) { - if(!Chunks.isSafe(at)) { + if (!Chunks.isSafe(at)) { return null; } - if(isSpawnEffectRiseOutOfGround()) { + if (isSpawnEffectRiseOutOfGround()) { AtomicReference f = new AtomicReference<>(at); try { J.sfut(() -> { - if(Chunks.hasPlayersNearby(f.get())) { + if (Chunks.hasPlayersNearby(f.get())) { Location b = f.get().clone(); Location start = new Location(b.getWorld(), b.getX(), b.getY() - 5, b.getZ()); f.set(start); } }).get(); - } catch(InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); - } catch(ExecutionException e) { + } catch (ExecutionException e) { e.printStackTrace(); } at = f.get(); @@ -195,23 +195,23 @@ public Entity spawn(Engine gen, Location at, RNG rng) { Entity ee = doSpawn(at); - if(ee == null && !Chunks.isSafe(at)) { + if (ee == null && !Chunks.isSafe(at)) { return null; } - if(!spawnerScript.isEmpty() && ee == null) { - synchronized(this) { + if (!spawnerScript.isEmpty() && ee == null) { + synchronized (this) { gen.getExecution().getAPI().setLocation(at); try { ee = (Entity) gen.getExecution().evaluate(spawnerScript); - } catch(Throwable ex) { + } catch (Throwable ex) { Iris.error("You must return an Entity in your scripts to use entity scripts!"); ex.printStackTrace(); } } } - if(ee == null) { + if (ee == null) { return null; } @@ -225,25 +225,25 @@ public Entity spawn(Engine gen, Location at, RNG rng) { e.setPersistent(isKeepEntity() || IrisSettings.get().getWorld().isForcePersistEntities()); int gg = 0; - for(IrisEntity i : passengers) { + for (IrisEntity i : passengers) { Entity passenger = i.spawn(gen, at, rng.nextParallelRNG(234858 + gg++)); - if(!Bukkit.isPrimaryThread()) { + if (!Bukkit.isPrimaryThread()) { J.s(() -> e.addPassenger(passenger)); } } - if(e instanceof Attributable) { + if (e instanceof Attributable) { Attributable a = (Attributable) e; - for(IrisAttributeModifier i : getAttributes()) { + for (IrisAttributeModifier i : getAttributes()) { i.apply(rng, a); } } - if(e instanceof Lootable) { + if (e instanceof Lootable) { Lootable l = (Lootable) e; - if(getLoot().getTables().isNotEmpty()) { + if (getLoot().getTables().isNotEmpty()) { Location finalAt = at; l.setLootTable(new LootTable() { @Override @@ -255,7 +255,7 @@ public NamespacedKey getKey() { public Collection populateLoot(Random random, LootContext context) { KList items = new KList<>(); - for(String fi : getLoot().getTables()) { + for (String fi : getLoot().getTables()) { IrisLootTable i = gen.getData().getLootLoader().load(fi); items.addAll(i.getLoot(gen.isStudio(), rng.nextParallelRNG(345911), InventorySlotType.STORAGE, finalAt.getBlockX(), finalAt.getBlockY(), finalAt.getBlockZ())); } @@ -265,7 +265,7 @@ public Collection populateLoot(Random random, LootContext context) { @Override public void fillInventory(Inventory inventory, Random random, LootContext context) { - for(ItemStack i : populateLoot(random, context)) { + for (ItemStack i : populateLoot(random, context)) { inventory.addItem(i); } @@ -275,52 +275,52 @@ public void fillInventory(Inventory inventory, Random random, LootContext contex } } - if(e instanceof LivingEntity) { + if (e instanceof LivingEntity) { LivingEntity l = (LivingEntity) e; l.setAI(isAi()); l.setCanPickupItems(isPickupItems()); - if(getLeashHolder() != null) { + if (getLeashHolder() != null) { l.setLeashHolder(getLeashHolder().spawn(gen, at, rng.nextParallelRNG(234548))); } l.setRemoveWhenFarAway(isRemovable()); - if(getHelmet() != null && rng.i(1, getHelmet().getRarity()) == 1) { + if (getHelmet() != null && rng.i(1, getHelmet().getRarity()) == 1) { l.getEquipment().setHelmet(getHelmet().get(gen.isStudio(), rng)); } - if(getChestplate() != null && rng.i(1, getChestplate().getRarity()) == 1) { + if (getChestplate() != null && rng.i(1, getChestplate().getRarity()) == 1) { l.getEquipment().setChestplate(getChestplate().get(gen.isStudio(), rng)); } - if(getLeggings() != null && rng.i(1, getLeggings().getRarity()) == 1) { + if (getLeggings() != null && rng.i(1, getLeggings().getRarity()) == 1) { l.getEquipment().setLeggings(getLeggings().get(gen.isStudio(), rng)); } - if(getBoots() != null && rng.i(1, getBoots().getRarity()) == 1) { + if (getBoots() != null && rng.i(1, getBoots().getRarity()) == 1) { l.getEquipment().setBoots(getBoots().get(gen.isStudio(), rng)); } - if(getMainHand() != null && rng.i(1, getMainHand().getRarity()) == 1) { + if (getMainHand() != null && rng.i(1, getMainHand().getRarity()) == 1) { l.getEquipment().setItemInMainHand(getMainHand().get(gen.isStudio(), rng)); } - if(getOffHand() != null && rng.i(1, getOffHand().getRarity()) == 1) { + if (getOffHand() != null && rng.i(1, getOffHand().getRarity()) == 1) { l.getEquipment().setItemInOffHand(getOffHand().get(gen.isStudio(), rng)); } } - if(e instanceof Ageable && isBaby()) { + if (e instanceof Ageable && isBaby()) { ((Ageable) e).setBaby(); } - if(e instanceof Panda) { + if (e instanceof Panda) { ((Panda) e).setMainGene(getPandaMainGene()); ((Panda) e).setMainGene(getPandaHiddenGene()); } - if(e instanceof Villager) { + if (e instanceof Villager) { Villager villager = (Villager) e; villager.setRemoveWhenFarAway(false); Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, () -> { @@ -328,27 +328,27 @@ public void fillInventory(Inventory inventory, Random random, LootContext contex }, 1); } - if(e instanceof Mob) { + if (e instanceof Mob) { Mob m = (Mob) e; m.setAware(isAware()); } - if(spawnEffect != null) { + if (spawnEffect != null) { spawnEffect.apply(e); } - if(postSpawnScripts.isNotEmpty()) { - synchronized(this) { + if (postSpawnScripts.isNotEmpty()) { + synchronized (this) { gen.getExecution().getAPI().setLocation(at); gen.getExecution().getAPI().setEntity(ee); - for(String i : postSpawnScripts) { + for (String i : postSpawnScripts) { gen.getExecution().execute(i); } } } - if(rawCommands.isNotEmpty()) { + if (rawCommands.isNotEmpty()) { final Location fat = at; rawCommands.forEach(r -> r.run(fat)); } @@ -356,7 +356,7 @@ public void fillInventory(Inventory inventory, Random random, LootContext contex Location finalAt1 = at; J.s(() -> { - if(isSpawnEffectRiseOutOfGround() && e instanceof LivingEntity && Chunks.hasPlayersNearby(finalAt1)) { + if (isSpawnEffectRiseOutOfGround() && e instanceof LivingEntity && Chunks.hasPlayersNearby(finalAt1)) { Location start = finalAt1.clone(); e.setInvulnerable(true); ((LivingEntity) e).setAI(false); @@ -365,17 +365,17 @@ public void fillInventory(Inventory inventory, Random random, LootContext contex AtomicInteger t = new AtomicInteger(0); AtomicInteger v = new AtomicInteger(0); v.set(J.sr(() -> { - if(t.get() > 100) { + if (t.get() > 100) { J.csr(v.get()); return; } t.incrementAndGet(); - if(e.getLocation().getBlock().getType().isSolid() || ((LivingEntity) e).getEyeLocation().getBlock().getType().isSolid()) { + if (e.getLocation().getBlock().getType().isSolid() || ((LivingEntity) e).getEyeLocation().getBlock().getType().isSolid()) { e.teleport(start.add(new Vector(0, 0.1, 0))); ItemStack itemCrackData = new ItemStack(((LivingEntity) e).getEyeLocation().clone().subtract(0, 2, 0).getBlock().getBlockData().getMaterial()); e.getWorld().spawnParticle(Particle.ITEM_CRACK, ((LivingEntity) e).getEyeLocation(), 6, 0.2, 0.4, 0.2, 0.06f, itemCrackData); - if(M.r(0.2)) { + if (M.r(0.2)) { e.getWorld().playSound(e.getLocation(), Sound.BLOCK_CHORUS_FLOWER_GROW, 0.8f, 0.1f); } } else { @@ -396,11 +396,11 @@ public void fillInventory(Inventory inventory, Random random, LootContext contex private int surfaceY(Location l) { int m = l.getBlockY(); - while(m-- > 0) { + while (m-- > 0) { Location ll = l.clone(); ll.setY(m); - if(ll.getBlock().getType().isSolid()) { + if (ll.getBlock().getType().isSolid()) { return m; } } @@ -409,30 +409,30 @@ private int surfaceY(Location l) { } private Entity doSpawn(Location at) { - if(!Chunks.isSafe(at)) { + if (!Chunks.isSafe(at)) { return null; } - if(type.equals(EntityType.UNKNOWN)) { + if (type.equals(EntityType.UNKNOWN)) { return null; } - if(!Bukkit.isPrimaryThread()) { + if (!Bukkit.isPrimaryThread()) { // Someone called spawn (worldedit maybe?) on a non server thread // Due to the structure of iris, we will call it sync and busy wait until it's done. AtomicReference ae = new AtomicReference<>(); try { J.s(() -> ae.set(doSpawn(at))); - } catch(Throwable e) { + } catch (Throwable e) { return null; } PrecisionStopwatch p = PrecisionStopwatch.start(); - while(ae.get() == null) { + while (ae.get() == null) { J.sleep(25); - if(p.getMilliseconds() > 500) { + if (p.getMilliseconds() > 500) { return null; } } @@ -440,8 +440,8 @@ private Entity doSpawn(Location at) { return ae.get(); } - if(isSpecialType()) { - if(specialType.toLowerCase().startsWith("mythicmobs:")) { + if (isSpecialType()) { + if (specialType.toLowerCase().startsWith("mythicmobs:")) { return Iris.linkMythicMobs.spawnMob(specialType.substring(11), at); } else { Iris.warn("Invalid mob type to spawn: '" + specialType + "'!"); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisEntitySpawn.java b/src/main/java/com/volmit/iris/engine/object/IrisEntitySpawn.java index 0a46568e7..9b2aa6fb0 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisEntitySpawn.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisEntitySpawn.java @@ -66,28 +66,28 @@ public int spawn(Engine gen, Chunk c, RNG rng) { int spawns = minSpawns == maxSpawns ? minSpawns : rng.i(Math.min(minSpawns, maxSpawns), Math.max(minSpawns, maxSpawns)); int s = 0; - if(spawns > 0) { - for(int id = 0; id < spawns; id++) { + if (spawns > 0) { + for (int id = 0; id < spawns; id++) { int x = (c.getX() * 16) + rng.i(15); int z = (c.getZ() * 16) + rng.i(15); int h = gen.getHeight(x, z, true) + (gen.getWorld().tryGetRealWorld() ? gen.getWorld().realWorld().getMinHeight() : -64); int hf = gen.getHeight(x, z, false) + (gen.getWorld().tryGetRealWorld() ? gen.getWorld().realWorld().getMinHeight() : -64); - Location l = switch(getReferenceSpawner().getGroup()) { + Location l = switch (getReferenceSpawner().getGroup()) { case NORMAL -> new Location(c.getWorld(), x, hf + 1, z); case CAVE -> gen.getMantle().findMarkers(c.getX(), c.getZ(), MarkerMatter.CAVE_FLOOR) - .convert((i) -> i.toLocation(c.getWorld()).add(0, 1, 0)).getRandom(rng); + .convert((i) -> i.toLocation(c.getWorld()).add(0, 1, 0)).getRandom(rng); case UNDERWATER, BEACH -> new Location(c.getWorld(), x, rng.i(h + 1, hf), z); }; - if(l != null) { - if(referenceSpawner.getAllowedLightLevels().getMin() > 0 || referenceSpawner.getAllowedLightLevels().getMax() < 15) { - if(referenceSpawner.getAllowedLightLevels().contains(l.getBlock().getLightLevel())) { - if(spawn100(gen, l) != null) { + if (l != null) { + if (referenceSpawner.getAllowedLightLevels().getMin() > 0 || referenceSpawner.getAllowedLightLevels().getMax() < 15) { + if (referenceSpawner.getAllowedLightLevels().contains(l.getBlock().getLightLevel())) { + if (spawn100(gen, l) != null) { s++; } } } else { - if(spawn100(gen, l) != null) { + if (spawn100(gen, l) != null) { s++; } } @@ -102,28 +102,28 @@ public int spawn(Engine gen, IrisPosition c, RNG rng) { int spawns = minSpawns == maxSpawns ? minSpawns : rng.i(Math.min(minSpawns, maxSpawns), Math.max(minSpawns, maxSpawns)); int s = 0; - if(!gen.getWorld().tryGetRealWorld()) { + if (!gen.getWorld().tryGetRealWorld()) { return 0; } World world = gen.getWorld().realWorld(); - if(spawns > 0) { + if (spawns > 0) { - if(referenceMarker != null) { + if (referenceMarker != null) { gen.getMantle().getMantle().remove(c.getX(), c.getY(), c.getZ(), MatterMarker.class); } - for(int id = 0; id < spawns; id++) { + for (int id = 0; id < spawns; id++) { Location l = c.toLocation(world).add(0, 1, 0); - if(referenceSpawner.getAllowedLightLevels().getMin() > 0 || referenceSpawner.getAllowedLightLevels().getMax() < 15) { - if(referenceSpawner.getAllowedLightLevels().contains(l.getBlock().getLightLevel())) { - if(spawn100(gen, l, true) != null) { + if (referenceSpawner.getAllowedLightLevels().getMin() > 0 || referenceSpawner.getAllowedLightLevels().getMax() < 15) { + if (referenceSpawner.getAllowedLightLevels().contains(l.getBlock().getLightLevel())) { + if (spawn100(gen, l, true) != null) { s++; } } } else { - if(spawn100(gen, l, true) != null) { + if (spawn100(gen, l, true) != null) { s++; } } @@ -138,11 +138,11 @@ public IrisEntity getRealEntity(Engine g) { } public Entity spawn(Engine g, Location at) { - if(getRealEntity(g) == null) { + if (getRealEntity(g) == null) { return null; } - if(rng.aquire(() -> new RNG(g.getSeedManager().getEntity())).i(1, getRarity()) == 1) { + if (rng.aquire(() -> new RNG(g.getSeedManager().getEntity())).i(1, getRarity()) == 1) { return spawn100(g, at); } @@ -156,23 +156,23 @@ private Entity spawn100(Engine g, Location at) { private Entity spawn100(Engine g, Location at, boolean ignoreSurfaces) { try { IrisEntity irisEntity = getRealEntity(g); - if(irisEntity == null) { // No entity + if (irisEntity == null) { // No entity Iris.debug(" You are trying to spawn an entity that does not exist!"); return null; } - if(!ignoreSurfaces && !irisEntity.getSurface().matches(at.clone().subtract(0, 1, 0).getBlock())) { + if (!ignoreSurfaces && !irisEntity.getSurface().matches(at.clone().subtract(0, 1, 0).getBlock())) { return null; } Entity e = irisEntity.spawn(g, at.add(0.5, 0, 0.5), rng.aquire(() -> new RNG(g.getSeedManager().getEntity()))); - if(e != null) { + if (e != null) { Iris.debug("Spawned " + C.DARK_AQUA + "Entity<" + getEntity() + "> " + C.GREEN + e.getType() + C.LIGHT_PURPLE + " @ " + C.GRAY + e.getLocation().getX() + ", " + e.getLocation().getY() + ", " + e.getLocation().getZ()); } return e; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); Iris.error(" Failed to retrieve real entity @ " + at + " (entity: " + getEntity() + ")"); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisExpression.java b/src/main/java/com/volmit/iris/engine/object/IrisExpression.java index 97fb58041..98cb0ed0f 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisExpression.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisExpression.java @@ -64,21 +64,21 @@ private Expression expression() { Scope scope = new Scope(); // Create variable scope. This scope can hold both constants and invocation variables. try { - for(IrisExpressionLoad i : variables) { + for (IrisExpressionLoad i : variables) { scope.addInvocationVariable(i.getName()); } scope.addInvocationVariable("x"); scope.addInvocationVariable("y"); scope.addInvocationVariable("z"); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.error("Script Variable load error in " + getLoadFile().getPath()); } try { return parser.parse(getExpression(), scope); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.error("Script load error in " + getLoadFile().getPath()); } @@ -89,13 +89,13 @@ private Expression expression() { public ProceduralStream stream(RNG rng) { return streamCache.aquire(() -> ProceduralStream.of((x, z) -> evaluate(rng, x, z), - (x, y, z) -> evaluate(rng, x, y, z), Interpolated.DOUBLE)); + (x, y, z) -> evaluate(rng, x, y, z), Interpolated.DOUBLE)); } public double evaluate(RNG rng, double x, double z) { double[] g = new double[3 + getVariables().size()]; int m = 0; - for(IrisExpressionLoad i : getVariables()) { + for (IrisExpressionLoad i : getVariables()) { g[m++] = i.getValue(rng, getLoader(), x, z); } @@ -109,7 +109,7 @@ public double evaluate(RNG rng, double x, double z) { public double evaluate(RNG rng, double x, double y, double z) { double[] g = new double[3 + getVariables().size()]; int m = 0; - for(IrisExpressionLoad i : getVariables()) { + for (IrisExpressionLoad i : getVariables()) { g[m++] = i.getValue(rng, getLoader(), x, y, z); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisExpressionLoad.java b/src/main/java/com/volmit/iris/engine/object/IrisExpressionLoad.java index c0296c535..9a7b8a26a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisExpressionLoad.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisExpressionLoad.java @@ -59,15 +59,15 @@ public class IrisExpressionLoad { private transient AtomicCache valueCache = new AtomicCache<>(); public double getValue(RNG rng, IrisData data, double x, double z) { - if(engineValue != null) { + if (engineValue != null) { return valueCache.aquire(() -> engineValue.get(data.getEngine())); } - if(engineStreamValue != null) { + if (engineStreamValue != null) { return streamCache.aquire(() -> engineStreamValue.get(data.getEngine())).get(x, z); } - if(styleValue != null) { + if (styleValue != null) { return styleValue.create(rng, data).noise(x, z); } @@ -75,15 +75,15 @@ public double getValue(RNG rng, IrisData data, double x, double z) { } public double getValue(RNG rng, IrisData data, double x, double y, double z) { - if(engineValue != null) { + if (engineValue != null) { return valueCache.aquire(() -> engineValue.get(data.getEngine())); } - if(engineStreamValue != null) { + if (engineStreamValue != null) { return streamCache.aquire(() -> engineStreamValue.get(data.getEngine())).get(x, z); } - if(styleValue != null) { + if (styleValue != null) { return styleValue.create(rng, data).noise(x, y, z); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisFluidBodies.java b/src/main/java/com/volmit/iris/engine/object/IrisFluidBodies.java index 071e2ade6..69b44a65a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisFluidBodies.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisFluidBodies.java @@ -49,14 +49,14 @@ public class IrisFluidBodies { @BlockCoordinates public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, int z) { - if(rivers.isNotEmpty()) { - for(IrisRiver i : rivers) { + if (rivers.isNotEmpty()) { + for (IrisRiver i : rivers) { i.generate(writer, rng, engine, x, y, z); } } - if(lakes.isNotEmpty()) { - for(IrisLake i : lakes) { + if (lakes.isNotEmpty()) { + for (IrisLake i : lakes) { i.generate(writer, rng, engine, x, y, z); } } @@ -65,11 +65,11 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, public int getMaxRange(IrisData data) { int max = 0; - for(IrisRiver i : rivers) { + for (IrisRiver i : rivers) { max = Math.max(max, i.getSize(data)); } - for(IrisLake i : lakes) { + for (IrisLake i : lakes) { max = Math.max(max, i.getSize(data)); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisGenerator.java b/src/main/java/com/volmit/iris/engine/object/IrisGenerator.java index 1d1ddd95b..11bc7fa75 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisGenerator.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisGenerator.java @@ -100,29 +100,29 @@ public CellGenerator getCellGenerator(long seed) { } public T fitRarity(KList b, long superSeed, double rx, double rz) { - if(b.size() == 0) { + if (b.size() == 0) { return null; } - if(b.size() == 1) { + if (b.size() == 1) { return b.get(0); } KList rarityMapped = new KList<>(); boolean o = false; int max = 1; - for(T i : b) { - if(i.getRarity() > max) { + for (T i : b) { + if (i.getRarity() > max) { max = i.getRarity(); } } max++; - for(T i : b) { - for(int j = 0; j < max - i.getRarity(); j++) { + for (T i : b) { + for (int j = 0; j < max - i.getRarity(); j++) { //noinspection AssignmentUsedAsCondition - if(o = !o) { + if (o = !o) { rarityMapped.add(i); } else { rarityMapped.add(0, i); @@ -130,11 +130,11 @@ public T fitRarity(KList b, long superSeed, double rx, doub } } - if(rarityMapped.size() == 1) { + if (rarityMapped.size() == 1) { return rarityMapped.get(0); } - if(rarityMapped.isEmpty()) { + if (rarityMapped.isEmpty()) { throw new RuntimeException("BAD RARITY MAP! RELATED TO: " + b.toString(", or possibly ")); } @@ -142,11 +142,11 @@ public T fitRarity(KList b, long superSeed, double rx, doub } public T fit(T[] v, long superSeed, double rx, double rz) { - if(v.length == 0) { + if (v.length == 0) { return null; } - if(v.length == 1) { + if (v.length == 1) { return v[0]; } @@ -154,11 +154,11 @@ public T fit(T[] v, long superSeed, double rx, double rz) { } public T fit(List v, long superSeed, double rx, double rz) { - if(v.size() == 0) { + if (v.size() == 0) { return null; } - if(v.size() == 1) { + if (v.size() == 1) { return v.get(0); } @@ -166,7 +166,7 @@ public T fit(List v, long superSeed, double rx, double rz) { } public int fit(int min, int max, long superSeed, double rx, double rz) { - if(min == max) { + if (min == max) { return min; } @@ -176,7 +176,7 @@ public int fit(int min, int max, long superSeed, double rx, double rz) { } public int fit(double min, double max, long superSeed, double rx, double rz) { - if(min == max) { + if (min == max) { return (int) Math.round(min); } @@ -186,7 +186,7 @@ public int fit(double min, double max, long superSeed, double rx, double rz) { } public double fitDouble(double min, double max, long superSeed, double rx, double rz) { - if(min == max) { + if (min == max) { return min; } @@ -205,7 +205,7 @@ public double getHeight(double rx, double ry, double rz, long superSeed) { } public double getHeight(double rx, double ry, double rz, long superSeed, boolean no3d) { - if(composite.isEmpty()) { + if (composite.isEmpty()) { return 0; } @@ -213,16 +213,16 @@ public double getHeight(double rx, double ry, double rz, long superSeed, boolean double h = multiplicitive ? 1 : 0; double tp = 0; - if(composite.size() == 1) { - if(multiplicitive) { + if (composite.size() == 1) { + if (multiplicitive) { h *= composite.get(0).getNoise(getSeed() + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader()); } else { tp += composite.get(0).getOpacity(); h += composite.get(0).getNoise(getSeed() + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader()); } } else { - for(IrisNoiseGenerator i : composite) { - if(multiplicitive) { + for (IrisNoiseGenerator i : composite) { + if (multiplicitive) { h *= i.getNoise(getSeed() + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader()); } else { tp += i.getOpacity(); @@ -233,7 +233,7 @@ public double getHeight(double rx, double ry, double rz, long superSeed, boolean double v = multiplicitive ? h * opacity : (h / tp) * opacity; - if(Double.isNaN(v)) { + if (Double.isNaN(v)) { v = 0; } @@ -271,7 +271,7 @@ public IrisGenerator rescale(double scale) { public KList getAllComposites() { KList g = new KList<>(); - for(IrisNoiseGenerator i : composite) { + for (IrisNoiseGenerator i : composite) { g.addAll(i.getAllComposites()); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java b/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java index 5639f3cc3..1c1da694b 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java @@ -82,45 +82,44 @@ public IrisGeneratorStyle zoomed(double z) { } public CNG createNoCache(RNG rng, IrisData data) { - return createNoCache(rng, data, false); + return createNoCache(rng, data, false); } - private int hash() - { + private int hash() { return Objects.hash(expression, imageMap, multiplier, axialFracturing, fracture != null ? fracture.hash() : 0, exponent, cacheSize, zoom, cellularZoom, cellularFrequency, style); } public CNG createNoCache(RNG rng, IrisData data, boolean actuallyCached) { String cacheKey = hash() + ""; - if(getExpression() != null) { + if (getExpression() != null) { IrisExpression e = data.getExpressionLoader().load(getExpression()); - if(e != null) { + if (e != null) { CNG cng = new CNG(rng, new ExpressionNoise(rng, e), 1D, 1) - .bake().scale(1D / zoom).pow(exponent).bake(); + .bake().scale(1D / zoom).pow(exponent).bake(); cng.setTrueFracturing(axialFracturing); - if(fracture != null) { + if (fracture != null) { cng.fractureWith(fracture.create(rng.nextParallelRNG(2934), data), fracture.getMultiplier()); } - if(cellularFrequency > 0) { + if (cellularFrequency > 0) { return cng.cellularize(rng.nextParallelRNG(884466), cellularFrequency).scale(1D / cellularZoom).bake(); } return cng; } - } else if(getImageMap() != null) { + } else if (getImageMap() != null) { CNG cng = new CNG(rng, new ImageNoise(data, getImageMap()), 1D, 1).bake().scale(1D / zoom).pow(exponent).bake(); cng.setTrueFracturing(axialFracturing); - if(fracture != null) { + if (fracture != null) { cng.fractureWith(fracture.create(rng.nextParallelRNG(2934), data), fracture.getMultiplier()); } - if(cellularFrequency > 0) { + if (cellularFrequency > 0) { return cng.cellularize(rng.nextParallelRNG(884466), cellularFrequency).scale(1D / cellularZoom).bake(); } @@ -130,19 +129,18 @@ public CNG createNoCache(RNG rng, IrisData data, boolean actuallyCached) { CNG cng = style.create(rng).bake().scale(1D / zoom).pow(exponent).bake(); cng.setTrueFracturing(axialFracturing); - if(fracture != null) { + if (fracture != null) { cng.fractureWith(fracture.create(rng.nextParallelRNG(2934), data), fracture.getMultiplier()); } - if(cellularFrequency > 0) { + if (cellularFrequency > 0) { return cng.cellularize(rng.nextParallelRNG(884466), cellularFrequency).scale(1D / cellularZoom).bake(); } return cng; } - public double warp(RNG rng, IrisData data, double value, double... coords) - { + public double warp(RNG rng, IrisData data, double value, double... coords) { return create(rng, data).noise(coords) + value; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisImage.java b/src/main/java/com/volmit/iris/engine/object/IrisImage.java index 5960d576c..49afae0e4 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisImage.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisImage.java @@ -32,6 +32,14 @@ public class IrisImage extends IrisRegistrant { private final BufferedImage image; + public IrisImage() { + this(new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB)); + } + + public IrisImage(BufferedImage image) { + this.image = image; + } + public int getWidth() { return image.getWidth(); } @@ -41,7 +49,7 @@ public int getHeight() { } public int getRawValue(int x, int z) { - if(x >= getWidth() || z >= getHeight() || x < 0 || z < 0) { + if (x >= getWidth() || z >= getHeight() || x < 0 || z < 0) { return 0; } @@ -51,7 +59,7 @@ public int getRawValue(int x, int z) { public double getValue(IrisImageChannel channel, int x, int z) { int color = getRawValue(x, z); - switch(channel) { + switch (channel) { case RED -> { return ((color >> 16) & 0xFF) / 255D; } @@ -99,14 +107,6 @@ public double getValue(IrisImageChannel channel, int x, int z) { return color; } - public IrisImage() { - this(new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB)); - } - - public IrisImage(BufferedImage image) { - this.image = image; - } - @Override public String getFolderName() { return "images"; @@ -128,14 +128,14 @@ public void writeDebug(IrisImageChannel channel) { try { File at = new File(getLoadFile().getParentFile(), "debug-see-" + getLoadFile().getName()); BufferedImage b = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); - for(int i = 0; i < getWidth(); i++) { - for(int j = 0; j < getHeight(); j++) { + for (int i = 0; i < getWidth(); i++) { + for (int j = 0; j < getHeight(); j++) { b.setRGB(i, j, Color.getHSBColor(0, 0, (float) getValue(channel, i, j)).getRGB()); } } ImageIO.write(b, "png", at); Iris.warn("Debug image written to " + at.getPath() + " for channel " + channel.name()); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisImageMap.java b/src/main/java/com/volmit/iris/engine/object/IrisImageMap.java index 666f18275..06ae0e27d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisImageMap.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisImageMap.java @@ -66,7 +66,7 @@ public class IrisImageMap { public double getNoise(IrisData data, int x, int z) { IrisImage i = imageCache.aquire(() -> data.getImageLoader().load(image)); - if(i == null) { + if (i == null) { Iris.error("NULL IMAGE FOR " + image); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisInterpolator.java b/src/main/java/com/volmit/iris/engine/object/IrisInterpolator.java index 99c716978..5834fc799 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisInterpolator.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisInterpolator.java @@ -57,7 +57,7 @@ public int hashCode() { @Override public boolean equals(Object o) { - if(o instanceof IrisInterpolator i) { + if (o instanceof IrisInterpolator i) { return i.getFunction().equals(function) && i.getHorizontalScale() == horizontalScale; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisJigsawPiece.java b/src/main/java/com/volmit/iris/engine/object/IrisJigsawPiece.java index c862339f5..72feb927c 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisJigsawPiece.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisJigsawPiece.java @@ -66,7 +66,7 @@ public int getMax2dDimension() { try { BlockVector v = IrisObject.sampleSize(getLoader().getObjectLoader().findFile(getObject())); return Math.max(v.getBlockX(), v.getBlockZ()); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -80,7 +80,7 @@ public int getMax3dDimension() { try { BlockVector v = IrisObject.sampleSize(getLoader().getObjectLoader().findFile(getObject())); return Math.max(Math.max(v.getBlockX(), v.getBlockZ()), v.getBlockY()); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); e.printStackTrace(); } @@ -91,8 +91,8 @@ public int getMax3dDimension() { public IrisJigsawPieceConnector getConnector(IrisPosition relativePosition) { - for(IrisJigsawPieceConnector i : connectors) { - if(i.getPosition().equals(relativePosition)) { + for (IrisJigsawPieceConnector i : connectors) { + if (i.getPosition().equals(relativePosition)) { return i; } } @@ -109,7 +109,7 @@ public IrisJigsawPiece copy() { p.setConnectors(new KList<>()); p.setPlacementOptions(getPlacementOptions()); - for(IrisJigsawPieceConnector i : getConnectors()) { + for (IrisJigsawPieceConnector i : getConnectors()) { p.getConnectors().add(i.copy()); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisJigsawStructure.java b/src/main/java/com/volmit/iris/engine/object/IrisJigsawStructure.java index cd80710a9..b12e8deee 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisJigsawStructure.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisJigsawStructure.java @@ -65,19 +65,19 @@ public class IrisJigsawStructure extends IrisRegistrant { private transient AtomicCache maxDimension = new AtomicCache<>(); private void loadPool(String p, KList pools, KList pieces) { - if(p.isEmpty()) { + if (p.isEmpty()) { return; } IrisJigsawPool pool = getLoader().getJigsawPoolLoader().load(p); - if(pool == null) { + if (pool == null) { Iris.warn("Can't find jigsaw pool: " + p); return; } - for(String i : pool.getPieces()) { - if(pieces.addIfMissing(i)) { + for (String i : pool.getPieces()) { + if (pieces.addIfMissing(i)) { loadPiece(i, pools, pieces); } } @@ -86,14 +86,14 @@ private void loadPool(String p, KList pools, KList pieces) { private void loadPiece(String p, KList pools, KList pieces) { IrisJigsawPiece piece = getLoader().getJigsawPieceLoader().load(p); - if(piece == null) { + if (piece == null) { Iris.warn("Can't find jigsaw piece: " + p); return; } - for(IrisJigsawPieceConnector i : piece.getConnectors()) { - for(String j : i.getPools()) { - if(pools.addIfMissing(j)) { + for (IrisJigsawPieceConnector i : piece.getConnectors()) { + for (String j : i.getPools()) { + if (pools.addIfMissing(j)) { loadPool(j, pools, pieces); } } @@ -102,16 +102,16 @@ private void loadPiece(String p, KList pools, KList pieces) { public int getMaxDimension() { return maxDimension.aquire(() -> { - if(useMaxPieceSizeForParallaxRadius) { + if (useMaxPieceSizeForParallaxRadius) { int max = 0; KList pools = new KList<>(); KList pieces = new KList<>(); - for(String i : getPieces()) { + for (String i : getPieces()) { loadPiece(i, pools, pieces); } - for(String i : pieces) { + for (String i : pieces) { max = Math.max(max, getLoader().getJigsawPieceLoader().load(i).getMax3dDimension()); } @@ -120,13 +120,13 @@ public int getMaxDimension() { KList pools = new KList<>(); KList pieces = new KList<>(); - for(String i : getPieces()) { + for (String i : getPieces()) { loadPiece(i, pools, pieces); } int avg = 0; - for(String i : pieces) { + for (String i : pieces) { avg += getLoader().getJigsawPieceLoader().load(i).getMax2dDimension(); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisLoot.java b/src/main/java/com/volmit/iris/engine/object/IrisLoot.java index e8e81211b..15334e603 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisLoot.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisLoot.java @@ -115,29 +115,29 @@ public Material getType() { public ItemStack get(boolean debug, RNG rng) { try { ItemStack is = getItemStack(rng); - if(is == null) + if (is == null) return new ItemStack(Material.AIR); is.setItemMeta(applyProperties(is, rng, debug, null)); return applyCustomNbt(is); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); return new ItemStack(Material.AIR); } } public ItemStack get(boolean debug, boolean giveSomething, IrisLootTable table, RNG rng, int x, int y, int z) { - if(debug) { + if (debug) { chance.reset(); } - if(giveSomething || chance.aquire(() -> NoiseStyle.STATIC.create(rng)).fit(1, rarity * table.getRarity(), x, y, z) == 1) { + if (giveSomething || chance.aquire(() -> NoiseStyle.STATIC.create(rng)).fit(1, rarity * table.getRarity(), x, y, z) == 1) { try { ItemStack is = getItemStack(rng); - if(is == null) + if (is == null) return null; is.setItemMeta(applyProperties(is, rng, debug, table)); return applyCustomNbt(is); - } catch(Throwable e) { + } catch (Throwable e) { //Iris.reportError(e); e.printStackTrace(); } @@ -148,9 +148,9 @@ public ItemStack get(boolean debug, boolean giveSomething, IrisLootTable table, // TODO Better Third Party Item Acquisition private ItemStack getItemStack(RNG rng) { - if(!type.startsWith("minecraft:") && type.contains(":")) { + if (!type.startsWith("minecraft:") && type.contains(":")) { Optional opt = Iris.service(ExternalDataSVC.class).getItemStack(NamespacedKey.fromString(type)); - if(opt.isEmpty()) { + if (opt.isEmpty()) { Iris.warn("Unknown Material: " + type); return null; } @@ -163,38 +163,38 @@ private ItemStack getItemStack(RNG rng) { private ItemMeta applyProperties(ItemStack is, RNG rng, boolean debug, IrisLootTable table) { ItemMeta m = is.getItemMeta(); - if(m == null) { + if (m == null) { return null; } - for(IrisEnchantment i : getEnchantments()) { + for (IrisEnchantment i : getEnchantments()) { i.apply(rng, m); } - for(IrisAttributeModifier i : getAttributes()) { + for (IrisAttributeModifier i : getAttributes()) { i.apply(rng, m); } m.setUnbreakable(isUnbreakable()); - for(ItemFlag i : getItemFlags()) { + for (ItemFlag i : getItemFlags()) { m.addItemFlags(i); } - if(getCustomModel() != null) { + if (getCustomModel() != null) { m.setCustomModelData(getCustomModel()); } - if(is.getType().getMaxDurability() > 0 && m instanceof Damageable d) { + if (is.getType().getMaxDurability() > 0 && m instanceof Damageable d) { int max = is.getType().getMaxDurability(); d.setDamage((int) Math.round(Math.max(0, Math.min(max, (1D - rng.d(getMinDurability(), getMaxDurability())) * max)))); } - if(getLeatherColor() != null && m instanceof LeatherArmorMeta leather) { + if (getLeatherColor() != null && m instanceof LeatherArmorMeta leather) { Color c = Color.decode(getLeatherColor()); leather.setColor(org.bukkit.Color.fromRGB(c.getRed(), c.getGreen(), c.getBlue())); } - if(getDyeColor() != null && m instanceof Colorable colorable) { + if (getDyeColor() != null && m instanceof Colorable colorable) { colorable.setColor(getDyeColor()); } @@ -207,8 +207,8 @@ private ItemMeta applyProperties(ItemStack is, RNG rng, boolean debug, IrisLootT { String mf = C.translateAlternateColorCodes('&', i); - if(mf.length() > 24) { - for(String g : Form.wrapWords(mf, 24).split("\\Q\n\\E")) { + if (mf.length() > 24) { + for (String g : Form.wrapWords(mf, 24).split("\\Q\n\\E")) { lore.add(g.trim()); } } else { @@ -216,14 +216,14 @@ private ItemMeta applyProperties(ItemStack is, RNG rng, boolean debug, IrisLootT } }); - if(debug) { - if(table == null) { - if(lore.isNotEmpty()) { + if (debug) { + if (table == null) { + if (lore.isNotEmpty()) { lore.add(C.GRAY + "--------------------"); } lore.add(C.GRAY + "1 in " + (getRarity()) + " Chance (" + Form.pc(1D / (getRarity()), 5) + ")"); } else { - if(lore.isNotEmpty()) { + if (lore.isNotEmpty()) { lore.add(C.GRAY + "--------------------"); } @@ -239,7 +239,7 @@ private ItemMeta applyProperties(ItemStack is, RNG rng, boolean debug, IrisLootT private ItemStack applyCustomNbt(ItemStack stack) throws CommandSyntaxException { - if(customNbt == null || customNbt.isEmpty()) + if (customNbt == null || customNbt.isEmpty()) return stack; net.minecraft.world.item.ItemStack s = CraftItemStack.asNMSCopy(stack); CompoundTag tag = TagParser.parseTag(new JSONObject(customNbt).toString()); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisLootReference.java b/src/main/java/com/volmit/iris/engine/object/IrisLootReference.java index 7ba05cf65..55a837c94 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisLootReference.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisLootReference.java @@ -50,7 +50,7 @@ public KList getLootTables(DataProvider g) { { KList t = new KList<>(); - for(String i : tables) { + for (String i : tables) { t.add(g.getData().getLootLoader().load(i)); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java b/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java index 6f6a02360..089ec86fd 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisLootTable.java @@ -69,15 +69,15 @@ public KList getLoot(boolean debug, RNG rng, InventorySlotType slot, int m = 0; int mx = rng.i(getMinPicked(), getMaxPicked()); - while(m < mx) { + while (m < mx) { int num = rng.i(loot.size()); IrisLoot l = loot.get(num); - if(l.getSlotTypes() == slot) { + if (l.getSlotTypes() == slot) { ItemStack item = l.get(debug, false, this, rng, x, y, z); - if(item != null && item.getType() != Material.AIR) { + if (item != null && item.getType() != Material.AIR) { lootf.add(item); m++; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisMaterialPalette.java b/src/main/java/com/volmit/iris/engine/object/IrisMaterialPalette.java index 64bcbdfdc..b5d899158 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisMaterialPalette.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisMaterialPalette.java @@ -53,11 +53,11 @@ public class IrisMaterialPalette { private KList palette = new KList().qadd(new IrisBlockData("STONE")); public BlockData get(RNG rng, double x, double y, double z, IrisData rdata) { - if(getBlockData(rdata).isEmpty()) { + if (getBlockData(rdata).isEmpty()) { return null; } - if(getBlockData(rdata).size() == 1) { + if (getBlockData(rdata).size() == 1) { return getBlockData(rdata).get(0); } @@ -65,7 +65,7 @@ public BlockData get(RNG rng, double x, double y, double z, IrisData rdata) { } public Optional> getTile(RNG rng, double x, double y, double z, IrisData rdata) { - if(getBlockData(rdata).isEmpty()) + if (getBlockData(rdata).isEmpty()) return Optional.empty(); TileData tile = getBlockData(rdata).size() == 1 ? palette.get(0).tryGetTile() : palette.getRandom(rng).tryGetTile(); @@ -101,10 +101,10 @@ public KList getBlockData(IrisData rdata) { return blockData.aquire(() -> { KList blockData = new KList<>(); - for(IrisBlockData ix : palette) { + for (IrisBlockData ix : palette) { BlockData bx = ix.getBlockData(rdata); - if(bx != null) { - for(int i = 0; i < ix.getWeight(); i++) { + if (bx != null) { + for (int i = 0; i < ix.getWeight(); i++) { blockData.add(bx); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisNoiseGenerator.java b/src/main/java/com/volmit/iris/engine/object/IrisNoiseGenerator.java index 3a669eaac..f04a09028 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisNoiseGenerator.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisNoiseGenerator.java @@ -90,7 +90,7 @@ public double getMax() { } public double getNoise(long superSeed, double xv, double zv, IrisData data) { - if(!enabled) { + if (!enabled) { return offsetY; } @@ -98,8 +98,8 @@ public double getNoise(long superSeed, double xv, double zv, IrisData data) { double z = zv; int g = 33; - for(IrisNoiseGenerator i : fracture) { - if(i.isEnabled()) { + for (IrisNoiseGenerator i : fracture) { + if (i.isEnabled()) { x += i.getNoise(superSeed + seed + g, xv, zv, data) - (opacity / 2D); z -= i.getNoise(superSeed + seed + g, zv, xv, data) - (opacity / 2D); } @@ -121,7 +121,7 @@ public KList getAllComposites() { g.add(this); - for(IrisNoiseGenerator i : getFracture()) { + for (IrisNoiseGenerator i : getFracture()) { g.addAll(i.getAllComposites()); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObject.java b/src/main/java/com/volmit/iris/engine/object/IrisObject.java index b206f3b94..a503bb11a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObject.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObject.java @@ -61,7 +61,6 @@ import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiConsumer; -import java.util.function.Consumer; @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) @@ -70,7 +69,7 @@ public class IrisObject extends IrisRegistrant { protected static final BlockData AIR = B.get("CAVE_AIR"); protected static final BlockData VAIR = B.get("VOID_AIR"); protected static final BlockData VAIR_DEBUG = B.get("COBWEB"); - protected static final BlockData[] SNOW_LAYERS = new BlockData[] {B.get("minecraft:snow[layers=1]"), B.get("minecraft:snow[layers=2]"), B.get("minecraft:snow[layers=3]"), B.get("minecraft:snow[layers=4]"), B.get("minecraft:snow[layers=5]"), B.get("minecraft:snow[layers=6]"), B.get("minecraft:snow[layers=7]"), B.get("minecraft:snow[layers=8]")}; + protected static final BlockData[] SNOW_LAYERS = new BlockData[]{B.get("minecraft:snow[layers=1]"), B.get("minecraft:snow[layers=2]"), B.get("minecraft:snow[layers=3]"), B.get("minecraft:snow[layers=4]"), B.get("minecraft:snow[layers=5]"), B.get("minecraft:snow[layers=6]"), B.get("minecraft:snow[layers=7]"), B.get("minecraft:snow[layers=8]")}; protected transient final IrisLock readLock = new IrisLock("read-conclock"); @Getter @Setter @@ -115,7 +114,7 @@ public static BlockVector getCenterForSize(BlockVector size) { public static AxisAlignedBB getAABBFor(BlockVector size) { BlockVector center = new BlockVector(size.getX() / 2, size.getY() / 2, size.getZ() / 2); return new AxisAlignedBB(new IrisPosition(new BlockVector(0, 0, 0).subtract(center).toBlockVector()), - new IrisPosition(new BlockVector(size.getX() - 1, size.getY() - 1, size.getZ() - 1).subtract(center).toBlockVector())); + new IrisPosition(new BlockVector(size.getX() - 1, size.getY() - 1, size.getZ() - 1).subtract(center).toBlockVector())); } @SuppressWarnings({"resource", "RedundantSuppression"}) @@ -136,9 +135,9 @@ private static List blocksBetweenTwoPoints(Vector loc1, Vector loc2 int topBlockZ = Math.max(loc1.getBlockZ(), loc2.getBlockZ()); int bottomBlockZ = Math.min(loc1.getBlockZ(), loc2.getBlockZ()); - for(int x = bottomBlockX; x <= topBlockX; x++) { - for(int z = bottomBlockZ; z <= topBlockZ; z++) { - for(int y = bottomBlockY; y <= topBlockY; y++) { + for (int x = bottomBlockX; x <= topBlockX; x++) { + for (int z = bottomBlockZ; z <= topBlockZ; z++) { + for (int y = bottomBlockY; y <= topBlockY; y++) { locations.add(new BlockVector(x, y, z)); } } @@ -151,7 +150,7 @@ public AxisAlignedBB getAABB() { } public void ensureSmartBored(boolean debug) { - if(smartBored) { + if (smartBored) { return; } @@ -159,7 +158,7 @@ public void ensureSmartBored(boolean debug) { BlockData vair = debug ? VAIR_DEBUG : VAIR; lock.lock(); AtomicInteger applied = new AtomicInteger(); - if(getBlocks().isEmpty()) { + if (getBlocks().isEmpty()) { lock.unlock(); Iris.warn("Cannot Smart Bore " + getLoadKey() + " because it has 0 blocks in it."); smartBored = true; @@ -169,7 +168,7 @@ public void ensureSmartBored(boolean debug) { BlockVector max = new BlockVector(Double.MIN_VALUE, Double.MIN_VALUE, Double.MIN_VALUE); BlockVector min = new BlockVector(Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE); - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { max.setX(Math.max(i.getX(), max.getX())); min.setX(Math.min(i.getX(), min.getX())); max.setY(Math.max(i.getY(), max.getY())); @@ -181,25 +180,25 @@ public void ensureSmartBored(boolean debug) { BurstExecutor burst = MultiBurst.burst.burst(); // Smash X - for(int rayY = min.getBlockY(); rayY <= max.getBlockY(); rayY++) { + for (int rayY = min.getBlockY(); rayY <= max.getBlockY(); rayY++) { int finalRayY = rayY; burst.queue(() -> { - for(int rayZ = min.getBlockZ(); rayZ <= max.getBlockZ(); rayZ++) { + for (int rayZ = min.getBlockZ(); rayZ <= max.getBlockZ(); rayZ++) { int start = Integer.MAX_VALUE; int end = Integer.MIN_VALUE; - for(int ray = min.getBlockX(); ray <= max.getBlockX(); ray++) { - if(getBlocks().containsKey(new BlockVector(ray, finalRayY, rayZ))) { + for (int ray = min.getBlockX(); ray <= max.getBlockX(); ray++) { + if (getBlocks().containsKey(new BlockVector(ray, finalRayY, rayZ))) { start = Math.min(ray, start); end = Math.max(ray, end); } } - if(start != Integer.MAX_VALUE && end != Integer.MIN_VALUE) { - for(int i = start; i <= end; i++) { + if (start != Integer.MAX_VALUE && end != Integer.MIN_VALUE) { + for (int i = start; i <= end; i++) { BlockVector v = new BlockVector(i, finalRayY, rayZ); - if(!B.isAir(getBlocks().get(v))) { + if (!B.isAir(getBlocks().get(v))) { getBlocks().computeIfAbsent(v, (vv) -> vair); applied.getAndIncrement(); } @@ -210,25 +209,25 @@ public void ensureSmartBored(boolean debug) { } // Smash Y - for(int rayX = min.getBlockX(); rayX <= max.getBlockX(); rayX++) { + for (int rayX = min.getBlockX(); rayX <= max.getBlockX(); rayX++) { int finalRayX = rayX; burst.queue(() -> { - for(int rayZ = min.getBlockZ(); rayZ <= max.getBlockZ(); rayZ++) { + for (int rayZ = min.getBlockZ(); rayZ <= max.getBlockZ(); rayZ++) { int start = Integer.MAX_VALUE; int end = Integer.MIN_VALUE; - for(int ray = min.getBlockY(); ray <= max.getBlockY(); ray++) { - if(getBlocks().containsKey(new BlockVector(finalRayX, ray, rayZ))) { + for (int ray = min.getBlockY(); ray <= max.getBlockY(); ray++) { + if (getBlocks().containsKey(new BlockVector(finalRayX, ray, rayZ))) { start = Math.min(ray, start); end = Math.max(ray, end); } } - if(start != Integer.MAX_VALUE && end != Integer.MIN_VALUE) { - for(int i = start; i <= end; i++) { + if (start != Integer.MAX_VALUE && end != Integer.MIN_VALUE) { + for (int i = start; i <= end; i++) { BlockVector v = new BlockVector(finalRayX, i, rayZ); - if(!B.isAir(getBlocks().get(v))) { + if (!B.isAir(getBlocks().get(v))) { getBlocks().computeIfAbsent(v, (vv) -> vair); applied.getAndIncrement(); } @@ -239,25 +238,25 @@ public void ensureSmartBored(boolean debug) { } // Smash Z - for(int rayX = min.getBlockX(); rayX <= max.getBlockX(); rayX++) { + for (int rayX = min.getBlockX(); rayX <= max.getBlockX(); rayX++) { int finalRayX = rayX; burst.queue(() -> { - for(int rayY = min.getBlockY(); rayY <= max.getBlockY(); rayY++) { + for (int rayY = min.getBlockY(); rayY <= max.getBlockY(); rayY++) { int start = Integer.MAX_VALUE; int end = Integer.MIN_VALUE; - for(int ray = min.getBlockZ(); ray <= max.getBlockZ(); ray++) { - if(getBlocks().containsKey(new BlockVector(finalRayX, rayY, ray))) { + for (int ray = min.getBlockZ(); ray <= max.getBlockZ(); ray++) { + if (getBlocks().containsKey(new BlockVector(finalRayX, rayY, ray))) { start = Math.min(ray, start); end = Math.max(ray, end); } } - if(start != Integer.MAX_VALUE && end != Integer.MIN_VALUE) { - for(int i = start; i <= end; i++) { + if (start != Integer.MAX_VALUE && end != Integer.MIN_VALUE) { + for (int i = start; i <= end; i++) { BlockVector v = new BlockVector(finalRayX, rayY, i); - if(!B.isAir(getBlocks().get(v))) { + if (!B.isAir(getBlocks().get(v))) { getBlocks().computeIfAbsent(v, (vv) -> vair); applied.getAndIncrement(); } @@ -278,11 +277,11 @@ public synchronized IrisObject copy() { o.setLoadKey(o.getLoadKey()); o.setCenter(getCenter().clone()); - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { o.getBlocks().put(i.clone(), Objects.requireNonNull(getBlocks().get(i)).clone()); } - for(BlockVector i : getStates().keySet()) { + for (BlockVector i : getStates().keySet()) { o.getStates().put(i.clone(), Objects.requireNonNull(getStates().get(i)).clone()); } @@ -297,17 +296,17 @@ public void readLegacy(InputStream in) throws IOException { center = new BlockVector(w / 2, h / 2, d / 2); int s = din.readInt(); - for(int i = 0; i < s; i++) { + for (int i = 0; i < s; i++) { getBlocks().put(new BlockVector(din.readShort(), din.readShort(), din.readShort()), B.get(din.readUTF())); } try { int size = din.readInt(); - for(int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) { getStates().put(new BlockVector(din.readShort(), din.readShort(), din.readShort()), TileData.read(din)); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -318,7 +317,7 @@ public void read(InputStream in) throws Throwable { this.w = din.readInt(); this.h = din.readInt(); this.d = din.readInt(); - if(!din.readUTF().equals("Iris V2 IOB;")) { + if (!din.readUTF().equals("Iris V2 IOB;")) { return; } center = new BlockVector(w / 2, h / 2, d / 2); @@ -326,19 +325,19 @@ public void read(InputStream in) throws Throwable { int i; KList palette = new KList<>(); - for(i = 0; i < s; i++) { + for (i = 0; i < s; i++) { palette.add(din.readUTF()); } s = din.readInt(); - for(i = 0; i < s; i++) { + for (i = 0; i < s; i++) { getBlocks().put(new BlockVector(din.readShort(), din.readShort(), din.readShort()), B.get(palette.get(din.readShort()))); } s = din.readInt(); - for(i = 0; i < s; i++) { + for (i = 0; i < s; i++) { getStates().put(new BlockVector(din.readShort(), din.readShort(), din.readShort()), TileData.read(din)); } } @@ -351,19 +350,19 @@ public void write(OutputStream o) throws IOException { dos.writeUTF("Iris V2 IOB;"); KList palette = new KList<>(); - for(BlockData i : getBlocks().values()) { + for (BlockData i : getBlocks().values()) { palette.addIfMissing(i.getAsString()); } dos.writeShort(palette.size()); - for(String i : palette) { + for (String i : palette) { dos.writeUTF(i); } dos.writeInt(getBlocks().size()); - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { dos.writeShort(i.getBlockX()); dos.writeShort(i.getBlockY()); dos.writeShort(i.getBlockZ()); @@ -371,7 +370,7 @@ public void write(OutputStream o) throws IOException { } dos.writeInt(getStates().size()); - for(BlockVector i : getStates().keySet()) { + for (BlockVector i : getStates().keySet()) { dos.writeShort(i.getBlockX()); dos.writeShort(i.getBlockY()); dos.writeShort(i.getBlockZ()); @@ -384,7 +383,7 @@ public void read(File file) throws IOException { try { read(fin); fin.close(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); fin.close(); fin = new FileInputStream(file); @@ -394,7 +393,7 @@ public void read(File file) throws IOException { } public void write(File file) throws IOException { - if(file == null) { + if (file == null) { return; } @@ -407,7 +406,7 @@ public void shrinkwrap() { BlockVector min = new BlockVector(); BlockVector max = new BlockVector(); - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { min.setX(Math.min(min.getX(), i.getX())); min.setY(Math.min(min.getY(), i.getY())); min.setZ(Math.min(min.getZ(), i.getZ())); @@ -424,17 +423,17 @@ public void shrinkwrap() { public void clean() { KMap d = new KMap<>(); - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { d.put(new BlockVector(i.getBlockX(), i.getBlockY(), i.getBlockZ()), Objects.requireNonNull(getBlocks().get(i))); } KMap> dx = new KMap<>(); - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { d.put(new BlockVector(i.getBlockX(), i.getBlockY(), i.getBlockZ()), Objects.requireNonNull(getBlocks().get(i))); } - for(BlockVector i : getStates().keySet()) { + for (BlockVector i : getStates().keySet()) { dx.put(new BlockVector(i.getBlockX(), i.getBlockY(), i.getBlockZ()), Objects.requireNonNull(getStates().get(i))); } @@ -443,7 +442,7 @@ public void clean() { } public BlockVector getSigned(int x, int y, int z) { - if(x >= w || y >= h || z >= d) { + if (x >= w || y >= h || z >= d) { throw new RuntimeException(x + " " + y + " " + z + " exceeds limit of " + w + " " + h + " " + d); } @@ -453,7 +452,7 @@ public BlockVector getSigned(int x, int y, int z) { public void setUnsigned(int x, int y, int z, BlockData block) { BlockVector v = getSigned(x, y, z); - if(block == null) { + if (block == null) { getBlocks().remove(v); getStates().remove(v); } else { @@ -464,14 +463,14 @@ public void setUnsigned(int x, int y, int z, BlockData block) { public void setUnsigned(int x, int y, int z, Block block) { BlockVector v = getSigned(x, y, z); - if(block == null) { + if (block == null) { getBlocks().remove(v); getStates().remove(v); } else { BlockData data = block.getBlockData(); getBlocks().put(v, data); TileData state = TileData.getTileState(block); - if(state != null) { + if (state != null) { Iris.info("Saved State " + v); getStates().put(v, state); } @@ -497,7 +496,7 @@ public int place(Location loc, IObjectPlacer placer, IrisObjectPlacement config, public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacement config, RNG rng, BiConsumer listener, CarveResult c, IrisData rdata) { IObjectPlacer placer = (config.getHeightmap() != null) ? new HeightmapObjectPlacer(oplacer.getEngine() == null ? IrisContext.get().getEngine() : oplacer.getEngine(), rng, x, yv, z, config, oplacer) : oplacer; - if(config.isSmartBore()) { + if (config.isSmartBore()) { ensureSmartBored(placer.isDebugSmartBore()); } @@ -517,13 +516,13 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen yrand = yrand > 0 ? rng.i(0, yrand) : yrand < 0 ? rng.i(yrand, 0) : yrand; boolean bail = false; - if(yv < 0) { - if(config.getMode().equals(ObjectPlaceMode.CENTER_HEIGHT) || config.getMode() == ObjectPlaceMode.CENTER_STILT) { + if (yv < 0) { + if (config.getMode().equals(ObjectPlaceMode.CENTER_HEIGHT) || config.getMode() == ObjectPlaceMode.CENTER_STILT) { y = (c != null ? c.getSurface() : placer.getHighest(x, z, getLoader(), config.isUnderwater())) + rty; - if(placer.isCarved(x, y, z) || placer.isCarved(x, y - 1, z) || placer.isCarved(x, y - 2, z) || placer.isCarved(x, y - 3, z)) { + if (placer.isCarved(x, y, z) || placer.isCarved(x, y - 1, z) || placer.isCarved(x, y - 2, z) || placer.isCarved(x, y - 3, z)) { bail = true; } - } else if(config.getMode().equals(ObjectPlaceMode.MAX_HEIGHT) || config.getMode().equals(ObjectPlaceMode.STILT)) { + } else if (config.getMode().equals(ObjectPlaceMode.MAX_HEIGHT) || config.getMode().equals(ObjectPlaceMode.STILT)) { BlockVector offset = new BlockVector(config.getTranslate().getX(), config.getTranslate().getY(), config.getTranslate().getZ()); BlockVector rotatedDimensions = config.getRotation().rotate(new BlockVector(getW(), getH(), getD()), spinx, spiny, spinz).clone(); int xLength = (rotatedDimensions.getBlockX() / 2) + offset.getBlockX(); @@ -532,18 +531,18 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen int zLength = (rotatedDimensions.getBlockZ() / 2) + offset.getBlockZ(); int minZ = Math.min(z - zLength, z + zLength); int maxZ = Math.max(z - zLength, z + zLength); - for(int i = minX; i <= maxX; i++) { - for(int ii = minZ; ii <= maxZ; ii++) { + for (int i = minX; i <= maxX; i++) { + for (int ii = minZ; ii <= maxZ; ii++) { int h = placer.getHighest(i, ii, getLoader(), config.isUnderwater()) + rty; - if(placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { + if (placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { bail = true; break; } - if(h > y) + if (h > y) y = h; } } - } else if(config.getMode().equals(ObjectPlaceMode.FAST_MAX_HEIGHT) || config.getMode().equals(ObjectPlaceMode.FAST_STILT)) { + } else if (config.getMode().equals(ObjectPlaceMode.FAST_MAX_HEIGHT) || config.getMode().equals(ObjectPlaceMode.FAST_STILT)) { BlockVector offset = new BlockVector(config.getTranslate().getX(), config.getTranslate().getY(), config.getTranslate().getZ()); BlockVector rotatedDimensions = config.getRotation().rotate(new BlockVector(getW(), getH(), getD()), spinx, spiny, spinz).clone(); @@ -556,18 +555,18 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen int minZ = Math.min(z - zLength, z + zLength); int maxZ = Math.max(z - zLength, z + zLength); - for(int i = minX; i <= maxX; i += Math.abs(xRadius) + 1) { - for(int ii = minZ; ii <= maxZ; ii += Math.abs(zRadius) + 1) { + for (int i = minX; i <= maxX; i += Math.abs(xRadius) + 1) { + for (int ii = minZ; ii <= maxZ; ii += Math.abs(zRadius) + 1) { int h = placer.getHighest(i, ii, getLoader(), config.isUnderwater()) + rty; - if(placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { + if (placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { bail = true; break; } - if(h > y) + if (h > y) y = h; } } - } else if(config.getMode().equals(ObjectPlaceMode.MIN_HEIGHT) || config.getMode() == ObjectPlaceMode.MIN_STILT) { + } else if (config.getMode().equals(ObjectPlaceMode.MIN_HEIGHT) || config.getMode() == ObjectPlaceMode.MIN_STILT) { y = rdata.getEngine().getHeight() + 1; BlockVector offset = new BlockVector(config.getTranslate().getX(), config.getTranslate().getY(), config.getTranslate().getZ()); BlockVector rotatedDimensions = config.getRotation().rotate(new BlockVector(getW(), getH(), getD()), spinx, spiny, spinz).clone(); @@ -578,19 +577,19 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen int zLength = (rotatedDimensions.getBlockZ() / 2) + offset.getBlockZ(); int minZ = Math.min(z - zLength, z + zLength); int maxZ = Math.max(z - zLength, z + zLength); - for(int i = minX; i <= maxX; i++) { - for(int ii = minZ; ii <= maxZ; ii++) { + for (int i = minX; i <= maxX; i++) { + for (int ii = minZ; ii <= maxZ; ii++) { int h = placer.getHighest(i, ii, getLoader(), config.isUnderwater()) + rty; - if(placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { + if (placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { bail = true; break; } - if(h < y) { + if (h < y) { y = h; } } } - } else if(config.getMode().equals(ObjectPlaceMode.FAST_MIN_HEIGHT) || config.getMode() == ObjectPlaceMode.FAST_MIN_STILT) { + } else if (config.getMode().equals(ObjectPlaceMode.FAST_MIN_HEIGHT) || config.getMode() == ObjectPlaceMode.FAST_MIN_STILT) { y = rdata.getEngine().getHeight() + 1; BlockVector offset = new BlockVector(config.getTranslate().getX(), config.getTranslate().getY(), config.getTranslate().getZ()); BlockVector rotatedDimensions = config.getRotation().rotate(new BlockVector(getW(), getH(), getD()), spinx, spiny, spinz).clone(); @@ -604,63 +603,63 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen int minZ = Math.min(z - zLength, z + zLength); int maxZ = Math.max(z - zLength, z + zLength); - for(int i = minX; i <= maxX; i += Math.abs(xRadius) + 1) { - for(int ii = minZ; ii <= maxZ; ii += Math.abs(zRadius) + 1) { + for (int i = minX; i <= maxX; i += Math.abs(xRadius) + 1) { + for (int ii = minZ; ii <= maxZ; ii += Math.abs(zRadius) + 1) { int h = placer.getHighest(i, ii, getLoader(), config.isUnderwater()) + rty; - if(placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { + if (placer.isCarved(i, h, ii) || placer.isCarved(i, h - 1, ii) || placer.isCarved(i, h - 2, ii) || placer.isCarved(i, h - 3, ii)) { bail = true; break; } - if(h < y) { + if (h < y) { y = h; } } } - } else if(config.getMode().equals(ObjectPlaceMode.PAINT)) { + } else if (config.getMode().equals(ObjectPlaceMode.PAINT)) { y = placer.getHighest(x, z, getLoader(), config.isUnderwater()) + rty; - if(placer.isCarved(x, y, z) || placer.isCarved(x, y - 1, z) || placer.isCarved(x, y - 2, z) || placer.isCarved(x, y - 3, z)) { + if (placer.isCarved(x, y, z) || placer.isCarved(x, y - 1, z) || placer.isCarved(x, y - 2, z) || placer.isCarved(x, y - 3, z)) { bail = true; } } } else { y = yv; - if(placer.isCarved(x, y, z) || placer.isCarved(x, y - 1, z) || placer.isCarved(x, y - 2, z) || placer.isCarved(x, y - 3, z)) { + if (placer.isCarved(x, y, z) || placer.isCarved(x, y - 1, z) || placer.isCarved(x, y - 2, z) || placer.isCarved(x, y - 3, z)) { bail = true; } } - if(yv >= 0 && config.isBottom()) { + if (yv >= 0 && config.isBottom()) { y += Math.floorDiv(h, 2); bail = placer.isCarved(x, y, z) || placer.isCarved(x, y - 1, z) || placer.isCarved(x, y - 2, z) || placer.isCarved(x, y - 3, z); } - if(bail) { + if (bail) { return -1; } - if(yv < 0) { - if(!config.isUnderwater() && !config.isOnwater() && placer.isUnderwater(x, z)) { + if (yv < 0) { + if (!config.isUnderwater() && !config.isOnwater() && placer.isUnderwater(x, z)) { return -1; } } - if(c != null && Math.max(0, h + yrand + ty) + 1 >= c.getHeight()) { + if (c != null && Math.max(0, h + yrand + ty) + 1 >= c.getHeight()) { return -1; } - if(config.isUnderwater() && y + rty + ty >= placer.getFluidHeight()) { + if (config.isUnderwater() && y + rty + ty >= placer.getFluidHeight()) { return -1; } - if(!config.getClamp().canPlace(y + rty + ty, y - rty + ty)) { + if (!config.getClamp().canPlace(y + rty + ty, y - rty + ty)) { return -1; } - if(config.isBore()) { + if (config.isBore()) { BlockVector offset = new BlockVector(config.getTranslate().getX(), config.getTranslate().getY(), config.getTranslate().getZ()); - for(int i = x - Math.floorDiv(w, 2) + (int) offset.getX(); i <= x + Math.floorDiv(w, 2) - (w % 2 == 0 ? 1 : 0) + (int) offset.getX(); i++) { - for(int j = y - Math.floorDiv(h, 2) - config.getBoreExtendMinY() + (int) offset.getY(); j <= y + Math.floorDiv(h, 2) + config.getBoreExtendMaxY() - (h % 2 == 0 ? 1 : 0) + (int) offset.getY(); j++) { - for(int k = z - Math.floorDiv(d, 2) + (int) offset.getZ(); k <= z + Math.floorDiv(d, 2) - (d % 2 == 0 ? 1 : 0) + (int) offset.getX(); k++) { + for (int i = x - Math.floorDiv(w, 2) + (int) offset.getX(); i <= x + Math.floorDiv(w, 2) - (w % 2 == 0 ? 1 : 0) + (int) offset.getX(); i++) { + for (int j = y - Math.floorDiv(h, 2) - config.getBoreExtendMinY() + (int) offset.getY(); j <= y + Math.floorDiv(h, 2) + config.getBoreExtendMaxY() - (h % 2 == 0 ? 1 : 0) + (int) offset.getY(); j++) { + for (int k = z - Math.floorDiv(d, 2) + (int) offset.getZ(); k <= z + Math.floorDiv(d, 2) - (d % 2 == 0 ? 1 : 0) + (int) offset.getX(); k++) { placer.set(i, j, k, AIR); } } @@ -674,34 +673,34 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen KMap markers = null; try { - if(config.getMarkers().isNotEmpty() && placer.getEngine() != null) { + if (config.getMarkers().isNotEmpty() && placer.getEngine() != null) { markers = new KMap<>(); - for(IrisObjectMarker j : config.getMarkers()) { + for (IrisObjectMarker j : config.getMarkers()) { IrisMarker marker = getLoader().getMarkerLoader().load(j.getMarker()); - if(marker == null) { + if (marker == null) { continue; } int max = j.getMaximumMarkers(); - for(BlockVector i : getBlocks().k().shuffle()) { - if(max <= 0) { + for (BlockVector i : getBlocks().k().shuffle()) { + if (max <= 0) { break; } BlockData data = getBlocks().get(i); - for(BlockData k : j.getMark(rdata)) { - if(max <= 0) { + for (BlockData k : j.getMark(rdata)) { + if (max <= 0) { break; } - if(j.isExact() ? k.matches(data) : k.getMaterial().equals(data.getMaterial())) { + if (j.isExact() ? k.matches(data) : k.getMaterial().equals(data.getMaterial())) { boolean a = !blocks.containsKey(new BlockVector(i.clone().add(new BlockVector(0, 1, 0)))); boolean fff = !blocks.containsKey(new BlockVector(i.clone().add(new BlockVector(0, 2, 0)))); - if(!marker.isEmptyAbove() || (a && fff)) { + if (!marker.isEmptyAbove() || (a && fff)) { markers.put(i, j.getMarker()); max--; } @@ -711,20 +710,20 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen } } - for(BlockVector g : getBlocks().keySet()) { + for (BlockVector g : getBlocks().keySet()) { BlockData d; TileData tile = null; try { d = getBlocks().get(g); tile = getStates().get(g); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Failed to read block node " + g.getBlockX() + "," + g.getBlockY() + "," + g.getBlockZ() + " in object " + getLoadKey() + " (cme)"); d = AIR; } - if(d == null) { + if (d == null) { Iris.warn("Failed to read block node " + g.getBlockX() + "," + g.getBlockY() + "," + g.getBlockZ() + " in object " + getLoadKey() + " (null)"); d = AIR; } @@ -734,28 +733,28 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen i = config.getRotation().rotate(i.clone(), spinx, spiny, spinz).clone(); i = config.getTranslate().translate(i.clone(), config.getRotation(), spinx, spiny, spinz).clone(); - if(stilting && i.getBlockY() < lowest && !B.isAir(data)) { + if (stilting && i.getBlockY() < lowest && !B.isAir(data)) { lowest = i.getBlockY(); } - if(placer.isPreventingDecay() && (data) instanceof Leaves && !((Leaves) (data)).isPersistent()) { + if (placer.isPreventingDecay() && (data) instanceof Leaves && !((Leaves) (data)).isPersistent()) { ((Leaves) data).setPersistent(true); } - for(IrisObjectReplace j : config.getEdit()) { - if(rng.chance(j.getChance())) { - for(BlockData k : j.getFind(rdata)) { - if(j.isExact() ? k.matches(data) : k.getMaterial().equals(data.getMaterial())) { + for (IrisObjectReplace j : config.getEdit()) { + if (rng.chance(j.getChance())) { + for (BlockData k : j.getFind(rdata)) { + if (j.isExact() ? k.matches(data) : k.getMaterial().equals(data.getMaterial())) { BlockData newData = j.getReplace(rng, i.getX() + x, i.getY() + y, i.getZ() + z, rdata).clone(); - if(newData.getMaterial() == data.getMaterial()) + if (newData.getMaterial() == data.getMaterial()) data = data.merge(newData); else data = newData; - if(newData.getMaterial() == Material.SPAWNER) { + if (newData.getMaterial() == Material.SPAWNER) { Optional> t = j.getReplace().getTile(rng, x, y, z, rdata); - if(t.isPresent()) { + if (t.isPresent()) { tile = t.get(); } } @@ -770,84 +769,84 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen int yy = y + (int) Math.round(i.getY()); zz = z + (int) Math.round(i.getZ()); - if(warped) { + if (warped) { xx += config.warp(rng, i.getX() + x, i.getY() + y, i.getZ() + z, getLoader()); zz += config.warp(rng, i.getZ() + z, i.getY() + y, i.getX() + x, getLoader()); } - if(yv < 0 && (config.getMode().equals(ObjectPlaceMode.PAINT)) && !B.isVineBlock(data)) { + if (yv < 0 && (config.getMode().equals(ObjectPlaceMode.PAINT)) && !B.isVineBlock(data)) { yy = (int) Math.round(i.getY()) + Math.floorDiv(h, 2) + placer.getHighest(xx, zz, getLoader(), config.isUnderwater()); } - if(heightmap != null) { + if (heightmap != null) { Position2 pos = new Position2(xx, zz); - if(!heightmap.containsKey(pos)) { + if (!heightmap.containsKey(pos)) { heightmap.put(pos, yy); } - if(heightmap.get(pos) < yy) { + if (heightmap.get(pos) < yy) { heightmap.put(pos, yy); } } - if(config.isMeld() && !placer.isSolid(xx, yy, zz)) { + if (config.isMeld() && !placer.isSolid(xx, yy, zz)) { continue; } - if((config.isWaterloggable() || config.isUnderwater()) && yy <= placer.getFluidHeight() && data instanceof Waterlogged) { + if ((config.isWaterloggable() || config.isUnderwater()) && yy <= placer.getFluidHeight() && data instanceof Waterlogged) { // TODO Here ((Waterlogged) data).setWaterlogged(true); } - if(B.isVineBlock(data)) { - MultipleFacing f = (MultipleFacing)data; - for(BlockFace face : f.getAllowedFaces()) { + if (B.isVineBlock(data)) { + MultipleFacing f = (MultipleFacing) data; + for (BlockFace face : f.getAllowedFaces()) { BlockData facingBlock = placer.get(xx + face.getModX(), yy + face.getModY(), zz + face.getModZ()); - if(B.isSolid(facingBlock) && !B.isVineBlock(facingBlock)) { + if (B.isSolid(facingBlock) && !B.isVineBlock(facingBlock)) { f.setFace(face, true); } } } - if(listener != null) { + if (listener != null) { listener.accept(new BlockPosition(xx, yy, zz), data); } - if(markers != null && markers.containsKey(g)) { + if (markers != null && markers.containsKey(g)) { placer.getEngine().getMantle().getMantle().set(xx, yy, zz, new MatterMarker(markers.get(g))); } boolean wouldReplace = B.isSolid(placer.get(xx, yy, zz)) && B.isVineBlock(data); - if(!data.getMaterial().equals(Material.AIR) && !data.getMaterial().equals(Material.CAVE_AIR) && !wouldReplace) { + if (!data.getMaterial().equals(Material.AIR) && !data.getMaterial().equals(Material.CAVE_AIR) && !wouldReplace) { placer.set(xx, yy, zz, data); - if(tile != null) { + if (tile != null) { placer.setTile(xx, yy, zz, tile); } } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } readLock.unlock(); - if(stilting) { + if (stilting) { readLock.lock(); IrisStiltSettings settings = config.getStiltSettings(); - for(BlockVector g : getBlocks().keySet()) { + for (BlockVector g : getBlocks().keySet()) { BlockData d; - if(settings == null || settings.getPalette() == null) { + if (settings == null || settings.getPalette() == null) { try { d = getBlocks().get(g); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.warn("Failed to read block node " + g.getBlockX() + "," + g.getBlockY() + "," + g.getBlockZ() + " in object " + getLoadKey() + " (stilt cme)"); d = AIR; } - if(d == null) { + if (d == null) { Iris.warn("Failed to read block node " + g.getBlockX() + "," + g.getBlockY() + "," + g.getBlockZ() + " in object " + getLoadKey() + " (stilt null)"); d = AIR; } @@ -860,16 +859,16 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen i = config.getTranslate().translate(i.clone(), config.getRotation(), spinx, spiny, spinz).clone(); d = config.getRotation().rotate(d, spinx, spiny, spinz); - if(i.getBlockY() != lowest) + if (i.getBlockY() != lowest) continue; - for(IrisObjectReplace j : config.getEdit()) { - if(rng.chance(j.getChance())) { - for(BlockData k : j.getFind(rdata)) { - if(j.isExact() ? k.matches(d) : k.getMaterial().equals(d.getMaterial())) { + for (IrisObjectReplace j : config.getEdit()) { + if (rng.chance(j.getChance())) { + for (BlockData k : j.getFind(rdata)) { + if (j.isExact() ? k.matches(d) : k.getMaterial().equals(d.getMaterial())) { BlockData newData = j.getReplace(rng, i.getX() + x, i.getY() + y, i.getZ() + z, rdata).clone(); - if(newData.getMaterial() == d.getMaterial()) { + if (newData.getMaterial() == d.getMaterial()) { d = d.merge(newData); } else { d = newData; @@ -879,37 +878,37 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen } } - if(d == null || B.isAir(d)) + if (d == null || B.isAir(d)) continue; xx = x + (int) Math.round(i.getX()); zz = z + (int) Math.round(i.getZ()); - if(warped) { + if (warped) { xx += config.warp(rng, i.getX() + x, i.getY() + y, i.getZ() + z, getLoader()); zz += config.warp(rng, i.getZ() + z, i.getY() + y, i.getX() + x, getLoader()); } int highest = placer.getHighest(xx, zz, getLoader(), true); - if((config.isWaterloggable() || config.isUnderwater()) && highest <= placer.getFluidHeight() && d instanceof Waterlogged) + if ((config.isWaterloggable() || config.isUnderwater()) && highest <= placer.getFluidHeight() && d instanceof Waterlogged) ((Waterlogged) d).setWaterlogged(true); - if(yv >= 0 && config.isBottom()) + if (yv >= 0 && config.isBottom()) y += Math.floorDiv(h, 2); int lowerBound = highest - 1; - if(settings != null) { + if (settings != null) { lowerBound -= config.getStiltSettings().getOverStilt() - rng.i(0, config.getStiltSettings().getYRand()); - if(settings.getYMax() != 0) + if (settings.getYMax() != 0) lowerBound -= Math.min(config.getStiltSettings().getYMax() - (lowest + y - highest), 0); } - for(int j = lowest + y; j > lowerBound; j--) { - if(B.isVineBlock(d)) { - MultipleFacing f = (MultipleFacing)d; - for(BlockFace face : f.getAllowedFaces()) { + for (int j = lowest + y; j > lowerBound; j--) { + if (B.isVineBlock(d)) { + MultipleFacing f = (MultipleFacing) d; + for (BlockFace face : f.getAllowedFaces()) { BlockData facingBlock = placer.get(xx + face.getModX(), j + face.getModY(), zz + face.getModZ()); - if(B.isSolid(facingBlock) && !B.isVineBlock(facingBlock)) { + if (B.isSolid(facingBlock) && !B.isVineBlock(facingBlock)) { f.setFace(face, true); } } @@ -922,15 +921,15 @@ public int place(int x, int yv, int z, IObjectPlacer oplacer, IrisObjectPlacemen readLock.unlock(); } - if(heightmap != null) { + if (heightmap != null) { RNG rngx = rng.nextParallelRNG(3468854); - for(Position2 i : heightmap.k()) { + for (Position2 i : heightmap.k()) { int vx = i.getX(); int vy = heightmap.get(i); int vz = i.getZ(); - if(config.getSnow() > 0) { + if (config.getSnow() > 0) { int height = rngx.i(0, (int) (config.getSnow() * 7)); placer.set(vx, vy + 1, vz, SNOW_LAYERS[Math.max(Math.min(height, 7), 0)]); } @@ -949,14 +948,14 @@ public IrisObject rotateCopy(IrisObjectRotation rt) { public void rotate(IrisObjectRotation r, int spinx, int spiny, int spinz) { KMap d = new KMap<>(); - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { d.put(r.rotate(i.clone(), spinx, spiny, spinz), r.rotate(getBlocks().get(i).clone(), - spinx, spiny, spinz)); + spinx, spiny, spinz)); } KMap> dx = new KMap<>(); - for(BlockVector i : getStates().keySet()) { + for (BlockVector i : getStates().keySet()) { dx.put(r.rotate(i.clone(), spinx, spiny, spinz), getStates().get(i)); } @@ -965,11 +964,11 @@ public void rotate(IrisObjectRotation r, int spinx, int spiny, int spinz) { } public void place(Location at) { - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { Block b = at.clone().add(0, getCenter().getY(), 0).add(i).getBlock(); b.setBlockData(Objects.requireNonNull(getBlocks().get(i)), false); - if(getStates().containsKey(i)) { + if (getStates().containsKey(i)) { Iris.info(Objects.requireNonNull(states.get(i)).toString()); BlockState st = b.getState(); Objects.requireNonNull(getStates().get(i)).toBukkitTry(st); @@ -979,11 +978,11 @@ public void place(Location at) { } public void placeCenterY(Location at) { - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { Block b = at.clone().add(getCenter().getX(), getCenter().getY(), getCenter().getZ()).add(i).getBlock(); b.setBlockData(Objects.requireNonNull(getBlocks().get(i)), false); - if(getStates().containsKey(i)) { + if (getStates().containsKey(i)) { Objects.requireNonNull(getStates().get(i)).toBukkitTry(b.getState()); } } @@ -998,7 +997,7 @@ public synchronized KMap> getStates() } public void unplaceCenterY(Location at) { - for(BlockVector i : getBlocks().keySet()) { + for (BlockVector i : getBlocks().keySet()) { at.clone().add(getCenter().getX(), getCenter().getY(), getCenter().getZ()).add(i).getBlock().setBlockData(AIR, false); } } @@ -1006,7 +1005,7 @@ public void unplaceCenterY(Location at) { public IrisObject scaled(double scale, IrisObjectPlacementScaleInterpolator interpolation) { Vector sm1 = new Vector(scale - 1, scale - 1, scale - 1); scale = Math.max(0.001, Math.min(50, scale)); - if(scale < 1) { + if (scale < 1) { scale = scale - 0.0001; } @@ -1015,28 +1014,28 @@ public IrisObject scaled(double scale, IrisObjectPlacementScaleInterpolator inte @SuppressWarnings({"unchecked", "rawtypes"}) HashMap placeBlock = new HashMap(); Vector center = getCenter(); - if(getH() == 2) { + if (getH() == 2) { center = center.setY(center.getBlockY() + 0.5); } - if(getW() == 2) { + if (getW() == 2) { center = center.setX(center.getBlockX() + 0.5); } - if(getD() == 2) { + if (getD() == 2) { center = center.setZ(center.getBlockZ() + 0.5); } IrisObject oo = new IrisObject((int) Math.ceil((w * scale) + (scale * 2)), (int) Math.ceil((h * scale) + (scale * 2)), (int) Math.ceil((d * scale) + (scale * 2))); - for(Map.Entry entry : blocks.entrySet()) { + for (Map.Entry entry : blocks.entrySet()) { BlockData bd = entry.getValue(); placeBlock.put(entry.getKey().clone().add(HALF).subtract(center) - .multiply(scale).add(sm1).toBlockVector(), bd); + .multiply(scale).add(sm1).toBlockVector(), bd); } - for(Map.Entry entry : placeBlock.entrySet()) { + for (Map.Entry entry : placeBlock.entrySet()) { BlockVector v = entry.getKey(); - if(scale > 1) { - for(BlockVector vec : blocksBetweenTwoPoints(v.clone().add(center), v.clone().add(center).add(sm1))) { + if (scale > 1) { + for (BlockVector vec : blocksBetweenTwoPoints(v.clone().add(center), v.clone().add(center).add(sm1))) { oo.getBlocks().put(vec, entry.getValue()); } } else { @@ -1044,8 +1043,8 @@ public IrisObject scaled(double scale, IrisObjectPlacementScaleInterpolator inte } } - if(scale > 1) { - switch(interpolation) { + if (scale > 1) { + switch (interpolation) { case TRILINEAR -> oo.trilinear((int) Math.round(scale)); case TRICUBIC -> oo.tricubic((int) Math.round(scale)); case TRIHERMITE -> oo.trihermite((int) Math.round(scale)); @@ -1061,13 +1060,13 @@ public void trilinear(int rad) { BlockVector min = getAABB().minbv(); BlockVector max = getAABB().maxbv(); - for(int x = min.getBlockX(); x <= max.getBlockX(); x++) { - for(int y = min.getBlockY(); y <= max.getBlockY(); y++) { - for(int z = min.getBlockZ(); z <= max.getBlockZ(); z++) { - if(IrisInterpolation.getTrilinear(x, y, z, rad, (xx, yy, zz) -> { + for (int x = min.getBlockX(); x <= max.getBlockX(); x++) { + for (int y = min.getBlockY(); y <= max.getBlockY(); y++) { + for (int z = min.getBlockZ(); z <= max.getBlockZ(); z++) { + if (IrisInterpolation.getTrilinear(x, y, z, rad, (xx, yy, zz) -> { BlockData data = v.get(new BlockVector((int) xx, (int) yy, (int) zz)); - if(data == null || data.getMaterial().isAir()) { + if (data == null || data.getMaterial().isAir()) { return 0; } @@ -1090,13 +1089,13 @@ public void tricubic(int rad) { BlockVector min = getAABB().minbv(); BlockVector max = getAABB().maxbv(); - for(int x = min.getBlockX(); x <= max.getBlockX(); x++) { - for(int y = min.getBlockY(); y <= max.getBlockY(); y++) { - for(int z = min.getBlockZ(); z <= max.getBlockZ(); z++) { - if(IrisInterpolation.getTricubic(x, y, z, rad, (xx, yy, zz) -> { + for (int x = min.getBlockX(); x <= max.getBlockX(); x++) { + for (int y = min.getBlockY(); y <= max.getBlockY(); y++) { + for (int z = min.getBlockZ(); z <= max.getBlockZ(); z++) { + if (IrisInterpolation.getTricubic(x, y, z, rad, (xx, yy, zz) -> { BlockData data = v.get(new BlockVector((int) xx, (int) yy, (int) zz)); - if(data == null || data.getMaterial().isAir()) { + if (data == null || data.getMaterial().isAir()) { return 0; } @@ -1123,13 +1122,13 @@ public void trihermite(int rad, double tension, double bias) { BlockVector min = getAABB().minbv(); BlockVector max = getAABB().maxbv(); - for(int x = min.getBlockX(); x <= max.getBlockX(); x++) { - for(int y = min.getBlockY(); y <= max.getBlockY(); y++) { - for(int z = min.getBlockZ(); z <= max.getBlockZ(); z++) { - if(IrisInterpolation.getTrihermite(x, y, z, rad, (xx, yy, zz) -> { + for (int x = min.getBlockX(); x <= max.getBlockX(); x++) { + for (int y = min.getBlockY(); y <= max.getBlockY(); y++) { + for (int z = min.getBlockZ(); z <= max.getBlockZ(); z++) { + if (IrisInterpolation.getTrihermite(x, y, z, rad, (xx, yy, zz) -> { BlockData data = v.get(new BlockVector((int) xx, (int) yy, (int) zz)); - if(data == null || data.getMaterial().isAir()) { + if (data == null || data.getMaterial().isAir()) { return 0; } @@ -1150,22 +1149,22 @@ private BlockData nearestBlockData(int x, int y, int z) { BlockVector vv = new BlockVector(x, y, z); BlockData r = getBlocks().get(vv); - if(r != null && !r.getMaterial().isAir()) { + if (r != null && !r.getMaterial().isAir()) { return r; } double d = Double.MAX_VALUE; - for(Map.Entry entry : blocks.entrySet()) { + for (Map.Entry entry : blocks.entrySet()) { BlockData dat = entry.getValue(); - if(dat.getMaterial().isAir()) { + if (dat.getMaterial().isAir()) { continue; } double dx = entry.getKey().distanceSquared(vv); - if(dx < d) { + if (dx < d) { d = dx; r = dat; } @@ -1189,5 +1188,6 @@ public String getTypeName() { } @Override - public void scanForErrors(JSONObject p, VolmitSender sender) { } + public void scanForErrors(JSONObject p, VolmitSender sender) { + } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObjectLoot.java b/src/main/java/com/volmit/iris/engine/object/IrisObjectLoot.java index 1b95d28e4..eb3781a4d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObjectLoot.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObjectLoot.java @@ -53,10 +53,10 @@ public KList getFilter(IrisData rdata) { { KList b = new KList<>(); - for(IrisBlockData i : filter) { + for (IrisBlockData i : filter) { BlockData bx = i.getBlockData(rdata); - if(bx != null) { + if (bx != null) { b.add(bx); } } @@ -66,8 +66,8 @@ public KList getFilter(IrisData rdata) { } public boolean matchesFilter(IrisData manager, BlockData data) { - for(BlockData filterData : getFilter(manager)) { - if(filterData.matches(data)) return true; + for (BlockData filterData : getFilter(manager)) { + if (filterData.matches(data)) return true; } return false; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObjectMarker.java b/src/main/java/com/volmit/iris/engine/object/IrisObjectMarker.java index 667854494..7c870dd70 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObjectMarker.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObjectMarker.java @@ -35,35 +35,31 @@ @Desc("Find blocks to mark") @Data public class IrisObjectMarker { + private final transient AtomicCache> findData = new AtomicCache<>(); @ArrayType(min = 1, type = IrisBlockData.class) @Required @Desc("Find block types to mark") private KList mark = new KList<>(); - @MinNumber(1) @MaxNumber(16) @Desc("The maximum amount of markers to place. Use these sparingly!") private int maximumMarkers = 8; - @Desc("If true, markers will only be placed if the block matches the mark list perfectly.") private boolean exact = false; - @Required @RegistryListResource(IrisMarker.class) @Desc("The marker to add") private String marker; - private final transient AtomicCache> findData = new AtomicCache<>(); - public KList getMark(IrisData rdata) { return findData.aquire(() -> { KList b = new KList<>(); - for(IrisBlockData i : mark) { + for (IrisBlockData i : mark) { BlockData bx = i.getBlockData(rdata); - if(bx != null) { + if (bx != null) { b.add(bx); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObjectPlacement.java b/src/main/java/com/volmit/iris/engine/object/IrisObjectPlacement.java index 547580103..b39c076b9 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObjectPlacement.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObjectPlacement.java @@ -154,7 +154,7 @@ public IrisObjectPlacement toPlacement(String... place) { public CNG getSurfaceWarp(RNG rng, IrisData data) { return surfaceWarp.aquire(() -> - getWarp().create(rng, data)); + getWarp().create(rng, data)); } public double warp(RNG rng, double x, double y, double z, IrisData data) { @@ -162,7 +162,7 @@ public double warp(RNG rng, double x, double y, double z, IrisData data) { } public IrisObject getObject(DataProvider g, RNG random) { - if(place.isEmpty()) { + if (place.isEmpty()) { return null; } @@ -170,8 +170,8 @@ public IrisObject getObject(DataProvider g, RNG random) { } public boolean matches(IrisTreeSize size, TreeType type) { - for(IrisTree i : getTrees()) { - if(i.matches(size, type)) { + for (IrisTree i : getTrees()) { + if (i.matches(size, type)) { return true; } } @@ -180,14 +180,14 @@ public boolean matches(IrisTreeSize size, TreeType type) { } public int getDensity() { - if(densityStyle == null) { + if (densityStyle == null) { return density; } return densityStyle.getMid(); } public int getDensity(RNG rng, double x, double z, IrisData data) { - if(densityStyle == null) { + if (densityStyle == null) { return density; } @@ -198,22 +198,22 @@ private TableCache getCache(IrisData manager) { return cache.aquire(() -> { TableCache tc = new TableCache(); - for(IrisObjectLoot loot : getLoot()) { - if(loot == null) + for (IrisObjectLoot loot : getLoot()) { + if (loot == null) continue; IrisLootTable table = manager.getLootLoader().load(loot.getName()); - if(table == null) { + if (table == null) { Iris.warn("Couldn't find loot table " + loot.getName()); continue; } - if(loot.getFilter().isEmpty()) //Table applies to all containers + if (loot.getFilter().isEmpty()) //Table applies to all containers { tc.global.put(table, loot.getWeight()); - } else if(!loot.isExact()) //Table is meant to be by type + } else if (!loot.isExact()) //Table is meant to be by type { - for(BlockData filterData : loot.getFilter(manager)) { - if(!tc.basic.containsKey(filterData.getMaterial())) { + for (BlockData filterData : loot.getFilter(manager)) { + if (!tc.basic.containsKey(filterData.getMaterial())) { tc.basic.put(filterData.getMaterial(), new WeightedRandom<>()); } @@ -221,12 +221,12 @@ private TableCache getCache(IrisData manager) { } } else //Filter is exact { - for(BlockData filterData : loot.getFilter(manager)) { - if(!tc.exact.containsKey(filterData.getMaterial())) { + for (BlockData filterData : loot.getFilter(manager)) { + if (!tc.exact.containsKey(filterData.getMaterial())) { tc.exact.put(filterData.getMaterial(), new KMap<>()); } - if(!tc.exact.get(filterData.getMaterial()).containsKey(filterData)) { + if (!tc.exact.get(filterData.getMaterial()).containsKey(filterData)) { tc.exact.get(filterData.getMaterial()).put(filterData, new WeightedRandom<>()); } @@ -241,22 +241,20 @@ private TableCache getCache(IrisData manager) { /** * Gets the loot table that should be used for the block * - * @param data - * The block data of the block - * @param dataManager - * Iris Data Manager + * @param data The block data of the block + * @param dataManager Iris Data Manager * @return The loot table it should use. */ public IrisLootTable getTable(BlockData data, IrisData dataManager) { TableCache cache = getCache(dataManager); - if(B.isStorageChest(data)) { + if (B.isStorageChest(data)) { IrisLootTable picked = null; - if(cache.exact.containsKey(data.getMaterial()) && cache.exact.containsKey(data)) { + if (cache.exact.containsKey(data.getMaterial()) && cache.exact.containsKey(data)) { picked = cache.exact.get(data.getMaterial()).get(data).pullRandom(); - } else if(cache.basic.containsKey(data.getMaterial())) { + } else if (cache.basic.containsKey(data.getMaterial())) { picked = cache.basic.get(data.getMaterial()).pullRandom(); - } else if(cache.global.getSize() > 0) { + } else if (cache.global.getSize() > 0) { picked = cache.global.pullRandom(); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObjectReplace.java b/src/main/java/com/volmit/iris/engine/object/IrisObjectReplace.java index 6a832cc9c..119da29a7 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObjectReplace.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObjectReplace.java @@ -59,10 +59,10 @@ public KList getFind(IrisData rdata) { { KList b = new KList<>(); - for(IrisBlockData i : find) { + for (IrisBlockData i : find) { BlockData bx = i.getBlockData(rdata); - if(bx != null) { + if (bx != null) { b.add(bx); } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObjectRotation.java b/src/main/java/com/volmit/iris/engine/object/IrisObjectRotation.java index 31fb0ac97..5b75ef725 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObjectRotation.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObjectRotation.java @@ -88,7 +88,7 @@ public double getZRotation(int spin) { } public IrisObject rotateCopy(IrisObject e) { - if(e == null) { + if (e == null) { return null; } @@ -97,7 +97,7 @@ public IrisObject rotateCopy(IrisObject e) { public IrisJigsawPiece rotateCopy(IrisJigsawPiece v) { IrisJigsawPiece piece = v.copy(); - for(IrisJigsawPieceConnector i : piece.getConnectors()) { + for (IrisJigsawPieceConnector i : piece.getConnectors()) { i.setPosition(rotate(i.getPosition())); i.setDirection(rotate(i.getDirection())); } @@ -115,11 +115,11 @@ public IrisDirection rotate(IrisDirection direction) { } public double getRotation(int spin, IrisAxisRotationClamp clamp) { - if(!enabled) { + if (!enabled) { return 0; } - if(!clamp.isEnabled()) { + if (!clamp.isEnabled()) { return 0; } @@ -131,27 +131,27 @@ public BlockFace getFace(BlockVector v) { int y = (int) Math.round(v.getY()); int z = (int) Math.round(v.getZ()); - if(x == 0 && z == -1) { + if (x == 0 && z == -1) { return BlockFace.NORTH; } - if(x == 0 && z == 1) { + if (x == 0 && z == 1) { return BlockFace.SOUTH; } - if(x == 1 && z == 0) { + if (x == 1 && z == 0) { return BlockFace.EAST; } - if(x == -1 && z == 0) { + if (x == -1 && z == 0) { return BlockFace.WEST; } - if(y > 0) { + if (y > 0) { return BlockFace.UP; } - if(y < 0) { + if (y < 0) { return BlockFace.DOWN; } @@ -163,28 +163,28 @@ public BlockFace getHexFace(BlockVector v) { int y = v.getBlockY(); int z = v.getBlockZ(); - if(x == 0 && z == -1) return BlockFace.NORTH; - if(x == 1 && z == -2) return BlockFace.NORTH_NORTH_EAST; - if(x == 1 && z == -1) return BlockFace.NORTH_EAST; - if(x == 2 && z == -1) return BlockFace.EAST_NORTH_EAST; - if(x == 1 && z == 0) return BlockFace.EAST; - if(x == 2 && z == 1) return BlockFace.EAST_SOUTH_EAST; - if(x == 1 && z == 1) return BlockFace.SOUTH_EAST; - if(x == 1 && z == 2) return BlockFace.SOUTH_SOUTH_EAST; - if(x == 0 && z == 1) return BlockFace.SOUTH; - if(x == -1 && z == 2) return BlockFace.SOUTH_SOUTH_WEST; - if(x == -1 && z == 1) return BlockFace.SOUTH_WEST; - if(x == -2 && z == 1) return BlockFace.WEST_SOUTH_WEST; - if(x == -1 && z == 0) return BlockFace.WEST; - if(x == -2 && z == -1) return BlockFace.WEST_NORTH_WEST; - if(x == -1 && z == -1) return BlockFace.NORTH_WEST; - if(x == -1 && z == -2) return BlockFace.NORTH_NORTH_WEST; - - if(y > 0) { + if (x == 0 && z == -1) return BlockFace.NORTH; + if (x == 1 && z == -2) return BlockFace.NORTH_NORTH_EAST; + if (x == 1 && z == -1) return BlockFace.NORTH_EAST; + if (x == 2 && z == -1) return BlockFace.EAST_NORTH_EAST; + if (x == 1 && z == 0) return BlockFace.EAST; + if (x == 2 && z == 1) return BlockFace.EAST_SOUTH_EAST; + if (x == 1 && z == 1) return BlockFace.SOUTH_EAST; + if (x == 1 && z == 2) return BlockFace.SOUTH_SOUTH_EAST; + if (x == 0 && z == 1) return BlockFace.SOUTH; + if (x == -1 && z == 2) return BlockFace.SOUTH_SOUTH_WEST; + if (x == -1 && z == 1) return BlockFace.SOUTH_WEST; + if (x == -2 && z == 1) return BlockFace.WEST_SOUTH_WEST; + if (x == -1 && z == 0) return BlockFace.WEST; + if (x == -2 && z == -1) return BlockFace.WEST_NORTH_WEST; + if (x == -1 && z == -1) return BlockFace.NORTH_WEST; + if (x == -1 && z == -2) return BlockFace.NORTH_NORTH_WEST; + + if (y > 0) { return BlockFace.UP; } - if(y < 0) { + if (y < 0) { return BlockFace.DOWN; } @@ -192,7 +192,7 @@ public BlockFace getHexFace(BlockVector v) { } public BlockFace faceForAxis(Axis axis) { - return switch(axis) { + return switch (axis) { case X -> BlockFace.EAST; case Y -> BlockFace.UP; case Z -> BlockFace.NORTH; @@ -201,7 +201,7 @@ public BlockFace faceForAxis(Axis axis) { } public Axis axisFor(BlockFace f) { - return switch(f) { + return switch (f) { case NORTH, SOUTH -> Axis.Z; case EAST, WEST -> Axis.X; default -> Axis.Y; @@ -210,7 +210,7 @@ public Axis axisFor(BlockFace f) { } public Axis axisFor2D(BlockFace f) { - return switch(f) { + return switch (f) { case EAST, WEST, UP, DOWN -> Axis.X; default -> Axis.Z; }; @@ -224,22 +224,22 @@ public BlockData rotate(BlockData dd, int spinxx, int spinyy, int spinzz) { int spiny = (int) (90D * (Math.ceil(Math.abs((spinyy % 360D) / 90D)))); int spinz = (int) (90D * (Math.ceil(Math.abs((spinzz % 360D) / 90D)))); - if(!canRotate()) { + if (!canRotate()) { return d; } - if(d instanceof Directional g) { + if (d instanceof Directional g) { BlockFace f = g.getFacing(); BlockVector bv = new BlockVector(f.getModX(), f.getModY(), f.getModZ()); bv = rotate(bv.clone(), spinx, spiny, spinz); BlockFace t = getFace(bv); - if(g.getFaces().contains(t)) { + if (g.getFaces().contains(t)) { g.setFacing(t); - } else if(!g.getMaterial().isSolid()) { + } else if (!g.getMaterial().isSolid()) { d = null; } - } else if(d instanceof Rotatable g) { + } else if (d instanceof Rotatable g) { BlockFace f = g.getRotation(); BlockVector bv = new BlockVector(f.getModX(), 0, f.getModZ()); @@ -248,36 +248,36 @@ public BlockData rotate(BlockData dd, int spinxx, int spinyy, int spinzz) { g.setRotation(face); - } else if(d instanceof Orientable) { + } else if (d instanceof Orientable) { BlockFace f = getFace(((Orientable) d).getAxis()); BlockVector bv = new BlockVector(f.getModX(), f.getModY(), f.getModZ()); bv = rotate(bv.clone(), spinx, spiny, spinz); Axis a = getAxis(bv); - if(!a.equals(((Orientable) d).getAxis()) && ((Orientable) d).getAxes().contains(a)) { + if (!a.equals(((Orientable) d).getAxis()) && ((Orientable) d).getAxes().contains(a)) { ((Orientable) d).setAxis(a); } - } else if(d instanceof MultipleFacing g) { + } else if (d instanceof MultipleFacing g) { List faces = new KList<>(); - for(BlockFace i : g.getFaces()) { + for (BlockFace i : g.getFaces()) { BlockVector bv = new BlockVector(i.getModX(), i.getModY(), i.getModZ()); bv = rotate(bv.clone(), spinx, spiny, spinz); BlockFace r = getFace(bv); - if(g.getAllowedFaces().contains(r)) { + if (g.getAllowedFaces().contains(r)) { faces.add(r); } } - for(BlockFace i : g.getFaces()) { + for (BlockFace i : g.getFaces()) { g.setFace(i, false); } - for(BlockFace i : faces) { + for (BlockFace i : faces) { g.setFace(i, true); } - } else if(d.getMaterial().equals(Material.NETHER_PORTAL) && d instanceof Orientable g) { + } else if (d.getMaterial().equals(Material.NETHER_PORTAL) && d instanceof Orientable g) { //TODO: Fucks up logs BlockFace f = faceForAxis(g.getAxis()); BlockVector bv = new BlockVector(f.getModX(), f.getModY(), f.getModZ()); @@ -286,7 +286,7 @@ public BlockData rotate(BlockData dd, int spinxx, int spinyy, int spinzz) { Axis a = !g.getAxes().contains(Axis.Y) ? axisFor(t) : axisFor2D(t); ((Orientable) d).setAxis(a); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -295,15 +295,15 @@ public BlockData rotate(BlockData dd, int spinxx, int spinyy, int spinzz) { } public Axis getAxis(BlockVector v) { - if(Math.abs(v.getBlockX()) > Math.max(Math.abs(v.getBlockY()), Math.abs(v.getBlockZ()))) { + if (Math.abs(v.getBlockX()) > Math.max(Math.abs(v.getBlockY()), Math.abs(v.getBlockZ()))) { return Axis.X; } - if(Math.abs(v.getBlockY()) > Math.max(Math.abs(v.getBlockX()), Math.abs(v.getBlockZ()))) { + if (Math.abs(v.getBlockY()) > Math.max(Math.abs(v.getBlockX()), Math.abs(v.getBlockZ()))) { return Axis.Y; } - if(Math.abs(v.getBlockZ()) > Math.max(Math.abs(v.getBlockX()), Math.abs(v.getBlockY()))) { + if (Math.abs(v.getBlockZ()) > Math.max(Math.abs(v.getBlockX()), Math.abs(v.getBlockY()))) { return Axis.Z; } @@ -311,7 +311,7 @@ public Axis getAxis(BlockVector v) { } private BlockFace getFace(Axis axis) { - return switch(axis) { + return switch (axis) { case X -> BlockFace.EAST; case Y -> BlockFace.UP; case Z -> BlockFace.SOUTH; @@ -327,22 +327,22 @@ public IrisPosition rotate(IrisPosition b, int spinx, int spiny, int spinz) { } public BlockVector rotate(BlockVector b, int spinx, int spiny, int spinz) { - if(!canRotate()) { + if (!canRotate()) { return b; } BlockVector v = b.clone(); - if(canRotateX()) { - if(getXAxis().isLocked()) { - if(Math.abs(getXAxis().getMax()) % 360D == 180D) { + if (canRotateX()) { + if (getXAxis().isLocked()) { + if (Math.abs(getXAxis().getMax()) % 360D == 180D) { v.setZ(-v.getZ()); v.setY(-v.getY()); - } else if(getXAxis().getMax() % 360D == 90D || getXAxis().getMax() % 360D == -270D) { + } else if (getXAxis().getMax() % 360D == 90D || getXAxis().getMax() % 360D == -270D) { double z = v.getZ(); v.setZ(v.getY()); v.setY(-z); - } else if(getXAxis().getMax() == -90D || getXAxis().getMax() % 360D == 270D) { + } else if (getXAxis().getMax() == -90D || getXAxis().getMax() % 360D == 270D) { double z = v.getZ(); v.setZ(-v.getY()); v.setY(z); @@ -354,16 +354,16 @@ public BlockVector rotate(BlockVector b, int spinx, int spiny, int spinz) { } } - if(canRotateZ()) { - if(getZAxis().isLocked()) { - if(Math.abs(getZAxis().getMax()) % 360D == 180D) { + if (canRotateZ()) { + if (getZAxis().isLocked()) { + if (Math.abs(getZAxis().getMax()) % 360D == 180D) { v.setY(-v.getY()); v.setX(-v.getX()); - } else if(getZAxis().getMax() % 360D == 90D || getZAxis().getMax() % 360D == -270D) { + } else if (getZAxis().getMax() % 360D == 90D || getZAxis().getMax() % 360D == -270D) { double y = v.getY(); v.setY(v.getX()); v.setX(-y); - } else if(getZAxis().getMax() == -90D || getZAxis().getMax() % 360D == 270D) { + } else if (getZAxis().getMax() == -90D || getZAxis().getMax() % 360D == 270D) { double y = v.getY(); v.setY(-v.getX()); v.setX(y); @@ -375,16 +375,16 @@ public BlockVector rotate(BlockVector b, int spinx, int spiny, int spinz) { } } - if(canRotateY()) { - if(getYAxis().isLocked()) { - if(Math.abs(getYAxis().getMax()) % 360D == 180D) { + if (canRotateY()) { + if (getYAxis().isLocked()) { + if (Math.abs(getYAxis().getMax()) % 360D == 180D) { v.setX(-v.getX()); v.setZ(-v.getZ()); - } else if(getYAxis().getMax() % 360D == 90D || getYAxis().getMax() % 360D == -270D) { + } else if (getYAxis().getMax() % 360D == 90D || getYAxis().getMax() % 360D == -270D) { double x = v.getX(); v.setX(v.getZ()); v.setZ(-x); - } else if(getYAxis().getMax() == -90D || getYAxis().getMax() % 360D == 270D) { + } else if (getYAxis().getMax() == -90D || getYAxis().getMax() % 360D == 270D) { double x = v.getX(); v.setX(-v.getZ()); v.setZ(x); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObjectScale.java b/src/main/java/com/volmit/iris/engine/object/IrisObjectScale.java index 8ec414b5d..14eb2a9b7 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObjectScale.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObjectScale.java @@ -38,11 +38,11 @@ @Data public class IrisObjectScale { private static transient ConcurrentLinkedHashMap> cache - = new ConcurrentLinkedHashMap.Builder>() - .initialCapacity(64) - .maximumWeightedCapacity(1024) - .concurrencyLevel(32) - .build(); + = new ConcurrentLinkedHashMap.Builder>() + .initialCapacity(64) + .maximumWeightedCapacity(1024) + .concurrencyLevel(32) + .build(); @MinNumber(1) @MaxNumber(32) @Desc("Iris Objects are scaled and cached to speed up placements. Because of this extra memory is used, so we evenly distribute variations across the defined scale range, then pick one randomly. If the differences is small, use a lower number. For more possibilities on the scale spectrum, increase this at the cost of memory.") @@ -69,7 +69,7 @@ public int getMaxSizeFor(int indim) { public double getMaxScale() { double mx = 0; - for(double i = minimumScale; i < maximumScale; i += (maximumScale - minimumScale) / (double) (Math.min(variations, 32))) { + for (double i = minimumScale; i < maximumScale; i += (maximumScale - minimumScale) / (double) (Math.min(variations, 32))) { mx = i; } @@ -77,13 +77,13 @@ public double getMaxScale() { } public IrisObject get(RNG rng, IrisObject origin) { - if(shouldScale()) { + if (shouldScale()) { return origin; } return cache.computeIfAbsent(origin, (k) -> { KList c = new KList<>(); - for(double i = minimumScale; i < maximumScale; i += (maximumScale - minimumScale) / (double) (Math.min(variations, 32))) { + for (double i = minimumScale; i < maximumScale; i += (maximumScale - minimumScale) / (double) (Math.min(variations, 32))) { c.add(origin.scaled(i, getInterpolation())); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisObjectTranslate.java b/src/main/java/com/volmit/iris/engine/object/IrisObjectTranslate.java index c0a4af4f9..af8b83e6d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisObjectTranslate.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisObjectTranslate.java @@ -58,7 +58,7 @@ public boolean canTranslate() { } public BlockVector translate(BlockVector i) { - if(canTranslate()) { + if (canTranslate()) { return (BlockVector) i.clone().add(new BlockVector(x, y, z)); } @@ -66,7 +66,7 @@ public BlockVector translate(BlockVector i) { } public BlockVector translate(BlockVector clone, IrisObjectRotation rotation, int sx, int sy, int sz) { - if(canTranslate()) { + if (canTranslate()) { return (BlockVector) clone.clone().add(rotation.rotate(new BlockVector(x, y, z), sx, sy, sz)); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisOreGenerator.java b/src/main/java/com/volmit/iris/engine/object/IrisOreGenerator.java index 25809d482..6ec359680 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisOreGenerator.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisOreGenerator.java @@ -49,17 +49,17 @@ public class IrisOreGenerator { private transient AtomicCache chanceCache = new AtomicCache<>(); public BlockData generate(int x, int y, int z, RNG rng, IrisData data) { - if(palette.getPalette().isEmpty()) { + if (palette.getPalette().isEmpty()) { return null; } - if(!range.contains(y)) { + if (!range.contains(y)) { return null; } CNG chance = chanceCache.aquire(() -> chanceStyle.create(rng, data)); - if(chance.noise(x, y, z) > threshold) { + if (chance.noise(x, y, z) > threshold) { return null; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisPotionEffect.java b/src/main/java/com/volmit/iris/engine/object/IrisPotionEffect.java index ba994d7c3..73d06ebc5 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisPotionEffect.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisPotionEffect.java @@ -60,19 +60,19 @@ public PotionEffectType getRealType() { { PotionEffectType t = PotionEffectType.LUCK; - if(getPotionEffect().isEmpty()) { + if (getPotionEffect().isEmpty()) { return t; } try { - for(PotionEffectType i : PotionEffectType.values()) { - if(i.getName().toUpperCase().replaceAll("\\Q \\E", "_").equals(getPotionEffect())) { + for (PotionEffectType i : PotionEffectType.values()) { + if (i.getName().toUpperCase().replaceAll("\\Q \\E", "_").equals(getPotionEffect())) { t = i; return t; } } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -84,10 +84,10 @@ public PotionEffectType getRealType() { } public void apply(LivingEntity p) { - if(strength > -1) { - if(p.hasPotionEffect(getRealType())) { + if (strength > -1) { + if (p.hasPotionEffect(getRealType())) { PotionEffect e = p.getPotionEffect(getRealType()); - if(e.getAmplifier() > strength) { + if (e.getAmplifier() > strength) { return; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisPyramid.java b/src/main/java/com/volmit/iris/engine/object/IrisPyramid.java index 40cdfb5d8..13fff726c 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisPyramid.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisPyramid.java @@ -44,7 +44,7 @@ public class IrisPyramid implements IRare { public void generate(RNG rng, Engine engine, MantleWriter writer, int x, int y, int z) { writer.setPyramid(x, y, z, matterNodeCache.aquire(() -> CavernMatter.get(getCustomBiome(), 0)), - (int) baseWidth.get(rng, z, y, engine.getData()), true); + (int) baseWidth.get(rng, z, y, engine.getData()), true); } public double maxSize() { diff --git a/src/main/java/com/volmit/iris/engine/object/IrisRange.java b/src/main/java/com/volmit/iris/engine/object/IrisRange.java index 4c7732515..3897304db 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisRange.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisRange.java @@ -40,7 +40,7 @@ public class IrisRange { private double max = 32; public double get(RNG rng) { - if(min == max) { + if (min == max) { return min; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisRavine.java b/src/main/java/com/volmit/iris/engine/object/IrisRavine.java index cb935920a..ca6bb7bd4 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisRavine.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisRavine.java @@ -104,15 +104,15 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, int highestWater = Math.max(waterHint, -1); boolean water = false; - if(highestWater == -1) { - for(IrisPosition i : pos) { + if (highestWater == -1) { + for (IrisPosition i : pos) { int rsurface = y == -1 ? engine.getComplex().getHeightStream().get(x, z).intValue() : y; int depth = (int) Math.round(dg.fitDouble(depthStyle.getMin(), depthStyle.getMax(), i.getX(), i.getZ())); int surface = (int) Math.round(rsurface - depth * 0.45); int yy = surface + depth; int th = engine.getHeight(x, z, true); - if(yy > th && th < engine.getDimension().getFluidHeight()) { + if (yy > th && th < engine.getDimension().getFluidHeight()) { highestWater = Math.max(highestWater, yy); water = true; break; @@ -125,11 +125,11 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, MatterCavern c = new MatterCavern(true, customBiome, (byte) (water ? 1 : 0)); MatterCavern l = new MatterCavern(true, customBiome, (byte) 2); - if(pos.size() < nodeThreshold) { + if (pos.size() < nodeThreshold) { return; } - for(IrisPosition p : pos) { + for (IrisPosition p : pos) { int rsurface = y == -1 ? engine.getComplex().getHeightStream().get(x, z).intValue() : y; int depth = (int) Math.round(dg.fitDouble(depthStyle.getMin(), depthStyle.getMax(), p.getX(), p.getZ())); int width = (int) Math.round(bw.fitDouble(baseWidthStyle.getMin(), baseWidthStyle.getMax(), p.getX(), p.getZ())); @@ -137,19 +137,19 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, fork.doCarving(writer, rng, engine, p.getX(), rng.i(surface - depth, surface), p.getZ(), Math.max(highestWater, waterHint)); - for(int i = surface + depth; i >= surface; i--) { - if(i % ribThickness == 0) { + for (int i = surface + depth; i >= surface; i--) { + if (i % ribThickness == 0) { double v = width + ((((surface + depth) - i) * (angle / 360D))); - if(v <= 0.25) { + if (v <= 0.25) { break; } - if(i <= ribThickness + 2) { + if (i <= ribThickness + 2) { break; } - if(lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid())) { + if (lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid())) { writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l); } else { writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c); @@ -157,19 +157,19 @@ public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, } } - for(int i = surface - depth; i <= surface; i++) { - if(i % ribThickness == 0) { + for (int i = surface - depth; i <= surface; i++) { + if (i % ribThickness == 0) { double v = width - ((((surface - depth) - i) * (angle / 360D))); - if(v <= 0.25) { + if (v <= 0.25) { break; } - if(i <= ribThickness + 2) { + if (i <= ribThickness + 2) { break; } - if(lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid())) { + if (lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid())) { writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l); } else { writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisRavinePlacer.java b/src/main/java/com/volmit/iris/engine/object/IrisRavinePlacer.java index 081f7fae9..570859a63 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisRavinePlacer.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisRavinePlacer.java @@ -60,18 +60,18 @@ public void generateRavine(MantleWriter mantle, RNG rng, Engine engine, int x, i } public void generateRavine(MantleWriter mantle, RNG rng, Engine engine, int x, int y, int z, int waterHint) { - if(fail.get()) { + if (fail.get()) { return; } - if(rng.nextInt(rarity) != 0) { + if (rng.nextInt(rarity) != 0) { return; } IrisData data = engine.getData(); IrisRavine ravine = getRealRavine(data); - if(ravine == null) { + if (ravine == null) { Iris.warn("Unable to locate ravine for generation!"); fail.set(true); return; @@ -81,7 +81,7 @@ public void generateRavine(MantleWriter mantle, RNG rng, Engine engine, int x, i int xx = x + rng.nextInt(15); int zz = z + rng.nextInt(15); ravine.generate(mantle, rng, engine, xx, y, zz, waterHint); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); fail.set(true); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisRegion.java b/src/main/java/com/volmit/iris/engine/object/IrisRegion.java index 5e3f0ee1c..158f04f3e 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisRegion.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisRegion.java @@ -152,14 +152,14 @@ public class IrisRegion extends IrisRegistrant implements IRare { private KList ores = new KList<>(); public BlockData generateOres(int x, int y, int z, RNG rng, IrisData data) { - if(ores.isEmpty()) { + if (ores.isEmpty()) { return null; } BlockData b = null; - for(IrisOreGenerator i : ores) { + for (IrisOreGenerator i : ores) { b = i.generate(x, y, z, rng, data); - if(b != null) { + if (b != null) { return b; } } @@ -175,8 +175,8 @@ public KList getSurfaceObjects() { { KList o = getObjects().copy(); - for(IrisObjectPlacement i : o.copy()) { - if(!i.getCarvingSupport().supportsSurface()) { + for (IrisObjectPlacement i : o.copy()) { + if (!i.getCarvingSupport().supportsSurface()) { o.remove(i); } } @@ -190,8 +190,8 @@ public KList getCarvingObjects() { { KList o = getObjects().copy(); - for(IrisObjectPlacement i : o.copy()) { - if(!i.getCarvingSupport().supportsCarving()) { + for (IrisObjectPlacement i : o.copy()) { + if (!i.getCarvingSupport().supportsCarving()) { o.remove(i); } } @@ -201,7 +201,7 @@ public KList getCarvingObjects() { } public double getBiomeZoom(InferredType t) { - switch(t) { + switch (t) { case CAVE: return caveBiomeZoom; case LAND: @@ -219,7 +219,7 @@ public double getBiomeZoom(InferredType t) { public CNG getShoreHeightGenerator() { return shoreHeightGenerator.aquire(() -> - CNG.signature(new RNG((long) (getName().length() + getLandBiomeZoom() + getLandBiomes().size() + 3458612)))); + CNG.signature(new RNG((long) (getName().length() + getLandBiomeZoom() + getLandBiomes().size() + 3458612)))); } public double getShoreHeight(double x, double z) { @@ -240,9 +240,9 @@ public KList getAllBiomes(DataProvider g) { KMap b = new KMap<>(); KSet names = getAllBiomeIds(); - while(!names.isEmpty()) { - for(String i : new KList<>(names)) { - if(b.containsKey(i)) { + while (!names.isEmpty()) { + for (String i : new KList<>(names)) { + if (b.containsKey(i)) { names.remove(i); continue; } @@ -250,7 +250,7 @@ public KList getAllBiomes(DataProvider g) { IrisBiome biome = g.getData().getBiomeLoader().load(i); names.remove(i); - if(biome == null) { + if (biome == null) { continue; } @@ -264,13 +264,13 @@ public KList getAllBiomes(DataProvider g) { } public KList getBiomes(DataProvider g, InferredType type) { - if(type.equals(InferredType.LAND)) { + if (type.equals(InferredType.LAND)) { return getRealLandBiomes(g); - } else if(type.equals(InferredType.SEA)) { + } else if (type.equals(InferredType.SEA)) { return getRealSeaBiomes(g); - } else if(type.equals(InferredType.SHORE)) { + } else if (type.equals(InferredType.SHORE)) { return getRealShoreBiomes(g); - } else if(type.equals(InferredType.CAVE)) { + } else if (type.equals(InferredType.CAVE)) { return getRealCaveBiomes(g); } @@ -282,7 +282,7 @@ public KList getRealCaveBiomes(DataProvider g) { { KList realCaveBiomes = new KList<>(); - for(String i : getCaveBiomes()) { + for (String i : getCaveBiomes()) { realCaveBiomes.add(g.getData().getBiomeLoader().load(i)); } @@ -295,7 +295,7 @@ public KList getRealShoreBiomes(DataProvider g) { { KList realShoreBiomes = new KList<>(); - for(String i : getShoreBiomes()) { + for (String i : getShoreBiomes()) { realShoreBiomes.add(g.getData().getBiomeLoader().load(i)); } @@ -308,7 +308,7 @@ public KList getRealSeaBiomes(DataProvider g) { { KList realSeaBiomes = new KList<>(); - for(String i : getSeaBiomes()) { + for (String i : getSeaBiomes()) { realSeaBiomes.add(g.getData().getBiomeLoader().load(i)); } @@ -321,7 +321,7 @@ public KList getRealLandBiomes(DataProvider g) { { KList realLandBiomes = new KList<>(); - for(String i : getLandBiomes()) { + for (String i : getLandBiomes()) { realLandBiomes.add(g.getData().getBiomeLoader().load(i)); } @@ -337,9 +337,9 @@ public KList getAllAnyBiomes() { names.addAll(seaBiomes); names.addAll(shoreBiomes); - while(!names.isEmpty()) { - for(String i : new KList<>(names)) { - if(b.containsKey(i)) { + while (!names.isEmpty()) { + for (String i : new KList<>(names)) { + if (b.containsKey(i)) { names.remove(i); continue; } @@ -347,7 +347,7 @@ public KList getAllAnyBiomes() { IrisBiome biome = IrisData.loadAnyBiome(i); names.remove(i); - if(biome == null) { + if (biome == null) { continue; } @@ -362,17 +362,17 @@ public KList getAllAnyBiomes() { public Color getColor(DataProvider dataProvider, RenderType type) { return this.cacheColor.aquire(() -> { - if(this.color == null) { + if (this.color == null) { Random rand = new Random(getName().hashCode() + getAllBiomeIds().hashCode()); RandomColor randomColor = new RandomColor(rand); KList biomes = getRealLandBiomes(dataProvider); - while(biomes.size() > 0) { + while (biomes.size() > 0) { int index = rand.nextInt(biomes.size()); IrisBiome biome = biomes.get(index); - if(biome.getVanillaDerivative() != null) { + if (biome.getVanillaDerivative() != null) { RandomColor.Color col = VanillaBiomeMap.getColorType(biome.getVanillaDerivative()); RandomColor.Luminosity lum = VanillaBiomeMap.getColorLuminosity(biome.getVanillaDerivative()); RandomColor.SaturationType sat = VanillaBiomeMap.getColorSaturatiom(biome.getVanillaDerivative()); @@ -389,7 +389,7 @@ public Color getColor(DataProvider dataProvider, RenderType type) { try { return Color.decode(this.color); - } catch(NumberFormatException e) { + } catch (NumberFormatException e) { Iris.warn("Could not parse color \"" + this.color + "\" for region " + getName()); return Color.WHITE; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisSlopeClip.java b/src/main/java/com/volmit/iris/engine/object/IrisSlopeClip.java index 521d493d1..bd7c301be 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisSlopeClip.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisSlopeClip.java @@ -50,7 +50,7 @@ public boolean isDefault() { @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean isValid(double slope) { - if(isDefault()) { + if (isDefault()) { return true; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisSpawner.java b/src/main/java/com/volmit/iris/engine/object/IrisSpawner.java index 212905404..6e2c9faff 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisSpawner.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisSpawner.java @@ -74,17 +74,17 @@ public class IrisSpawner extends IrisRegistrant { private IrisSpawnGroup group = IrisSpawnGroup.NORMAL; public boolean isValid(IrisBiome biome) { - return switch(group) { - case NORMAL -> switch(biome.getInferredType()) { + return switch (group) { + case NORMAL -> switch (biome.getInferredType()) { case SHORE, SEA, CAVE, DEFER -> false; case LAND -> true; }; case CAVE -> true; - case UNDERWATER -> switch(biome.getInferredType()) { + case UNDERWATER -> switch (biome.getInferredType()) { case SHORE, LAND, CAVE, DEFER -> false; case SEA -> true; }; - case BEACH -> switch(biome.getInferredType()) { + case BEACH -> switch (biome.getInferredType()) { case SHORE -> true; case LAND, CAVE, SEA, DEFER -> false; }; diff --git a/src/main/java/com/volmit/iris/engine/object/IrisStyledRange.java b/src/main/java/com/volmit/iris/engine/object/IrisStyledRange.java index 410ffbdec..4d2d30dac 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisStyledRange.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisStyledRange.java @@ -47,11 +47,11 @@ public class IrisStyledRange { private IrisGeneratorStyle style = new IrisGeneratorStyle(NoiseStyle.STATIC); public double get(RNG rng, double x, double z, IrisData data) { - if(min == max) { + if (min == max) { return min; } - if(style.isFlat()) { + if (style.isFlat()) { return M.lerp(min, max, 0.5); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisSurface.java b/src/main/java/com/volmit/iris/engine/object/IrisSurface.java index bbf3ae064..e8a2e2e3c 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisSurface.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisSurface.java @@ -44,24 +44,23 @@ public enum IrisSurface { /** * Check if this Iris surface matches the blockstate provided * - * @param state - * The blockstate + * @param state The blockstate * @return True if it matches */ public boolean matches(Block state) { Material type = state.getType(); - if(type.isSolid()) { + if (type.isSolid()) { return this == LAND || this == OVERWORLD || (this == ANIMAL - && (type == Material.GRASS_BLOCK || type == Material.DIRT - || type == Material.DIRT_PATH || type == Material.COARSE_DIRT - || type == Material.ROOTED_DIRT || type == Material.PODZOL - || type == Material.MYCELIUM || type == Material.SNOW_BLOCK)); + && (type == Material.GRASS_BLOCK || type == Material.DIRT + || type == Material.DIRT_PATH || type == Material.COARSE_DIRT + || type == Material.ROOTED_DIRT || type == Material.PODZOL + || type == Material.MYCELIUM || type == Material.SNOW_BLOCK)); } - if(type == Material.LAVA) return this == LAVA; - if(type == Material.WATER || type == Material.SEAGRASS - || type == Material.TALL_SEAGRASS || type == Material.KELP_PLANT - || type == Material.KELP || - (state instanceof Waterlogged && ((Waterlogged) state).isWaterlogged())) + if (type == Material.LAVA) return this == LAVA; + if (type == Material.WATER || type == Material.SEAGRASS + || type == Material.TALL_SEAGRASS || type == Material.KELP_PLANT + || type == Material.KELP || + (state instanceof Waterlogged && ((Waterlogged) state).isWaterlogged())) return this == WATER || this == OVERWORLD; return false; diff --git a/src/main/java/com/volmit/iris/engine/object/IrisTimeBlock.java b/src/main/java/com/volmit/iris/engine/object/IrisTimeBlock.java index bee1fdc6a..c99bb23a1 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisTimeBlock.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisTimeBlock.java @@ -38,11 +38,11 @@ public boolean isWithin(World world) { } public boolean isWithin(double hour) { - if(startHour == endHour) { + if (startHour == endHour) { return endHour != -1; } - if(startHour > endHour) { + if (startHour > endHour) { return hour >= startHour || hour <= endHour; } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisTree.java b/src/main/java/com/volmit/iris/engine/object/IrisTree.java index 15adaad67..1e8e8a8d6 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisTree.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisTree.java @@ -53,7 +53,7 @@ public class IrisTree { private boolean anySize; public boolean matches(IrisTreeSize size, TreeType type) { - if(!matchesSize(size)) { + if (!matchesSize(size)) { return false; } @@ -61,8 +61,8 @@ public boolean matches(IrisTreeSize size, TreeType type) { } private boolean matchesSize(IrisTreeSize size) { - for(IrisTreeSize i : getSizes()) { - if((i.getDepth() == size.getDepth() && i.getWidth() == size.getWidth()) || (i.getDepth() == size.getWidth() && i.getWidth() == size.getDepth())) { + for (IrisTreeSize i : getSizes()) { + if ((i.getDepth() == size.getDepth() && i.getWidth() == size.getWidth()) || (i.getDepth() == size.getWidth() && i.getWidth() == size.getDepth())) { return true; } } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisTreeSize.java b/src/main/java/com/volmit/iris/engine/object/IrisTreeSize.java index dd3445f82..f27c6699d 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisTreeSize.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisTreeSize.java @@ -45,8 +45,7 @@ public class IrisTreeSize { /** * Does the size match * - * @param size - * the size to check match + * @param size the size to check match * @return true if it matches (fits within width and depth) */ public boolean doesMatch(IrisTreeSize size) { diff --git a/src/main/java/com/volmit/iris/engine/object/IrisVillagerOverride.java b/src/main/java/com/volmit/iris/engine/object/IrisVillagerOverride.java index 6fd4981ca..e3c068a7e 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisVillagerOverride.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisVillagerOverride.java @@ -37,27 +37,27 @@ @EqualsAndHashCode(callSuper = false) public class IrisVillagerOverride { @Desc(""" - Disable the trade altogether. - If a cartographer villager gets a new explorer map trade: - If this is enabled -> the trade is removed - If this is disabled -> the trade is replaced with the "override" setting below - Default is true, so if you omit this, trades will be removed.""") + Disable the trade altogether. + If a cartographer villager gets a new explorer map trade: + If this is enabled -> the trade is removed + If this is disabled -> the trade is replaced with the "override" setting below + Default is true, so if you omit this, trades will be removed.""") private boolean disableTrade = true; @DependsOn("disableTrade") @Required @Desc(""" - The items to override the cartographer trade with. - By default, this is: - 3 emeralds + 3 glass blocks -> 1 spyglass. - Can trade 3 to 5 times""") + The items to override the cartographer trade with. + By default, this is: + 3 emeralds + 3 glass blocks -> 1 spyglass. + Can trade 3 to 5 times""") @ArrayType(min = 1, type = IrisVillagerTrade.class) private KList items = new KList<>(new IrisVillagerTrade() - .setIngredient1(new ItemStack(Material.EMERALD, 3)) - .setIngredient2(new ItemStack(Material.GLASS, 3)) - .setResult(new ItemStack(Material.SPYGLASS)) - .setMinTrades(3) - .setMaxTrades(5)); + .setIngredient1(new ItemStack(Material.EMERALD, 3)) + .setIngredient2(new ItemStack(Material.GLASS, 3)) + .setResult(new ItemStack(Material.SPYGLASS)) + .setMinTrades(3) + .setMaxTrades(5)); public KList getValidItems() { KList valid = new KList<>(); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisVillagerTrade.java b/src/main/java/com/volmit/iris/engine/object/IrisVillagerTrade.java index d9eba51a4..a34a8915a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisVillagerTrade.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisVillagerTrade.java @@ -76,39 +76,39 @@ public class IrisVillagerTrade { */ public boolean isValidItems() { KList warnings = new KList<>(); - if(ingredient1 == null) { + if (ingredient1 == null) { warnings.add("Ingredient 1 is null"); } - if(result == null) { + if (result == null) { warnings.add("Result is null"); } - if(minTrades <= 0) { + if (minTrades <= 0) { warnings.add("Negative minimal trades"); } - if(maxTrades <= 0) { + if (maxTrades <= 0) { warnings.add("Negative maximal trades"); } - if(minTrades > maxTrades) { + if (minTrades > maxTrades) { warnings.add("More minimal than maximal trades"); } - if(ingredient1 != null && !ingredient1.getType().isItem()) { + if (ingredient1 != null && !ingredient1.getType().isItem()) { warnings.add("Ingredient 1 is not an item"); } - if(ingredient2 != null && !ingredient2.getType().isItem()) { + if (ingredient2 != null && !ingredient2.getType().isItem()) { warnings.add("Ingredient 2 is not an item"); } - if(result != null && !result.getType().isItem()) { + if (result != null && !result.getType().isItem()) { warnings.add("Result is not an item"); } - if(warnings.isEmpty()) { + if (warnings.isEmpty()) { return true; } else { Iris.warn("Faulty item in cartographer item overrides: " + this); @@ -123,7 +123,7 @@ public boolean isValidItems() { * @return The list of 1 or 2 ingredients (depending on if ing2 is null) */ public List getIngredients() { - if(!isValidItems()) { + if (!isValidItems()) { return null; } return ingredient2 == null ? new KList<>(ingredient1) : new KList<>(ingredient1, ingredient2); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisWeather.java b/src/main/java/com/volmit/iris/engine/object/IrisWeather.java index e1fb45ff9..2f236647a 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisWeather.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisWeather.java @@ -36,7 +36,7 @@ public enum IrisWeather { ANY; public boolean is(World world) { - return switch(this) { + return switch (this) { case NONE -> world.isClearWeather(); case DOWNFALL -> world.hasStorm(); case DOWNFALL_WITH_THUNDER -> world.hasStorm() && world.isThundering(); diff --git a/src/main/java/com/volmit/iris/engine/object/IrisWorld.java b/src/main/java/com/volmit/iris/engine/object/IrisWorld.java index 155388bf2..43a5a54da 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisWorld.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisWorld.java @@ -57,11 +57,11 @@ public static IrisWorld fromWorld(World world) { private static IrisWorld bindWorld(IrisWorld iw, World world) { return iw.name(world.getName()) - .worldFolder(world.getWorldFolder()) - .minHeight(world.getMinHeight()) - .maxHeight(world.getMaxHeight()) - .realWorld(world) - .environment(world.getEnvironment()); + .worldFolder(world.getWorldFolder()) + .minHeight(world.getMinHeight()) + .maxHeight(world.getMaxHeight()) + .realWorld(world) + .environment(world.getEnvironment()); } public long getRawWorldSeed() { @@ -73,13 +73,13 @@ public void setRawWorldSeed(long seed) { } public boolean tryGetRealWorld() { - if(hasRealWorld()) { + if (hasRealWorld()) { return true; } World w = Bukkit.getWorld(name); - if(w != null) { + if (w != null) { realWorld = w; return true; } @@ -93,7 +93,7 @@ public boolean hasRealWorld() { public List getPlayers() { - if(hasRealWorld()) { + if (hasRealWorld()) { return realWorld().getPlayers(); } @@ -101,21 +101,21 @@ public List getPlayers() { } public void evacuate() { - if(hasRealWorld()) { + if (hasRealWorld()) { IrisToolbelt.evacuate(realWorld()); } } public void bind(WorldInfo worldInfo) { name(worldInfo.getName()) - .worldFolder(new File(worldInfo.getName())) - .minHeight(worldInfo.getMinHeight()) - .maxHeight(worldInfo.getMaxHeight()) - .environment(worldInfo.getEnvironment()); + .worldFolder(new File(worldInfo.getName())) + .minHeight(worldInfo.getMinHeight()) + .maxHeight(worldInfo.getMaxHeight()) + .environment(worldInfo.getEnvironment()); } public void bind(World world) { - if(hasRealWorld()) { + if (hasRealWorld()) { return; } @@ -123,7 +123,7 @@ public void bind(World world) { } public Location spawnLocation() { - if(hasRealWorld()) { + if (hasRealWorld()) { return realWorld().getSpawnLocation(); } @@ -132,7 +132,7 @@ public Location spawnLocation() { } public Collection getEntitiesByClass(Class t) { - if(hasRealWorld()) { + if (hasRealWorld()) { return realWorld().getEntitiesByClass(t); } diff --git a/src/main/java/com/volmit/iris/engine/object/IrisWorm.java b/src/main/java/com/volmit/iris/engine/object/IrisWorm.java index 7a29a0ea8..d2f7e499c 100644 --- a/src/main/java/com/volmit/iris/engine/object/IrisWorm.java +++ b/src/main/java/com/volmit/iris/engine/object/IrisWorm.java @@ -60,7 +60,7 @@ public class IrisWorm { @Desc("The thickness of the worms. Each individual worm has the same thickness while traveling however, each spawned worm will vary in thickness.") private IrisStyledRange girth = new IrisStyledRange().setMin(3).setMax(5) - .setStyle(new IrisGeneratorStyle(NoiseStyle.PERLIN)); + .setStyle(new IrisGeneratorStyle(NoiseStyle.PERLIN)); public KList generate(RNG rng, IrisData data, MantleWriter writer, IrisRange verticalRange, int x, int y, int z, Consumer fork) { int itr = maxIterations; @@ -75,12 +75,12 @@ public KList generate(RNG rng, IrisData data, MantleWriter writer, CNG gy = xStyle.getGenerator().createNoCache(new RNG(rng.lmax()), data); CNG gz = xStyle.getGenerator().createNoCache(new RNG(rng.lmax()), data); - while(itr-- > 0) { + while (itr-- > 0) { IrisPosition current = new IrisPosition(Math.round(cx), Math.round(cy), Math.round(cz)); fork.accept(current); pos.add(current); - if(check != null) { + if (check != null) { check.add(current); } @@ -92,19 +92,19 @@ public KList generate(RNG rng, IrisData data, MantleWriter writer, cz += jz; IrisPosition next = new IrisPosition(Math.round(cx), Math.round(cy), Math.round(cz)); - if(verticalRange != null && !verticalRange.contains(next.getY())) { + if (verticalRange != null && !verticalRange.contains(next.getY())) { break; } - if(!writer.isWithin((int) Math.round(cx), verticalRange != null ? (int) Math.round(cy) : 5, (int) Math.round(cz))) { + if (!writer.isWithin((int) Math.round(cx), verticalRange != null ? (int) Math.round(cy) : 5, (int) Math.round(cz))) { break; } - if(next.isLongerThan(start, maxDistance)) { + if (next.isLongerThan(start, maxDistance)) { break; } - if(check != null && check.contains(next)) { + if (check != null && check.contains(next)) { break; } } diff --git a/src/main/java/com/volmit/iris/engine/object/TileBanner.java b/src/main/java/com/volmit/iris/engine/object/TileBanner.java index efcc2d557..5c6b486a2 100644 --- a/src/main/java/com/volmit/iris/engine/object/TileBanner.java +++ b/src/main/java/com/volmit/iris/engine/object/TileBanner.java @@ -77,7 +77,7 @@ public void toBinary(DataOutputStream out) throws IOException { out.writeShort(id); out.writeByte(baseColor.ordinal()); out.writeByte(patterns.size()); - for(Pattern p : patterns) { + for (Pattern p : patterns) { out.writeByte(p.getColor().ordinal()); out.writeByte(p.getPattern().ordinal()); } @@ -89,7 +89,7 @@ public void fromBinary(DataInputStream in) throws IOException { int listSize = in.readByte(); patterns = new ArrayList<>(); - for(int i = 0; i < listSize; i++) { + for (int i = 0; i < listSize; i++) { DyeColor color = DyeColor.values()[in.readByte()]; PatternType type = PatternType.values()[in.readByte()]; patterns.add(new Pattern(color, type)); @@ -100,7 +100,7 @@ public void fromBinary(DataInputStream in) throws IOException { @Override public CompoundTag toNBT(CompoundTag tag) { @SuppressWarnings("unchecked") ListTag listTag = (ListTag) ListTag.createUnchecked(CompoundTag.class); - for(Pattern p : patterns) { + for (Pattern p : patterns) { CompoundTag pattern = new CompoundTag(); pattern.putString("Pattern", p.getPattern().getIdentifier()); pattern.putByte("Color", p.getColor().getDyeData()); @@ -111,8 +111,9 @@ public CompoundTag toNBT(CompoundTag tag) { } public boolean isBanner(Material material) { - return switch(material) { - case RED_BANNER, RED_WALL_BANNER, ORANGE_BANNER, ORANGE_WALL_BANNER, YELLOW_BANNER, YELLOW_WALL_BANNER, LIME_BANNER, LIME_WALL_BANNER, GREEN_BANNER, GREEN_WALL_BANNER, CYAN_BANNER, CYAN_WALL_BANNER, LIGHT_BLUE_BANNER, LIGHT_BLUE_WALL_BANNER, BLUE_BANNER, BLUE_WALL_BANNER, PURPLE_BANNER, PURPLE_WALL_BANNER, MAGENTA_BANNER, MAGENTA_WALL_BANNER, PINK_BANNER, PINK_WALL_BANNER, WHITE_BANNER, WHITE_WALL_BANNER, LIGHT_GRAY_BANNER, LIGHT_GRAY_WALL_BANNER, GRAY_BANNER, GRAY_WALL_BANNER, BLACK_BANNER, BLACK_WALL_BANNER, BROWN_BANNER, BROWN_WALL_BANNER -> true; + return switch (material) { + case RED_BANNER, RED_WALL_BANNER, ORANGE_BANNER, ORANGE_WALL_BANNER, YELLOW_BANNER, YELLOW_WALL_BANNER, LIME_BANNER, LIME_WALL_BANNER, GREEN_BANNER, GREEN_WALL_BANNER, CYAN_BANNER, CYAN_WALL_BANNER, LIGHT_BLUE_BANNER, LIGHT_BLUE_WALL_BANNER, BLUE_BANNER, BLUE_WALL_BANNER, PURPLE_BANNER, PURPLE_WALL_BANNER, MAGENTA_BANNER, MAGENTA_WALL_BANNER, PINK_BANNER, PINK_WALL_BANNER, WHITE_BANNER, WHITE_WALL_BANNER, LIGHT_GRAY_BANNER, LIGHT_GRAY_WALL_BANNER, GRAY_BANNER, GRAY_WALL_BANNER, BLACK_BANNER, BLACK_WALL_BANNER, BROWN_BANNER, BROWN_WALL_BANNER -> + true; default -> false; }; } diff --git a/src/main/java/com/volmit/iris/engine/object/TileData.java b/src/main/java/com/volmit/iris/engine/object/TileData.java index b4198e330..7dd5722f2 100644 --- a/src/main/java/com/volmit/iris/engine/object/TileData.java +++ b/src/main/java/com/volmit/iris/engine/object/TileData.java @@ -52,27 +52,28 @@ static TileData read(DataInputStream s) throws IOException @SuppressWarnings("unchecked") TileData d = registry.get(id).getClass().getConstructor().newInstance(); d.fromBinary(s); return d; - } catch(InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodException e) { + } catch (InvocationTargetException | InstantiationException | IllegalAccessException | + NoSuchMethodException e) { throw new IOException("Failed to create TileData instance due to missing type registrar!"); } } static boolean setTileState(Block block, TileData data) { - if(block.getState() instanceof TileState && data.isApplicable(block.getBlockData())) + if (block.getState() instanceof TileState && data.isApplicable(block.getBlockData())) return data.toBukkitTry(block.getState()); return false; } static TileData getTileState(Block block) { - for(TileData i : registry) { + for (TileData i : registry) { BlockData data = block.getBlockData(); - if(i.isApplicable(data)) { + if (i.isApplicable(data)) { try { @SuppressWarnings("unchecked") TileData s = i.getClass().getConstructor().newInstance(); s.fromBukkitTry(block.getState()); return s; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -96,7 +97,7 @@ default boolean toBukkitTry(BlockState t) { toBukkit((T) t); t.update(); return true; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -109,7 +110,7 @@ default boolean fromBukkitTry(BlockState t) { //noinspection unchecked fromBukkit((T) t); return true; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/engine/object/TileSpawner.java b/src/main/java/com/volmit/iris/engine/object/TileSpawner.java index e410973b1..20a6654d0 100644 --- a/src/main/java/com/volmit/iris/engine/object/TileSpawner.java +++ b/src/main/java/com/volmit/iris/engine/object/TileSpawner.java @@ -36,6 +36,7 @@ public class TileSpawner implements TileData { public static final int id = 1; private EntityType entityType; + @Override public String getTileId() { return "minecraft:mob_spawner"; diff --git a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterObject.java b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterObject.java index 227f55a29..6484483e1 100644 --- a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterObject.java +++ b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterObject.java @@ -17,23 +17,19 @@ public class IrisMatterObject extends IrisRegistrant { private final Matter matter; - public IrisMatterObject() - { - this(1,1,1); + public IrisMatterObject() { + this(1, 1, 1); } - public IrisMatterObject(int w, int h, int d) - { - this(new IrisMatter(w,h,d)); + public IrisMatterObject(int w, int h, int d) { + this(new IrisMatter(w, h, d)); } - public IrisMatterObject(Matter matter) - { + public IrisMatterObject(Matter matter) { this.matter = matter; } - public static IrisMatterObject from(IrisObject object) - { + public static IrisMatterObject from(IrisObject object) { return new IrisMatterObject(Matter.from(object)); } diff --git a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacement.java b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacement.java index e85f102d9..51299f7ac 100644 --- a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacement.java +++ b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacement.java @@ -62,15 +62,13 @@ public class IrisMatterPlacement implements IRare { @Desc("Place this object on the surface height, bedrock or the sky, then use translate if need be.") private IrisMatterPlacementLocation location = IrisMatterPlacementLocation.SURFACE; - public void place(IrisEngine engine, IrisData data, RNG rng, int ax, int az) - { + public void place(IrisEngine engine, IrisData data, RNG rng, int ax, int az) { IrisMatterObject object = data.getMatterLoader().load(place.getRandom(rng)); int x = ax; int z = az; int yoff = 0; - if(translate != null) - { + if (translate != null) { x += translate.xOffset(data, rng, x, z); yoff += translate.yOffset(data, rng, x, z); z += translate.zOffset(data, rng, x, z); @@ -83,8 +81,7 @@ public void place(IrisEngine engine, IrisData data, RNG rng, int ax, int az) int yy = y; int zz = z; - for(MatterSlice slice : object.getMatter().getSliceMap().values()) - { + for (MatterSlice slice : object.getMatter().getSliceMap().values()) { slice.iterate((mx, my, mz, v) -> { mantle.set(xx + mx, yy + my, zz + mz, v); }); diff --git a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacementLocation.java b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacementLocation.java index b72ec4020..0a6b7a8d7 100644 --- a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacementLocation.java +++ b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterPlacementLocation.java @@ -3,6 +3,7 @@ import com.volmit.iris.engine.IrisEngine; import com.volmit.iris.engine.object.annotations.Desc; import com.volmit.iris.util.function.Function3; + @Desc("WHERE THINGS PLACE") public enum IrisMatterPlacementLocation { SURFACE((e, x, z) -> e.getHeight(x, z, true)), @@ -12,8 +13,7 @@ public enum IrisMatterPlacementLocation { private final Function3 computer; - private IrisMatterPlacementLocation(Function3 computer) - { + private IrisMatterPlacementLocation(Function3 computer) { this.computer = computer; } diff --git a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterTranslate.java b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterTranslate.java index 2c86dbe6c..65cf2dd3c 100644 --- a/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterTranslate.java +++ b/src/main/java/com/volmit/iris/engine/object/matter/IrisMatterTranslate.java @@ -30,30 +30,24 @@ public class IrisMatterTranslate { @Desc("Define an absolute shift instead of varied.") private int z = 0; - public int xOffset(IrisData data, RNG rng, int rx, int rz) - { - if(rangeX != null) - { + public int xOffset(IrisData data, RNG rng, int rx, int rz) { + if (rangeX != null) { return (int) Math.round(rangeX.get(rng, rx, rz, data)); } return x; } - public int yOffset(IrisData data, RNG rng, int rx, int rz) - { - if(rangeY != null) - { + public int yOffset(IrisData data, RNG rng, int rx, int rz) { + if (rangeY != null) { return (int) Math.round(rangeY.get(rng, rx, rz, data)); } return y; } - public int zOffset(IrisData data, RNG rng, int rx, int rz) - { - if(rangeZ != null) - { + public int zOffset(IrisData data, RNG rng, int rx, int rz) { + if (rangeZ != null) { return (int) Math.round(rangeZ.get(rng, rx, rz, data)); } diff --git a/src/main/java/com/volmit/iris/engine/platform/BukkitChunkGenerator.java b/src/main/java/com/volmit/iris/engine/platform/BukkitChunkGenerator.java index 29cc2bc2a..d83f3bb2e 100644 --- a/src/main/java/com/volmit/iris/engine/platform/BukkitChunkGenerator.java +++ b/src/main/java/com/volmit/iris/engine/platform/BukkitChunkGenerator.java @@ -84,6 +84,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun private final ChronoLatch hotloadChecker; private final AtomicBoolean setup; private final boolean studio; + private final AtomicInteger a = new AtomicInteger(0); private Engine engine; private Looper hotloader; private StudioMode lastMode; @@ -106,11 +107,25 @@ public BukkitChunkGenerator(IrisWorld world, boolean studio, File dataLocation, Bukkit.getServer().getPluginManager().registerEvents(this, Iris.instance); } + private static Field getField(Class clazz, String fieldName) + throws NoSuchFieldException { + try { + return clazz.getDeclaredField(fieldName); + } catch (NoSuchFieldException e) { + Class superClass = clazz.getSuperclass(); + if (superClass == null) { + throw e; + } else { + return getField(superClass, fieldName); + } + } + } + @EventHandler public void onWorldInit(WorldInitEvent event) { try { - if(world.name().equals(event.getWorld().getName()) && world.getRawWorldSeed() == event.getWorld().getSeed()) { - ServerLevel serverLevel = ((CraftWorld)event.getWorld()).getHandle(); + if (world.name().equals(event.getWorld().getName()) && world.getRawWorldSeed() == event.getWorld().getSeed()) { + ServerLevel serverLevel = ((CraftWorld) event.getWorld()).getHandle(); Engine engine = getEngine(event.getWorld()); Class clazz = serverLevel.getChunkSource().chunkMap.generator.getClass(); Field biomeSource = getField(clazz, "c"); @@ -122,41 +137,23 @@ public void onWorldInit(WorldInitEvent event) { unsafe.putObject(biomeSource.get(serverLevel.getChunkSource().chunkMap.generator), unsafe.objectFieldOffset(biomeSource), customBiomeSource); biomeSource.set(serverLevel.getChunkSource().chunkMap.generator, customBiomeSource); Iris.info("Injected Iris Biome Source into " + event.getWorld().getName()); - } - - else { + } else { Iris.info("World " + event.getWorld().getName() + " is not an Iris world in this context"); } - } - - catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } - private static Field getField(Class clazz, String fieldName) - throws NoSuchFieldException { - try { - return clazz.getDeclaredField(fieldName); - } catch (NoSuchFieldException e) { - Class superClass = clazz.getSuperclass(); - if (superClass == null) { - throw e; - } else { - return getField(superClass, fieldName); - } - } - } - private void setupEngine() { IrisData data = IrisData.get(dataLocation); IrisDimension dimension = data.getDimensionLoader().load(dimensionKey); - if(dimension == null) { + if (dimension == null) { Iris.error("Oh No! There's no pack in " + data.getDataFolder().getPath() + " or... there's no dimension for the key " + dimensionKey); IrisDimension test = IrisData.loadAnyDimension(dimensionKey); - if(test != null) { + if (test != null) { Iris.warn("Looks like " + dimensionKey + " exists in " + test.getLoadFile().getPath() + " "); Iris.service(StudioSVC.class).installIntoWorld(Iris.getSender(), dimensionKey, dataLocation.getParentFile().getParentFile()); Iris.warn("Attempted to install into " + data.getDataFolder().getPath()); @@ -164,7 +161,7 @@ private void setupEngine() { data.clearLists(); test = data.getDimensionLoader().load(dimensionKey); - if(test != null) { + if (test != null) { Iris.success("Woo! Patched the Engine!"); dimension = test; } else { @@ -194,14 +191,14 @@ public void injectChunkReplacement(World world, int x, int z, Consumer getEngine().generate(x << 4, z << 4, blocks, biomes, true); Iris.debug("Regenerated " + x + " " + z); int t = 0; - for(int i = getEngine().getHeight() >> 4; i >= 0; i--) { - if(!world.isChunkLoaded(x, z)) { + for (int i = getEngine().getHeight() >> 4; i >= 0; i--) { + if (!world.isChunkLoaded(x, z)) { continue; } Chunk c = world.getChunkAt(x, z); - for(Entity ee : c.getEntities()) { - if(ee instanceof Player) { + for (Entity ee : c.getEntities()) { + if (ee instanceof Player) { continue; } @@ -213,14 +210,14 @@ public void injectChunkReplacement(World world, int x, int z, Consumer int finalI = i; jobs.accept(() -> { - for(int xx = 0; xx < 16; xx++) { - for(int yy = 0; yy < 16; yy++) { - for(int zz = 0; zz < 16; zz++) { - if(yy + (finalI << 4) >= engine.getHeight() || yy + (finalI << 4) < 0) { + for (int xx = 0; xx < 16; xx++) { + for (int yy = 0; yy < 16; yy++) { + for (int zz = 0; zz < 16; zz++) { + if (yy + (finalI << 4) >= engine.getHeight() || yy + (finalI << 4) < 0) { continue; } c.getBlock(xx, yy + (finalI << 4) + world.getMinHeight(), zz) - .setBlockData(tc.getBlockData(xx, yy + (finalI << 4) + world.getMinHeight(), zz), false); + .setBlockData(tc.getBlockData(xx, yy + (finalI << 4) + world.getMinHeight(), zz), false); } } } @@ -228,7 +225,7 @@ public void injectChunkReplacement(World world, int x, int z, Consumer } loadLock.release(); - } catch(Throwable e) { + } catch (Throwable e) { loadLock.release(); Iris.error("======================================"); e.printStackTrace(); @@ -237,8 +234,8 @@ public void injectChunkReplacement(World world, int x, int z, Consumer ChunkData d = Bukkit.createChunkData(world); - for(int i = 0; i < 16; i++) { - for(int j = 0; j < 16; j++) { + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { d.setBlock(i, 0, j, Material.RED_GLAZED_TERRACOTTA.createBlockData()); } } @@ -246,14 +243,13 @@ public void injectChunkReplacement(World world, int x, int z, Consumer } private Engine getEngine(WorldInfo world) { - if(setup.get()) { + if (setup.get()) { return getEngine(); } lock.lock(); - if(setup.get()) - { + if (setup.get()) { return getEngine(); } @@ -264,7 +260,7 @@ private Engine getEngine(WorldInfo world) { this.hotloader = studio ? new Looper() { @Override protected long loop() { - if(hotloadChecker.flip()) { + if (hotloadChecker.flip()) { folder.check(); } @@ -272,7 +268,7 @@ protected long loop() { } } : null; - if(studio) { + if (studio) { hotloader.setPriority(Thread.MIN_PRIORITY); hotloader.start(); hotloader.setName(getTarget().getWorld().name() + " Hotloader"); @@ -286,7 +282,7 @@ protected long loop() { @Override public void close() { withExclusiveControl(() -> { - if(isStudio()) { + if (isStudio()) { hotloader.interrupt(); } @@ -304,7 +300,7 @@ public boolean isStudio() { @Override public void hotload() { - if(!isStudio()) { + if (!isStudio()) { return; } @@ -317,7 +313,7 @@ public void withExclusiveControl(Runnable r) { loadLock.acquire(LOAD_LOCKS); r.run(); loadLock.release(LOAD_LOCKS); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } }); @@ -328,8 +324,6 @@ public void touch(World world) { getEngine(world); } - private final AtomicInteger a = new AtomicInteger(0); - @Override public void generateNoise(@NotNull WorldInfo world, @NotNull Random random, int x, int z, @NotNull ChunkGenerator.ChunkData d) { try { @@ -337,7 +331,7 @@ public void generateNoise(@NotNull WorldInfo world, @NotNull Random random, int computeStudioGenerator(); TerrainChunk tc = TerrainChunk.create(d, new IrisBiomeStorage()); this.world.bind(world); - if(studioGenerator != null) { + if (studioGenerator != null) { studioGenerator.generateChunk(getEngine(), tc, x, z); } else { ChunkDataHunkHolder blocks = new ChunkDataHunkHolder(tc); @@ -348,14 +342,14 @@ public void generateNoise(@NotNull WorldInfo world, @NotNull Random random, int } Iris.debug("Generated " + x + " " + z); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("======================================"); e.printStackTrace(); Iris.reportErrorChunk(x, z, e, "CHUNK"); Iris.error("======================================"); - for(int i = 0; i < 16; i++) { - for(int j = 0; j < 16; j++) { + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { d.setBlock(i, 0, j, Material.RED_GLAZED_TERRACOTTA.createBlockData()); } } @@ -368,7 +362,7 @@ public int getBaseHeight(@NotNull WorldInfo worldInfo, @NotNull Random random, i } private void computeStudioGenerator() { - if(!getEngine().getDimension().getStudioMode().equals(lastMode)) { + if (!getEngine().getDimension().getStudioMode().equals(lastMode)) { lastMode = getEngine().getDimension().getStudioMode(); getEngine().getDimension().getStudioMode().inject(this); } diff --git a/src/main/java/com/volmit/iris/engine/platform/studio/generators/BiomeBuffetGenerator.java b/src/main/java/com/volmit/iris/engine/platform/studio/generators/BiomeBuffetGenerator.java index 1fb2a8c97..4e2c661d5 100644 --- a/src/main/java/com/volmit/iris/engine/platform/studio/generators/BiomeBuffetGenerator.java +++ b/src/main/java/com/volmit/iris/engine/platform/studio/generators/BiomeBuffetGenerator.java @@ -46,11 +46,11 @@ public BiomeBuffetGenerator(Engine engine, int biomeSize) { public void generateChunk(Engine engine, TerrainChunk tc, int x, int z) throws WrongEngineBroException { int id = Cache.to1D(x / biomeSize, 0, z / biomeSize, width, 1); - if(id >= 0 && id < biomes.length) { + if (id >= 0 && id < biomes.length) { IrisBiome biome = biomes[id]; String foc = engine.getDimension().getFocus(); - if(!Objects.equals(foc, biome.getLoadKey())) { + if (!Objects.equals(foc, biome.getLoadKey())) { engine.getDimension().setFocus(biome.getLoadKey()); engine.hotloadComplex(); } diff --git a/src/main/java/com/volmit/iris/util/atomics/AtomicAverage.java b/src/main/java/com/volmit/iris/util/atomics/AtomicAverage.java index 2800f5ba2..cf9da6d1c 100644 --- a/src/main/java/com/volmit/iris/util/atomics/AtomicAverage.java +++ b/src/main/java/com/volmit/iris/util/atomics/AtomicAverage.java @@ -40,8 +40,7 @@ public class AtomicAverage { /** * Create an average holder * - * @param size - * the size of entries to keep + * @param size the size of entries to keep */ public AtomicAverage(int size) { values = new AtomicDoubleArray(size); @@ -56,15 +55,14 @@ public AtomicAverage(int size) { /** * Put a value into the average (rolls over if full) * - * @param i - * the value + * @param i the value */ public void put(double i) { try { dirty = true; - if(brandNew) { + if (brandNew) { DoubleArrayUtils.fill(values, i); lastSum = size() * i; brandNew = false; @@ -75,7 +73,7 @@ public void put(double i) { lastSum = (lastSum - current) + i; values.set(cursor, i); cursor = cursor + 1 < size() ? cursor + 1 : 0; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -87,7 +85,7 @@ public void put(double i) { * @return the average */ public double getAverage() { - if(dirty) { + if (dirty) { calculateAverage(); return getAverage(); } diff --git a/src/main/java/com/volmit/iris/util/atomics/AtomicRollingSequence.java b/src/main/java/com/volmit/iris/util/atomics/AtomicRollingSequence.java index b05850c2d..821f52eaf 100644 --- a/src/main/java/com/volmit/iris/util/atomics/AtomicRollingSequence.java +++ b/src/main/java/com/volmit/iris/util/atomics/AtomicRollingSequence.java @@ -40,7 +40,7 @@ public AtomicRollingSequence(int size) { public double addLast(int amt) { double f = 0; - for(int i = 0; i < Math.min(values.length(), amt); i++) { + for (int i = 0; i < Math.min(values.length(), amt); i++) { f += values.get(i); } @@ -56,7 +56,7 @@ public void setPrecision(boolean p) { } public double getMin() { - if(dirtyExtremes > (isPrecision() ? 0 : values.length())) { + if (dirtyExtremes > (isPrecision() ? 0 : values.length())) { resetExtremes(); } @@ -64,7 +64,7 @@ public double getMin() { } public double getMax() { - if(dirtyExtremes > (isPrecision() ? 0 : values.length())) { + if (dirtyExtremes > (isPrecision() ? 0 : values.length())) { resetExtremes(); } @@ -72,7 +72,7 @@ public double getMax() { } public double getMedian() { - if(dirtyMedian) { + if (dirtyMedian) { recalculateMedian(); } @@ -88,7 +88,7 @@ public void resetExtremes() { max = Integer.MIN_VALUE; min = Integer.MAX_VALUE; - for(int i = 0; i < values.length(); i++) { + for (int i = 0; i < values.length(); i++) { double v = values.get(i); max = M.max(max, v); min = M.min(min, v); diff --git a/src/main/java/com/volmit/iris/util/board/Board.java b/src/main/java/com/volmit/iris/util/board/Board.java index daf535658..eb37ef182 100644 --- a/src/main/java/com/volmit/iris/util/board/Board.java +++ b/src/main/java/com/volmit/iris/util/board/Board.java @@ -78,47 +78,47 @@ public void remove() { public void update() { // Checking if we are ready to start updating the Scoreboard. - if(!ready) { + if (!ready) { return; } // Making sure the player is connected. - if(!player.isOnline()) { + if (!player.isOnline()) { remove(); return; } // Making sure the Scoreboard Provider is set. - if(boardSettings == null) { + if (boardSettings == null) { return; } // Getting their Scoreboard display from the Scoreboard Provider. final List entries = boardSettings.getBoardProvider().getLines(player).stream().map(APPLY_COLOR_TRANSLATION).collect(Collectors.toList()); - if(boardSettings.getScoreDirection() == ScoreDirection.UP) { + if (boardSettings.getScoreDirection() == ScoreDirection.UP) { Collections.reverse(entries); } // Setting the Scoreboard title String title = boardSettings.getBoardProvider().getTitle(player); - if(title.length() > 32) { + if (title.length() > 32) { Bukkit.getLogger().warning("The title " + title + " is over 32 characters in length, substringing to prevent errors."); title = title.substring(0, 32); } objective.setDisplayName(C.translateAlternateColorCodes('&', title)); // Clearing previous Scoreboard values if entry sizes don't match. - if(this.getScoreboard().getEntries().size() != entries.size()) + if (this.getScoreboard().getEntries().size() != entries.size()) this.getScoreboard().getEntries().forEach(this::removeEntry); // Setting Scoreboard lines. - for(int i = 0; i < entries.size(); i++) { + for (int i = 0; i < entries.size(); i++) { String str = entries.get(i); BoardEntry entry = BoardEntry.translateToEntry(str); Team team = getScoreboard().getTeam(CACHED_ENTRIES[i]); - if(team == null) { + if (team == null) { team = this.getScoreboard().registerNewTeam(CACHED_ENTRIES[i]); team.addEntry(team.getName()); } @@ -126,7 +126,7 @@ public void update() { team.setPrefix(entry.getPrefix()); team.setSuffix(entry.getSuffix()); - switch(boardSettings.getScoreDirection()) { + switch (boardSettings.getScoreDirection()) { case UP -> objective.getScore(team.getName()).setScore(1 + i); case DOWN -> objective.getScore(team.getName()).setScore(15 - i); } diff --git a/src/main/java/com/volmit/iris/util/board/BoardEntry.java b/src/main/java/com/volmit/iris/util/board/BoardEntry.java index cd252b3bd..14b7f3d71 100644 --- a/src/main/java/com/volmit/iris/util/board/BoardEntry.java +++ b/src/main/java/com/volmit/iris/util/board/BoardEntry.java @@ -38,16 +38,16 @@ private BoardEntry(final String prefix, final String suffix) { } public static BoardEntry translateToEntry(String input) { - if(input.isEmpty()) { + if (input.isEmpty()) { return new BoardEntry("", ""); } - if(input.length() <= 16) { + if (input.length() <= 16) { return new BoardEntry(input, ""); } else { String prefix = input.substring(0, 16); String suffix = ""; - if(prefix.endsWith("\u00a7")) { + if (prefix.endsWith("\u00a7")) { prefix = prefix.substring(0, prefix.length() - 1); suffix = "\u00a7" + suffix; } diff --git a/src/main/java/com/volmit/iris/util/board/BoardManager.java b/src/main/java/com/volmit/iris/util/board/BoardManager.java index c9989cf67..fe61666de 100644 --- a/src/main/java/com/volmit/iris/util/board/BoardManager.java +++ b/src/main/java/com/volmit/iris/util/board/BoardManager.java @@ -65,7 +65,7 @@ public Optional getBoard(Player player) { public void setup(Player player) { Optional.ofNullable(scoreboards.remove(player.getUniqueId())).ifPresent(Board::resetScoreboard); - if(player.getScoreboard().equals(Bukkit.getScoreboardManager().getMainScoreboard())) { + if (player.getScoreboard().equals(Bukkit.getScoreboardManager().getMainScoreboard())) { player.setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard()); } scoreboards.put(player.getUniqueId(), new Board(player, boardSettings)); diff --git a/src/main/java/com/volmit/iris/util/cache/ArrayCache.java b/src/main/java/com/volmit/iris/util/cache/ArrayCache.java index 30fe51778..e8d73dd62 100644 --- a/src/main/java/com/volmit/iris/util/cache/ArrayCache.java +++ b/src/main/java/com/volmit/iris/util/cache/ArrayCache.java @@ -24,6 +24,18 @@ import java.io.IOException; public interface ArrayCache extends Writable { + static int zigZag(int coord, int size) { + if (coord < 0) { + coord = Math.abs(coord); + } + + if (coord % (size * 2) >= size) { + return (size) - (coord % size) - 1; + } else { + return coord % size; + } + } + T get(int i); void set(int i, T t); @@ -36,44 +48,20 @@ public interface ArrayCache extends Writable { void writeCache(DataOutputStream dos) throws IOException; - static int zigZag(int coord, int size) - { - if(coord < 0) - { - coord = Math.abs(coord); - } - - if(coord % (size * 2) >= size) - { - return (size) - (coord % size) - 1; - } - - else { - return coord % size; - } - } - - default void set(int x, int y, T v) - { + default void set(int x, int y, T v) { set((zigZag(y, getHeight()) * getWidth()) + zigZag(x, getWidth()), v); } - default T get(int x, int y) - { - try - { + default T get(int x, int y) { + try { return get((zigZag(y, getHeight()) * getWidth()) + zigZag(x, getWidth())); - } - - catch(Throwable e) - { + } catch (Throwable e) { e.printStackTrace(); throw e; } } - default void iset(int x, int y, int v) - { + default void iset(int x, int y, int v) { iset((zigZag(y, getHeight()) * getWidth()) + zigZag(x, getWidth()), v); } } diff --git a/src/main/java/com/volmit/iris/util/cache/ByteCache.java b/src/main/java/com/volmit/iris/util/cache/ByteCache.java index 7c9421b3a..6aba0b88a 100644 --- a/src/main/java/com/volmit/iris/util/cache/ByteCache.java +++ b/src/main/java/com/volmit/iris/util/cache/ByteCache.java @@ -31,21 +31,18 @@ public class ByteCache implements ArrayCache { private final int height; private final byte[] cache; - public ByteCache(int width, int height) - { + public ByteCache(int width, int height) { this.width = width; this.height = height; cache = new byte[width * height]; } - public void set(int i, Integer v) - { + public void set(int i, Integer v) { cache[i] = v.byteValue(); } - public Integer get(int i) - { - return (int)cache[i]; + public Integer get(int i) { + return (int) cache[i]; } @Override @@ -53,8 +50,7 @@ public void writeCache(DataOutputStream dos) throws IOException { dos.writeInt(width); dos.writeInt(height); - for(int i = 0; i < width * height; i++) - { + for (int i = 0; i < width * height; i++) { dos.writeByte(get(i)); } } diff --git a/src/main/java/com/volmit/iris/util/cache/ChunkCache2D.java b/src/main/java/com/volmit/iris/util/cache/ChunkCache2D.java index fa7c94f2c..f048926c3 100644 --- a/src/main/java/com/volmit/iris/util/cache/ChunkCache2D.java +++ b/src/main/java/com/volmit/iris/util/cache/ChunkCache2D.java @@ -15,7 +15,7 @@ public T get(int x, int z, Function2 resolver) { int key = ((z & 15) * 16) + (x & 15); T t = cache.get(key); - if(t == null) { + if (t == null) { t = resolver.apply(x, z); cache.set(key, t); } diff --git a/src/main/java/com/volmit/iris/util/cache/DataBitCache.java b/src/main/java/com/volmit/iris/util/cache/DataBitCache.java index 9e9479707..ee334dff0 100644 --- a/src/main/java/com/volmit/iris/util/cache/DataBitCache.java +++ b/src/main/java/com/volmit/iris/util/cache/DataBitCache.java @@ -31,20 +31,17 @@ public abstract class DataBitCache implements ArrayCache { private final int height; private final DataContainer cache; - public DataBitCache(int width, int height) - { + public DataBitCache(int width, int height) { this.width = width; this.height = height; cache = new DataContainer<>(this, width * height); } - public void set(int i, T v) - { + public void set(int i, T v) { cache.set(i, v); } - public T get(int i) - { + public T get(int i) { return cache.get(i); } diff --git a/src/main/java/com/volmit/iris/util/cache/FloatBitCache.java b/src/main/java/com/volmit/iris/util/cache/FloatBitCache.java index 4d0473dfc..3c2849191 100644 --- a/src/main/java/com/volmit/iris/util/cache/FloatBitCache.java +++ b/src/main/java/com/volmit/iris/util/cache/FloatBitCache.java @@ -39,6 +39,6 @@ public void writeNodeData(DataOutputStream dos, Float integer) throws IOExceptio @Override public void iset(int i, int v) { - set(i, (float)v); + set(i, (float) v); } } diff --git a/src/main/java/com/volmit/iris/util/cache/FloatCache.java b/src/main/java/com/volmit/iris/util/cache/FloatCache.java index a0ece2311..a41d8f605 100644 --- a/src/main/java/com/volmit/iris/util/cache/FloatCache.java +++ b/src/main/java/com/volmit/iris/util/cache/FloatCache.java @@ -36,27 +36,23 @@ public FloatCache(File file) throws IOException { public FloatCache(DataInputStream din) throws IOException { this(din.readInt(), din.readInt()); - for(int i = 0; i < width * height; i++) - { + for (int i = 0; i < width * height; i++) { cache[i] = din.readFloat(); } din.close(); } - public FloatCache(int width, int height) - { + public FloatCache(int width, int height) { this.width = width; this.height = height; cache = new float[width * height]; } - public void set(int i, Float v) - { + public void set(int i, Float v) { cache[i] = v; } - public Float get(int i) - { + public Float get(int i) { return cache[i]; } @@ -65,8 +61,7 @@ public void writeCache(DataOutputStream dos) throws IOException { dos.writeInt(width); dos.writeInt(height); - for(int i = 0; i < width * height; i++) - { + for (int i = 0; i < width * height; i++) { dos.writeFloat(get(i)); } } diff --git a/src/main/java/com/volmit/iris/util/cache/IntCache.java b/src/main/java/com/volmit/iris/util/cache/IntCache.java index 482357027..7e97484a3 100644 --- a/src/main/java/com/volmit/iris/util/cache/IntCache.java +++ b/src/main/java/com/volmit/iris/util/cache/IntCache.java @@ -31,20 +31,17 @@ public class IntCache implements ArrayCache { private final int height; private final int[] cache; - public IntCache(int width, int height) - { + public IntCache(int width, int height) { this.width = width; this.height = height; cache = new int[width * height]; } - public void set(int i, Integer v) - { + public void set(int i, Integer v) { cache[i] = v; } - public Integer get(int i) - { + public Integer get(int i) { return cache[i]; } @@ -53,8 +50,7 @@ public void writeCache(DataOutputStream dos) throws IOException { dos.writeInt(width); dos.writeInt(height); - for(int i = 0; i < width * height; i++) - { + for (int i = 0; i < width * height; i++) { dos.writeInt(get(i)); } } diff --git a/src/main/java/com/volmit/iris/util/cache/ShortCache.java b/src/main/java/com/volmit/iris/util/cache/ShortCache.java index b25f3981d..4b0ee84bf 100644 --- a/src/main/java/com/volmit/iris/util/cache/ShortCache.java +++ b/src/main/java/com/volmit/iris/util/cache/ShortCache.java @@ -31,20 +31,17 @@ public class ShortCache implements ArrayCache { private final int height; private final short[] cache; - public ShortCache(int width, int height) - { + public ShortCache(int width, int height) { this.width = width; this.height = height; cache = new short[width * height]; } - public void set(int i, Short v) - { + public void set(int i, Short v) { cache[i] = v; } - public Short get(int i) - { + public Short get(int i) { return cache[i]; } @@ -53,8 +50,7 @@ public void writeCache(DataOutputStream dos) throws IOException { dos.writeInt(width); dos.writeInt(height); - for(int i = 0; i < width * height; i++) - { + for (int i = 0; i < width * height; i++) { dos.writeShort(get(i)); } } diff --git a/src/main/java/com/volmit/iris/util/collection/GBiset.java b/src/main/java/com/volmit/iris/util/collection/GBiset.java index 19beaaded..80a252ee2 100644 --- a/src/main/java/com/volmit/iris/util/collection/GBiset.java +++ b/src/main/java/com/volmit/iris/util/collection/GBiset.java @@ -24,10 +24,8 @@ /** * A Biset * - * @param - * the first object type - * @param - * the second object type + * @param the first object type + * @param the second object type * @author cyberpwn */ @SuppressWarnings("hiding") @@ -39,10 +37,8 @@ public class GBiset implements Serializable { /** * Create a new Biset * - * @param a - * the first object - * @param b - * the second object + * @param a the first object + * @param b the second object */ public GBiset(A a, B b) { this.a = a; @@ -61,8 +57,7 @@ public A getA() { /** * Set the first object * - * @param a - * the first object A + * @param a the first object A */ public void setA(A a) { this.a = a; diff --git a/src/main/java/com/volmit/iris/util/collection/GListAdapter.java b/src/main/java/com/volmit/iris/util/collection/GListAdapter.java index 2ca4ddbc6..9869f4859 100644 --- a/src/main/java/com/volmit/iris/util/collection/GListAdapter.java +++ b/src/main/java/com/volmit/iris/util/collection/GListAdapter.java @@ -24,27 +24,24 @@ /** * Adapts a list of objects into a list of other objects * - * @param - * the from object in lists (the item INSIDE the list) - * @param - * the to object in lists (the item INSIDE the list) + * @param the from object in lists (the item INSIDE the list) + * @param the to object in lists (the item INSIDE the list) * @author cyberpwn */ public abstract class GListAdapter { /** * Adapts a list of FROM to a list of TO * - * @param from - * the from list + * @param from the from list * @return the to list */ public List adapt(List from) { List adapted = new KList<>(); - for(FROM i : from) { + for (FROM i : from) { TO t = onAdapt(i); - if(t != null) { + if (t != null) { adapted.add(onAdapt(i)); } } @@ -55,8 +52,7 @@ public List adapt(List from) { /** * Adapts a list object FROM to TO for use with the adapt method * - * @param from - * the from object + * @param from the from object * @return the to object */ public abstract TO onAdapt(FROM from); diff --git a/src/main/java/com/volmit/iris/util/collection/KList.java b/src/main/java/com/volmit/iris/util/collection/KList.java index c077ea46d..573a5e552 100644 --- a/src/main/java/com/volmit/iris/util/collection/KList.java +++ b/src/main/java/com/volmit/iris/util/collection/KList.java @@ -58,7 +58,7 @@ public KList(Enumeration e) { public static KList fromJSONAny(JSONArray oo) { KList s = new KList(); - for(int i = 0; i < oo.length(); i++) { + for (int i = 0; i < oo.length(); i++) { s.add(oo.get(i).toString()); } @@ -68,7 +68,7 @@ public static KList fromJSONAny(JSONArray oo) { public static KList asStringList(List oo) { KList s = new KList(); - for(Object i : oo) { + for (Object i : oo) { s.add(i.toString()); } @@ -90,13 +90,13 @@ public KList removeLast() { } public void addMultiple(T t, int c) { - for(int i = 0; i < c; i++) { + for (int i = 0; i < c; i++) { add(t); } } private KList add(Enumeration e) { - while(e.hasMoreElements()) { + while (e.hasMoreElements()) { add(e.nextElement()); } @@ -113,10 +113,8 @@ public KList add(Collection values) { * returned map. You must specify each key for each value in this list. In the * function, returning null will not add the keyval pair. * - * @param - * the inferred key type - * @param f - * the function + * @param the inferred key type + * @param f the function * @return the new map */ public KMap asValues(Function f) { @@ -130,10 +128,8 @@ public KMap asValues(Function f) { * returned map. You must specify each value for each key in this list. In the * function, returning null will not add the keyval pair. * - * @param - * the inferred value type - * @param f - * the function + * @param the inferred value type + * @param f the function * @return the new map */ public KMap asKeys(Function f) { @@ -145,8 +141,7 @@ public KMap asKeys(Function f) { /** * Cut this list into targetCount sublists * - * @param targetCount - * the target count of sublists + * @param targetCount the target count of sublists * @return the list of sublists */ public KList> divide(int targetCount) { @@ -157,8 +152,7 @@ public KList> divide(int targetCount) { * Split this list into a list of sublists with roughly targetSize elements of T * per sublist * - * @param targetSize - * the target size + * @param targetSize the target size * @return the list of sublists */ public KList> split(int targetSize) { @@ -166,8 +160,8 @@ public KList> split(int targetSize) { KList> gg = new KList<>(); KList b = new KList<>(); - for(T i : this) { - if(b.size() >= targetSize) { + for (T i : this) { + if (b.size() >= targetSize) { gg.add(b.copy()); b.clear(); } @@ -175,7 +169,7 @@ public KList> split(int targetSize) { b.add(i); } - if(!b.isEmpty()) { + if (!b.isEmpty()) { gg.add(b); } @@ -186,15 +180,14 @@ public KList> split(int targetSize) { * Rewrite this list by checking each value and changing the value (or not). * Return null to remove the element in the function * - * @param t - * the function + * @param t the function * @return the same list (not a copy) */ public KList rewrite(Function t) { KList m = copy(); clear(); - for(T i : m) { + for (T i : m) { addNonNull(t.apply(i)); } @@ -263,22 +256,21 @@ public String toString() { /** * Tostring with a seperator for each item in the list * - * @param split - * the seperator + * @param split the seperator * @return the string representing this object */ public String toString(String split) { - if(isEmpty()) { + if (isEmpty()) { return ""; } - if(size() == 1) { + if (size() == 1) { return get(0) + ""; } StringBuilder b = new StringBuilder(); - for(String i : toStringList()) { + for (String i : toStringList()) { b.append(split).append(i == null ? "null" : i); } @@ -297,12 +289,9 @@ public KList toStringList() { /** * Add the contents of the given list (v) into this list using a converter * - * @param - * the type of the forign list - * @param v - * the forign (given) list - * @param converter - * the converter that converts the forign type into this list type + * @param the type of the forign list + * @param v the forign (given) list + * @param converter the converter that converts the forign type into this list type * @return this list (builder) */ public KList addFrom(List v, Function converter) { @@ -321,8 +310,8 @@ public KList convert(Function converter) { } public KList removeWhere(Predicate t) { - for(T i : copy()) { - if(t.test(i)) { + for (T i : copy()) { + if (t.test(i)) { remove(i); } } @@ -333,12 +322,11 @@ public KList removeWhere(Predicate t) { /** * Adds T to the list, ignores if null * - * @param t - * the value to add + * @param t the value to add * @return the same list */ public KList addNonNull(T t) { - if(t != null) { + if (t != null) { super.add(t); } @@ -349,10 +337,8 @@ public KList addNonNull(T t) { * Swaps the values of index a and b. For example "hello", "world", "!" swap(1, * 2) would change the list to "hello", "!", "world" * - * @param a - * the first index - * @param b - * the second index + * @param a the first index + * @param b the second index * @return the same list (builder), not a copy */ public KList swapIndexes(int a, int b) { @@ -368,13 +354,12 @@ public KList swapIndexes(int a, int b) { /** * Remove a number of elements from the list * - * @param t - * the elements + * @param t the elements * @return this list */ @SuppressWarnings("unchecked") public KList remove(T... t) { - for(T i : t) { + for (T i : t) { super.remove(i); } @@ -384,8 +369,7 @@ public KList remove(T... t) { /** * Add another glist's contents to this one (addall builder) * - * @param t - * the list + * @param t the list * @return the same list */ public KList add(KList t) { @@ -396,13 +380,12 @@ public KList add(KList t) { /** * Add a number of values to this list * - * @param t - * the list + * @param t the list * @return this list */ @SuppressWarnings("unchecked") public KList add(T... t) { - for(T i : t) { + for (T i : t) { super.add(i); } @@ -412,8 +395,7 @@ public KList add(T... t) { /** * Check if this list has an index at the given index * - * @param index - * the given index + * @param index the given index * @return true if size > index */ public boolean hasIndex(int index) { @@ -473,7 +455,7 @@ public boolean isNotEmpty() { * @return the popped off item or null if the list is empty */ public T pop() { - if(isEmpty()) { + if (isEmpty()) { return null; } @@ -486,7 +468,7 @@ public T pop() { * @return the popped off item or null if the list is empty */ public T popLast() { - if(isEmpty()) { + if (isEmpty()) { return null; } @@ -494,11 +476,11 @@ public T popLast() { } public T popRandom() { - if(isEmpty()) { + if (isEmpty()) { return null; } - if(size() == 1) { + if (size() == 1) { return pop(); } @@ -506,11 +488,11 @@ public T popRandom() { } public T popRandom(RNG rng) { - if(isEmpty()) { + if (isEmpty()) { return null; } - if(size() == 1) { + if (size() == 1) { return pop(); } @@ -520,7 +502,7 @@ public T popRandom(RNG rng) { public KList sub(int f, int t) { KList g = new KList<>(); - for(int i = f; i < M.min(size(), t); i++) { + for (int i = f; i < M.min(size(), t); i++) { g.add(get(i)); } @@ -530,7 +512,7 @@ public KList sub(int f, int t) { public JSONArray toJSONStringArray() { JSONArray j = new JSONArray(); - for(Object i : this) { + for (Object i : this) { j.put(i.toString()); } @@ -539,7 +521,7 @@ public JSONArray toJSONStringArray() { @SuppressWarnings("unchecked") public KList forceAdd(Object[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -548,7 +530,7 @@ public KList forceAdd(Object[] values) { @SuppressWarnings("unchecked") public KList forceAdd(int[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -557,7 +539,7 @@ public KList forceAdd(int[] values) { @SuppressWarnings("unchecked") public KList forceAdd(double[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -566,7 +548,7 @@ public KList forceAdd(double[] values) { @SuppressWarnings("unchecked") public KList forceAdd(AtomicDoubleArray values) { - for(int i = 0; i < values.length(); i++) { + for (int i = 0; i < values.length(); i++) { add((T) ((Object) values.get(i))); } @@ -575,7 +557,7 @@ public KList forceAdd(AtomicDoubleArray values) { @SuppressWarnings("unchecked") public KList forceAdd(float[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -584,7 +566,7 @@ public KList forceAdd(float[] values) { @SuppressWarnings("unchecked") public KList forceAdd(byte[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -593,7 +575,7 @@ public KList forceAdd(byte[] values) { @SuppressWarnings("unchecked") public KList forceAdd(short[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -602,7 +584,7 @@ public KList forceAdd(short[] values) { @SuppressWarnings("unchecked") public KList forceAdd(long[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -611,7 +593,7 @@ public KList forceAdd(long[] values) { @SuppressWarnings("unchecked") public KList forceAdd(boolean[] values) { - for(Object i : values) { + for (Object i : values) { add((T) i); } @@ -627,11 +609,11 @@ private int middleIndex() { } public T getRandom() { - if(isEmpty()) { + if (isEmpty()) { return null; } - if(size() == 1) { + if (size() == 1) { return get(0); } @@ -641,8 +623,8 @@ public T getRandom() { public KList popRandom(RNG rng, int c) { KList m = new KList<>(); - for(int i = 0; i < c; i++) { - if(isEmpty()) { + for (int i = 0; i < c; i++) { + if (isEmpty()) { break; } @@ -653,11 +635,11 @@ public KList popRandom(RNG rng, int c) { } public T getRandom(RNG rng) { - if(isEmpty()) { + if (isEmpty()) { return null; } - if(size() == 1) { + if (size() == 1) { return get(0); } @@ -688,7 +670,7 @@ public KList removeDuplicates() { } public boolean addIfMissing(T t) { - if(!contains(t)) { + if (!contains(t)) { add(t); return true; } @@ -697,8 +679,8 @@ public boolean addIfMissing(T t) { } public void addAllIfMissing(KList t) { - for(T i : t) { - if(!contains(i)) { + for (T i : t) { + if (!contains(i)) { add(i); } } diff --git a/src/main/java/com/volmit/iris/util/collection/KMap.java b/src/main/java/com/volmit/iris/util/collection/KMap.java index 443cc0cb7..06fc14568 100644 --- a/src/main/java/com/volmit/iris/util/collection/KMap.java +++ b/src/main/java/com/volmit/iris/util/collection/KMap.java @@ -43,8 +43,8 @@ public KMap(Map gMap) { } public K getKey(V value) { - for(KeyPair i : keypair()) { - if(i.getV().equals(value)) { + for (KeyPair i : keypair()) { + if (i.getV().equals(value)) { return i.getK(); } } @@ -56,12 +56,9 @@ public K getKey(V value) { * Puts a value into a map-value-list based on the key such that if GMap> where V is GList * - * @param - * the list type in the value type - * @param k - * the key to look for - * @param vs - * the values to put into the list of the given key + * @param the list type in the value type + * @param k the key to look for + * @param vs the values to put into the list of the given key * @return the same list (builder) */ @SuppressWarnings("unchecked") @@ -69,12 +66,12 @@ public KMap putValueList(K k, S... vs) { try { KMap> s = (KMap>) this; - if(!s.containsKey(k)) { + if (!s.containsKey(k)) { s.put(k, new KList()); } s.get(k).add(vs); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -99,9 +96,9 @@ public int compare(V v, V t1) { } }); - for(V i : v) { - for(K j : k()) { - if(get(j).equals(i)) { + for (V i : v) { + for (K j : k()) { + if (get(j).equals(i)) { k.add(j); } } @@ -131,9 +128,9 @@ public int compare(V v, V t1) { } }); - for(V i : v) { - for(K j : k()) { - if(get(j).equals(i)) { + for (V i : v) { + for (K j : k()) { + if (get(j).equals(i)) { k.add(j); } } @@ -146,8 +143,7 @@ public int compare(V v, V t1) { /** * Put another map's values into this map * - * @param m - * the map to insert + * @param m the map to insert * @return this map (builder) */ public KMap put(Map m) { @@ -167,14 +163,13 @@ public KMap copy() { /** * Loop through each keyvalue set (copy of it) with the map parameter * - * @param f - * the function + * @param f the function * @return the same gmap */ public KMap rewrite(Consumer3> f) { KMap m = copy(); - for(K i : m.k()) { + for (K i : m.k()) { f.accept(i, get(i), this); } @@ -184,12 +179,11 @@ public KMap rewrite(Consumer3> f) { /** * Loop through each keyvalue set (copy of it) * - * @param f - * the function + * @param f the function * @return the same gmap */ public KMap each(Consumer2 f) { - for(K i : k()) { + for (K i : k()) { f.accept(i, get(i)); } @@ -205,7 +199,7 @@ public KMap flipFlatten() { KMap> f = flip(); KMap m = new KMap<>(); - for(V i : f.k()) { + for (V i : f.k()) { m.putNonNull(i, m.isEmpty() ? null : m.get(0)); } @@ -220,12 +214,12 @@ public KMap flipFlatten() { public KMap> flip() { KMap> flipped = new KMap>(); - for(K i : keySet()) { - if(i == null) { + for (K i : keySet()) { + if (i == null) { continue; } - if(!flipped.containsKey(get(i))) { + if (!flipped.containsKey(get(i))) { flipped.put(get(i), new KList()); } @@ -251,9 +245,9 @@ public int compare(K v, K t1) { } }); - for(K i : k) { - for(V j : v()) { - if(get(i).equals(j)) { + for (K i : k) { + for (V j : v()) { + if (get(i).equals(j)) { v.add(j); } } @@ -274,9 +268,9 @@ public int compare(K v, K t1) { } }); - for(K i : k) { - for(V j : v()) { - if(get(i).equals(j)) { + for (K i : k) { + for (V j : v()) { + if (get(i).equals(j)) { v.add(j); } } @@ -294,7 +288,7 @@ public KList k() { KList k = new KList(); Enumeration kk = keys(); - while(kk.hasMoreElements()) { + while (kk.hasMoreElements()) { K kkk = kk.nextElement(); k.add(kkk); } @@ -314,10 +308,8 @@ public KList v() { /** * Still works as it normally should except it returns itself (builder) * - * @param key - * the key - * @param value - * the value (single only supported) + * @param key the key + * @param value the value (single only supported) */ public KMap qput(K key, V value) { super.put(key, value); @@ -328,14 +320,12 @@ public KMap qput(K key, V value) { * Works just like put, except it wont put anything unless the key and value are * nonnull * - * @param key - * the nonnull key - * @param value - * the nonnull value + * @param key the nonnull key + * @param value the nonnull value * @return the same map */ public KMap putNonNull(K key, V value) { - if(key != null || value != null) { + if (key != null || value != null) { put(key, value); } @@ -343,7 +333,7 @@ public KMap putNonNull(K key, V value) { } public V putThen(K key, V valueIfKeyNotPresent) { - if(!containsKey(key)) { + if (!containsKey(key)) { put(key, valueIfKeyNotPresent); } diff --git a/src/main/java/com/volmit/iris/util/collection/KeyPair.java b/src/main/java/com/volmit/iris/util/collection/KeyPair.java index 536de9518..2dd2377c3 100644 --- a/src/main/java/com/volmit/iris/util/collection/KeyPair.java +++ b/src/main/java/com/volmit/iris/util/collection/KeyPair.java @@ -21,10 +21,8 @@ /** * Represents a keypair * - * @param - * the key type - * @param - * the value type + * @param the key type + * @param the value type * @author cyberpwn */ @SuppressWarnings("hiding") @@ -35,10 +33,8 @@ public class KeyPair { /** * Create a keypair * - * @param k - * the key - * @param v - * the value + * @param k the key + * @param v the value */ public KeyPair(K k, V v) { this.k = k; diff --git a/src/main/java/com/volmit/iris/util/collection/StateList.java b/src/main/java/com/volmit/iris/util/collection/StateList.java index 67346951b..b1a28997e 100644 --- a/src/main/java/com/volmit/iris/util/collection/StateList.java +++ b/src/main/java/com/volmit/iris/util/collection/StateList.java @@ -24,7 +24,7 @@ public class StateList { public StateList(String... states) { this.states = new KList(states); - if(getBits() > 64) { + if (getBits() > 64) { throw new RuntimeException("StateLists cannot exceed 64 bits! You are trying to use " + getBits() + " bits!"); } } @@ -32,7 +32,7 @@ public StateList(String... states) { public StateList(Enum... states) { this.states = new KList>().convert(Enum::name); - if(getBits() > 64) { + if (getBits() > 64) { throw new RuntimeException("StateLists cannot exceed 64 bits! You are trying to use " + getBits() + " bits!"); } } @@ -44,8 +44,8 @@ public long max() { public KList getEnabled(long list) { KList f = new KList<>(); - for(String i : states) { - if(is(list, i)) { + for (String i : states) { + if (is(list, i)) { f.add(i); } } @@ -56,7 +56,7 @@ public KList getEnabled(long list) { public long of(String... enabledStates) { long b = 0; - for(String i : enabledStates) { + for (String i : enabledStates) { b |= getBit(i); } @@ -67,9 +67,9 @@ public long set(long list, String state, boolean enabled) { long bit = getBit(state); boolean is = is(list, state); - if(enabled && !is) { + if (enabled && !is) { return list | bit; - } else if(!enabled && is) { + } else if (!enabled && is) { return list ^ bit; } diff --git a/src/main/java/com/volmit/iris/util/context/ChunkContext.java b/src/main/java/com/volmit/iris/util/context/ChunkContext.java index 818a6fe7c..b017d49e1 100644 --- a/src/main/java/com/volmit/iris/util/context/ChunkContext.java +++ b/src/main/java/com/volmit/iris/util/context/ChunkContext.java @@ -24,12 +24,13 @@ public class ChunkContext { public ChunkContext(int x, int z, IrisComplex c) { this(x, z, c, true); } + @BlockCoordinates public ChunkContext(int x, int z, IrisComplex c, boolean cache) { this.x = x; this.z = z; - if(cache) { + if (cache) { BurstExecutor b = MultiBurst.burst.burst(); height = new ChunkedDataCache<>(b, c.getHeightStream(), x, z); biome = new ChunkedDataCache<>(b, c.getTrueBiomeStream(), x, z); @@ -38,9 +39,7 @@ public ChunkContext(int x, int z, IrisComplex c, boolean cache) { fluid = new ChunkedDataCache<>(b, c.getFluidStream(), x, z); region = new ChunkedDataCache<>(b, c.getRegionStream(), x, z); b.complete(); - } - - else { + } else { height = new ChunkedDataCache<>(null, c.getHeightStream(), x, z, false); biome = new ChunkedDataCache<>(null, c.getTrueBiomeStream(), x, z, false); cave = new ChunkedDataCache<>(null, c.getCaveBiomeStream(), x, z, false); diff --git a/src/main/java/com/volmit/iris/util/context/ChunkedDataCache.java b/src/main/java/com/volmit/iris/util/context/ChunkedDataCache.java index 6be0d2335..8c030c2cc 100644 --- a/src/main/java/com/volmit/iris/util/context/ChunkedDataCache.java +++ b/src/main/java/com/volmit/iris/util/context/ChunkedDataCache.java @@ -19,6 +19,7 @@ public class ChunkedDataCache { public ChunkedDataCache(BurstExecutor burst, ProceduralStream stream, int x, int z) { this(burst, stream, x, z, true); } + @BlockCoordinates public ChunkedDataCache(BurstExecutor burst, ProceduralStream stream, int x, int z, boolean cache) { this.stream = stream; @@ -26,24 +27,22 @@ public ChunkedDataCache(BurstExecutor burst, ProceduralStream stream, int x, this.x = x; this.z = z; this.uniques = cache ? new KSet<>() : null; - if(cache) { + if (cache) { data = new Object[256]; - int i,j; + int i, j; - for(i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) { int finalI = i; - for(j = 0; j < 16; j++) { + for (j = 0; j < 16; j++) { int finalJ = j; burst.queue(() -> { - T t = stream.get(x+ finalI, z+ finalJ); + T t = stream.get(x + finalI, z + finalJ); data[(finalJ * 16) + finalI] = t; uniques.add(t); }); } } - } - - else { + } else { data = new Object[0]; } } @@ -51,7 +50,7 @@ public ChunkedDataCache(BurstExecutor burst, ProceduralStream stream, int x, @SuppressWarnings("unchecked") @BlockCoordinates public T get(int x, int z) { - if(!cache) { + if (!cache) { return stream.get(this.x + x, this.z + z); } diff --git a/src/main/java/com/volmit/iris/util/context/IrisContext.java b/src/main/java/com/volmit/iris/util/context/IrisContext.java index 87c56ba02..8b69eb867 100644 --- a/src/main/java/com/volmit/iris/util/context/IrisContext.java +++ b/src/main/java/com/volmit/iris/util/context/IrisContext.java @@ -40,7 +40,7 @@ public IrisContext(Engine engine) { public static IrisContext getOr(Engine engine) { IrisContext c = get(); - if(c == null) { + if (c == null) { c = new IrisContext(engine); touch(c); } @@ -53,20 +53,20 @@ public static IrisContext get() { } public static void touch(IrisContext c) { - synchronized(context) { + synchronized (context) { context.put(Thread.currentThread(), c); - if(cl.flip()) { + if (cl.flip()) { dereference(); } } } public static void dereference() { - synchronized(context) { - for(Thread i : context.k()) { - if(!i.isAlive() || context.get(i).engine.isClosed()) { - if(context.get(i).engine.isClosed()) { + synchronized (context) { + for (Thread i : context.k()) { + if (!i.isAlive() || context.get(i).engine.isClosed()) { + if (context.get(i).engine.isClosed()) { Iris.debug("Dereferenced Context " + i.getName() + " " + i.getId()); } diff --git a/src/main/java/com/volmit/iris/util/data/B.java b/src/main/java/com/volmit/iris/util/data/B.java index 4746d359c..325402ee8 100644 --- a/src/main/java/com/volmit/iris/util/data/B.java +++ b/src/main/java/com/volmit/iris/util/data/B.java @@ -58,34 +58,34 @@ public class B { private static IntSet buildFoliageCache() { IntSet b = new IntOpenHashSet(); - Arrays.stream(new Material[] { - POPPY, - DANDELION, - CORNFLOWER, - SWEET_BERRY_BUSH, - CRIMSON_ROOTS, - WARPED_ROOTS, - NETHER_SPROUTS, - ALLIUM, - AZURE_BLUET, - BLUE_ORCHID, - OXEYE_DAISY, - LILY_OF_THE_VALLEY, - WITHER_ROSE, - DARK_OAK_SAPLING, - ACACIA_SAPLING, - JUNGLE_SAPLING, - BIRCH_SAPLING, - SPRUCE_SAPLING, - OAK_SAPLING, - ORANGE_TULIP, - PINK_TULIP, - RED_TULIP, - WHITE_TULIP, - FERN, - LARGE_FERN, - GRASS, - TALL_GRASS + Arrays.stream(new Material[]{ + POPPY, + DANDELION, + CORNFLOWER, + SWEET_BERRY_BUSH, + CRIMSON_ROOTS, + WARPED_ROOTS, + NETHER_SPROUTS, + ALLIUM, + AZURE_BLUET, + BLUE_ORCHID, + OXEYE_DAISY, + LILY_OF_THE_VALLEY, + WITHER_ROSE, + DARK_OAK_SAPLING, + ACACIA_SAPLING, + JUNGLE_SAPLING, + BIRCH_SAPLING, + SPRUCE_SAPLING, + OAK_SAPLING, + ORANGE_TULIP, + PINK_TULIP, + RED_TULIP, + WHITE_TULIP, + FERN, + LARGE_FERN, + GRASS, + TALL_GRASS }).forEach((i) -> b.add(i.ordinal())); return IntSets.unmodifiable(b); @@ -93,17 +93,17 @@ private static IntSet buildFoliageCache() { private static IntSet buildDeepslateCache() { IntSet b = new IntOpenHashSet(); - Arrays.stream(new Material[] { - DEEPSLATE, - DEEPSLATE_BRICKS, - DEEPSLATE_BRICK_SLAB, - DEEPSLATE_BRICK_STAIRS, - DEEPSLATE_BRICK_WALL, - DEEPSLATE_TILE_SLAB, - DEEPSLATE_TILES, - DEEPSLATE_TILE_STAIRS, - DEEPSLATE_TILE_WALL, - CRACKED_DEEPSLATE_TILES + Arrays.stream(new Material[]{ + DEEPSLATE, + DEEPSLATE_BRICKS, + DEEPSLATE_BRICK_SLAB, + DEEPSLATE_BRICK_STAIRS, + DEEPSLATE_BRICK_WALL, + DEEPSLATE_TILE_SLAB, + DEEPSLATE_TILES, + DEEPSLATE_TILE_STAIRS, + DEEPSLATE_TILE_WALL, + CRACKED_DEEPSLATE_TILES }).forEach((i) -> b.add(i.ordinal())); return IntSets.unmodifiable(b); @@ -141,64 +141,64 @@ private static Int2IntMap buildDeepslate2NormalCache() { private static IntSet buildDecorantCache() { IntSet b = new IntOpenHashSet(); - Arrays.stream(new Material[] { - GRASS, - TALL_GRASS, - FERN, - LARGE_FERN, - CORNFLOWER, - SUNFLOWER, - CHORUS_FLOWER, - POPPY, - DANDELION, - OXEYE_DAISY, - ORANGE_TULIP, - PINK_TULIP, - RED_TULIP, - WHITE_TULIP, - LILAC, - DEAD_BUSH, - SWEET_BERRY_BUSH, - ROSE_BUSH, - WITHER_ROSE, - ALLIUM, - BLUE_ORCHID, - LILY_OF_THE_VALLEY, - CRIMSON_FUNGUS, - WARPED_FUNGUS, - RED_MUSHROOM, - BROWN_MUSHROOM, - CRIMSON_ROOTS, - AZURE_BLUET, - WEEPING_VINES, - WEEPING_VINES_PLANT, - WARPED_ROOTS, - NETHER_SPROUTS, - TWISTING_VINES, - TWISTING_VINES_PLANT, - SUGAR_CANE, - WHEAT, - POTATOES, - CARROTS, - BEETROOTS, - NETHER_WART, - SEA_PICKLE, - SEAGRASS, - ACACIA_BUTTON, - BIRCH_BUTTON, - CRIMSON_BUTTON, - DARK_OAK_BUTTON, - JUNGLE_BUTTON, - OAK_BUTTON, - POLISHED_BLACKSTONE_BUTTON, - SPRUCE_BUTTON, - STONE_BUTTON, - WARPED_BUTTON, - TORCH, - SOUL_TORCH, - GLOW_LICHEN, - VINE, - SCULK_VEIN + Arrays.stream(new Material[]{ + GRASS, + TALL_GRASS, + FERN, + LARGE_FERN, + CORNFLOWER, + SUNFLOWER, + CHORUS_FLOWER, + POPPY, + DANDELION, + OXEYE_DAISY, + ORANGE_TULIP, + PINK_TULIP, + RED_TULIP, + WHITE_TULIP, + LILAC, + DEAD_BUSH, + SWEET_BERRY_BUSH, + ROSE_BUSH, + WITHER_ROSE, + ALLIUM, + BLUE_ORCHID, + LILY_OF_THE_VALLEY, + CRIMSON_FUNGUS, + WARPED_FUNGUS, + RED_MUSHROOM, + BROWN_MUSHROOM, + CRIMSON_ROOTS, + AZURE_BLUET, + WEEPING_VINES, + WEEPING_VINES_PLANT, + WARPED_ROOTS, + NETHER_SPROUTS, + TWISTING_VINES, + TWISTING_VINES_PLANT, + SUGAR_CANE, + WHEAT, + POTATOES, + CARROTS, + BEETROOTS, + NETHER_WART, + SEA_PICKLE, + SEAGRASS, + ACACIA_BUTTON, + BIRCH_BUTTON, + CRIMSON_BUTTON, + DARK_OAK_BUTTON, + JUNGLE_BUTTON, + OAK_BUTTON, + POLISHED_BLACKSTONE_BUTTON, + SPRUCE_BUTTON, + STONE_BUTTON, + WARPED_BUTTON, + TORCH, + SOUL_TORCH, + GLOW_LICHEN, + VINE, + SCULK_VEIN }).forEach((i) -> b.add(i.ordinal())); b.addAll(foliageCache); @@ -207,34 +207,34 @@ private static IntSet buildDecorantCache() { private static IntSet buildLitCache() { IntSet b = new IntOpenHashSet(); - Arrays.stream(new Material[] { - GLOWSTONE, - AMETHYST_CLUSTER, - SMALL_AMETHYST_BUD, - MEDIUM_AMETHYST_BUD, - LARGE_AMETHYST_BUD, - END_ROD, - SOUL_SAND, - TORCH, - REDSTONE_TORCH, - SOUL_TORCH, - REDSTONE_WALL_TORCH, - WALL_TORCH, - SOUL_WALL_TORCH, - LANTERN, - CANDLE, - JACK_O_LANTERN, - REDSTONE_LAMP, - MAGMA_BLOCK, - LIGHT, - SHROOMLIGHT, - SEA_LANTERN, - SOUL_LANTERN, - FIRE, - SOUL_FIRE, - SEA_PICKLE, - BREWING_STAND, - REDSTONE_ORE, + Arrays.stream(new Material[]{ + GLOWSTONE, + AMETHYST_CLUSTER, + SMALL_AMETHYST_BUD, + MEDIUM_AMETHYST_BUD, + LARGE_AMETHYST_BUD, + END_ROD, + SOUL_SAND, + TORCH, + REDSTONE_TORCH, + SOUL_TORCH, + REDSTONE_WALL_TORCH, + WALL_TORCH, + SOUL_WALL_TORCH, + LANTERN, + CANDLE, + JACK_O_LANTERN, + REDSTONE_LAMP, + MAGMA_BLOCK, + LIGHT, + SHROOMLIGHT, + SEA_LANTERN, + SOUL_LANTERN, + FIRE, + SOUL_FIRE, + SEA_PICKLE, + BREWING_STAND, + REDSTONE_ORE, }).forEach((i) -> b.add(i.ordinal())); return IntSets.unmodifiable(b); @@ -242,33 +242,33 @@ private static IntSet buildLitCache() { private static IntSet buildStorageCache() { IntSet b = new IntOpenHashSet(); - Arrays.stream(new Material[] { - CHEST, - SMOKER, - TRAPPED_CHEST, - SHULKER_BOX, - WHITE_SHULKER_BOX, - ORANGE_SHULKER_BOX, - MAGENTA_SHULKER_BOX, - LIGHT_BLUE_SHULKER_BOX, - YELLOW_SHULKER_BOX, - LIME_SHULKER_BOX, - PINK_SHULKER_BOX, - GRAY_SHULKER_BOX, - LIGHT_GRAY_SHULKER_BOX, - CYAN_SHULKER_BOX, - PURPLE_SHULKER_BOX, - BLUE_SHULKER_BOX, - BROWN_SHULKER_BOX, - GREEN_SHULKER_BOX, - RED_SHULKER_BOX, - BLACK_SHULKER_BOX, - BARREL, - DISPENSER, - DROPPER, - HOPPER, - FURNACE, - BLAST_FURNACE + Arrays.stream(new Material[]{ + CHEST, + SMOKER, + TRAPPED_CHEST, + SHULKER_BOX, + WHITE_SHULKER_BOX, + ORANGE_SHULKER_BOX, + MAGENTA_SHULKER_BOX, + LIGHT_BLUE_SHULKER_BOX, + YELLOW_SHULKER_BOX, + LIME_SHULKER_BOX, + PINK_SHULKER_BOX, + GRAY_SHULKER_BOX, + LIGHT_GRAY_SHULKER_BOX, + CYAN_SHULKER_BOX, + PURPLE_SHULKER_BOX, + BLUE_SHULKER_BOX, + BROWN_SHULKER_BOX, + GREEN_SHULKER_BOX, + RED_SHULKER_BOX, + BLACK_SHULKER_BOX, + BARREL, + DISPENSER, + DROPPER, + HOPPER, + FURNACE, + BLAST_FURNACE }).forEach((i) -> b.add(i.ordinal())); return IntSets.unmodifiable(b); @@ -277,12 +277,12 @@ private static IntSet buildStorageCache() { public static BlockData toDeepSlateOre(BlockData block, BlockData ore) { int key = ore.getMaterial().ordinal(); - if(isDeepSlate(block)) { - if(normal2DeepslateCache.containsKey(key)) { + if (isDeepSlate(block)) { + if (normal2DeepslateCache.containsKey(key)) { return Material.values()[normal2DeepslateCache.get(key)].createBlockData(); } } else { - if(deepslate2NormalCache.containsKey(key)) { + if (deepslate2NormalCache.containsKey(key)) { return Material.values()[deepslate2NormalCache.get(key)].createBlockData(); } } @@ -308,39 +308,39 @@ private static IntSet buildStorageChestCache() { } public static boolean canPlaceOnto(Material mat, Material onto) { - if((onto.equals(CRIMSON_NYLIUM) || onto.equals(WARPED_NYLIUM)) && - (mat.equals(CRIMSON_FUNGUS) || mat.equals(CRIMSON_ROOTS) || mat.equals(WARPED_FUNGUS) || mat.equals(WARPED_ROOTS))) { + if ((onto.equals(CRIMSON_NYLIUM) || onto.equals(WARPED_NYLIUM)) && + (mat.equals(CRIMSON_FUNGUS) || mat.equals(CRIMSON_ROOTS) || mat.equals(WARPED_FUNGUS) || mat.equals(WARPED_ROOTS))) { return true; } - if(isFoliage(mat)) { - if(!isFoliagePlantable(onto)) { + if (isFoliage(mat)) { + if (!isFoliagePlantable(onto)) { return false; } } - if(onto.equals(Material.AIR) || - onto.equals(B.getMaterial("CAVE_AIR")) - || onto.equals(B.getMaterial("VOID_AIR"))) { + if (onto.equals(Material.AIR) || + onto.equals(B.getMaterial("CAVE_AIR")) + || onto.equals(B.getMaterial("VOID_AIR"))) { return false; } - if(onto.equals(Material.GRASS_BLOCK) && mat.equals(Material.DEAD_BUSH)) { + if (onto.equals(Material.GRASS_BLOCK) && mat.equals(Material.DEAD_BUSH)) { return false; } - if(onto.equals(Material.DIRT_PATH)) { - if(!mat.isSolid()) { + if (onto.equals(Material.DIRT_PATH)) { + if (!mat.isSolid()) { return false; } } - if(onto.equals(Material.ACACIA_LEAVES) - || onto.equals(Material.BIRCH_LEAVES) - || onto.equals(Material.DARK_OAK_LEAVES) - || onto.equals(Material.JUNGLE_LEAVES) - || onto.equals(Material.OAK_LEAVES) - || onto.equals(Material.SPRUCE_LEAVES)) { + if (onto.equals(Material.ACACIA_LEAVES) + || onto.equals(Material.BIRCH_LEAVES) + || onto.equals(Material.DARK_OAK_LEAVES) + || onto.equals(Material.JUNGLE_LEAVES) + || onto.equals(Material.OAK_LEAVES) + || onto.equals(Material.SPRUCE_LEAVES)) { return mat.isSolid(); } @@ -349,25 +349,25 @@ public static boolean canPlaceOnto(Material mat, Material onto) { public static boolean isFoliagePlantable(BlockData d) { return d.getMaterial().equals(Material.GRASS_BLOCK) - || d.getMaterial().equals(Material.ROOTED_DIRT) - || d.getMaterial().equals(Material.DIRT) - || d.getMaterial().equals(Material.COARSE_DIRT) - || d.getMaterial().equals(Material.PODZOL); + || d.getMaterial().equals(Material.ROOTED_DIRT) + || d.getMaterial().equals(Material.DIRT) + || d.getMaterial().equals(Material.COARSE_DIRT) + || d.getMaterial().equals(Material.PODZOL); } public static boolean isFoliagePlantable(Material d) { return d.equals(Material.GRASS_BLOCK) - || d.equals(Material.DIRT) - || d.equals(TALL_GRASS) - || d.equals(TALL_SEAGRASS) - || d.equals(LARGE_FERN) - || d.equals(SUNFLOWER) - || d.equals(PEONY) - || d.equals(LILAC) - || d.equals(ROSE_BUSH) - || d.equals(Material.ROOTED_DIRT) - || d.equals(Material.COARSE_DIRT) - || d.equals(Material.PODZOL); + || d.equals(Material.DIRT) + || d.equals(TALL_GRASS) + || d.equals(TALL_SEAGRASS) + || d.equals(LARGE_FERN) + || d.equals(SUNFLOWER) + || d.equals(PEONY) + || d.equals(LILAC) + || d.equals(ROSE_BUSH) + || d.equals(Material.ROOTED_DIRT) + || d.equals(Material.COARSE_DIRT) + || d.equals(Material.PODZOL); } public static boolean isWater(BlockData b) { @@ -381,9 +381,9 @@ public static BlockData getAir() { public static Material getMaterialOrNull(String bdx) { try { return Material.valueOf(bdx.trim().toUpperCase()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(clw.flip()) { + if (clw.flip()) { Iris.warn("Unknown Material: " + bdx); } return null; @@ -393,7 +393,7 @@ public static Material getMaterialOrNull(String bdx) { public static Material getMaterial(String bdx) { Material m = getMaterialOrNull(bdx); - if(m == null) { + if (m == null) { return AIR_MATERIAL; } @@ -401,7 +401,7 @@ public static Material getMaterial(String bdx) { } public static boolean isSolid(BlockData mat) { - if(mat == null) + if (mat == null) return false; return mat.getMaterial().isSolid(); } @@ -410,33 +410,32 @@ public static BlockData getOrNull(String bdxf) { try { String bd = bdxf.trim(); - if(!custom.isEmpty() && custom.containsKey(bd)) - { + if (!custom.isEmpty() && custom.containsKey(bd)) { return custom.get(bd); } - if(bd.startsWith("minecraft:cauldron[level=")) { + if (bd.startsWith("minecraft:cauldron[level=")) { bd = bd.replaceAll("\\Q:cauldron[\\E", ":water_cauldron["); } - if(bd.equals("minecraft:grass_path")) { + if (bd.equals("minecraft:grass_path")) { return DIRT_PATH.createBlockData(); } BlockData bdx = parseBlockData(bd); - if(bdx == null) { - if(clw.flip()) { + if (bdx == null) { + if (clw.flip()) { Iris.warn("Unknown Block Data '" + bd + "'"); } return AIR; } return bdx; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(clw.flip()) { + if (clw.flip()) { Iris.warn("Unknown Block Data '" + bdxf + "'"); } } @@ -447,7 +446,7 @@ public static BlockData getOrNull(String bdxf) { public static BlockData get(String bdxf) { BlockData bd = getOrNull(bdxf); - if(bd != null) { + if (bd != null) { return bd; } @@ -457,8 +456,8 @@ public static BlockData get(String bdxf) { private static synchronized BlockData createBlockData(String s) { try { return Bukkit.createBlockData(s); - } catch(IllegalArgumentException e) { - if(s.contains("[")) { + } catch (IllegalArgumentException e) { + if (s.contains("[")) { return createBlockData(s.split("\\Q[\\E")[0]); } } @@ -471,70 +470,70 @@ private static BlockData parseBlockData(String ix) { try { BlockData bx = null; - if(!ix.startsWith("minecraft:") && ix.contains(":")) { + if (!ix.startsWith("minecraft:") && ix.contains(":")) { NamespacedKey key = NamespacedKey.fromString(ix); Optional bd = Iris.service(ExternalDataSVC.class).getBlockData(key); - if(bd.isPresent()) + if (bd.isPresent()) bx = bd.get(); } - if(bx == null) { + if (bx == null) { try { bx = createBlockData(ix.toLowerCase()); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } - if(bx == null) { + if (bx == null) { try { bx = createBlockData("minecraft:" + ix.toLowerCase()); - } catch(Throwable e) { + } catch (Throwable e) { } } - if(bx == null) { + if (bx == null) { try { bx = Material.valueOf(ix.toUpperCase()).createBlockData(); - } catch(Throwable e) { + } catch (Throwable e) { } } - if(bx == null) { + if (bx == null) { return null; } - if(bx instanceof Leaves && IrisSettings.get().getGenerator().isPreventLeafDecay()) { + if (bx instanceof Leaves && IrisSettings.get().getGenerator().isPreventLeafDecay()) { ((Leaves) bx).setPersistent(true); - } else if(bx instanceof Leaves) { + } else if (bx instanceof Leaves) { ((Leaves) bx).setPersistent(false); } return bx; - } catch(Throwable e) { - if(clw.flip()) { + } catch (Throwable e) { + if (clw.flip()) { Iris.warn("Unknown Block Data: " + ix); } String block = ix.contains(":") ? ix.split(":")[1].toLowerCase() : ix.toLowerCase(); String state = block.contains("[") ? block.split("\\Q[\\E")[1].split("\\Q]\\E")[0] : ""; Map stateMap = new HashMap<>(); - if(!state.equals("")) { + if (!state.equals("")) { Arrays.stream(state.split(",")).forEach(s -> stateMap.put(s.split("=")[0], s.split("=")[1])); } block = block.split("\\Q[\\E")[0]; - switch(block) { + switch (block) { case "cauldron" -> block = "water_cauldron"; case "grass_path" -> block = "dirt_path"; case "concrete" -> block = "white_concrete"; case "wool" -> block = "white_wool"; case "beetroots" -> { - if(stateMap.containsKey("age")) { + if (stateMap.containsKey("age")) { String updated = stateMap.get("age"); - switch(updated) { + switch (updated) { case "7" -> updated = "3"; case "3", "4", "5" -> updated = "2"; case "1", "2" -> updated = "1"; @@ -545,25 +544,25 @@ private static BlockData parseBlockData(String ix) { } Map newStates = new HashMap<>(); - for(String key : stateMap.keySet()) { //Iterate through every state and check if its valid + for (String key : stateMap.keySet()) { //Iterate through every state and check if its valid try { String newState = block + "[" + key + "=" + stateMap.get(key) + "]"; createBlockData(newState); newStates.put(key, stateMap.get(key)); - } catch(IllegalArgumentException ignored) { + } catch (IllegalArgumentException ignored) { } } //Combine all the "good" states again state = newStates.entrySet().stream().map(entry -> entry.getKey() + "=" + entry.getValue()).collect(Collectors.joining(",")); - if(!state.equals("")) state = "[" + state + "]"; + if (!state.equals("")) state = "[" + state + "]"; String newBlock = block + state; Iris.debug("Converting " + ix + " to " + newBlock); try { return createBlockData(newBlock); - } catch(Throwable e1) { + } catch (Throwable e1) { Iris.reportError(e1); } @@ -585,9 +584,9 @@ public static boolean isLit(BlockData mat) { public static boolean isUpdatable(BlockData mat) { return isLit(mat) - || isStorage(mat) - || (mat instanceof PointedDripstone - && ((PointedDripstone) mat).getThickness().equals(PointedDripstone.Thickness.TIP)); + || isStorage(mat) + || (mat instanceof PointedDripstone + && ((PointedDripstone) mat).getThickness().equals(PointedDripstone.Thickness.TIP)); } public static boolean isFoliage(Material d) { @@ -605,10 +604,10 @@ public static boolean isDecorant(BlockData m) { public static KList get(KList find) { KList b = new KList<>(); - for(String i : find) { + for (String i : find) { BlockData bd = get(i); - if(bd != null) { + if (bd != null) { b.add(bd); } } @@ -625,7 +624,7 @@ public static boolean isAirOrFluid(BlockData d) { } public static boolean isAir(BlockData d) { - if(d == null) { + if (d == null) { return true; } @@ -636,11 +635,11 @@ public static boolean isAir(BlockData d) { public synchronized static String[] getBlockTypes() { KList bt = new KList<>(); - for(Material i : Material.values()) { - if(i.isBlock()) { + for (Material i : Material.values()) { + if (i.isBlock()) { String v = i.createBlockData().getAsString(true); - if(v.contains("[")) { + if (v.contains("[")) { v = v.split("\\Q[\\E")[0]; } @@ -648,7 +647,7 @@ public synchronized static String[] getBlockTypes() { } } - for(NamespacedKey id : Iris.service(ExternalDataSVC.class).getAllIdentifiers()) + for (NamespacedKey id : Iris.service(ExternalDataSVC.class).getAllIdentifiers()) bt.add(id.toString()); bt.addAll(custom.k()); @@ -658,7 +657,7 @@ public synchronized static String[] getBlockTypes() { public static String[] getItemTypes() { KList bt = new KList<>(); - for(Material i : Material.values()) { + for (Material i : Material.values()) { String v = i.name().toLowerCase().trim(); bt.add(v); } @@ -675,7 +674,7 @@ public static void registerCustomBlockData(String namespace, String key, BlockDa } public static boolean isVineBlock(BlockData data) { - return switch(data.getMaterial()) { + return switch (data.getMaterial()) { case VINE, SCULK_VEIN, GLOW_LICHEN -> true; default -> false; }; diff --git a/src/main/java/com/volmit/iris/util/data/ChunkCache.java b/src/main/java/com/volmit/iris/util/data/ChunkCache.java index 0ce831cc8..9fb9dac5a 100644 --- a/src/main/java/com/volmit/iris/util/data/ChunkCache.java +++ b/src/main/java/com/volmit/iris/util/data/ChunkCache.java @@ -32,7 +32,7 @@ public ChunkCache() { public T compute(int x, int z, Function2 function) { T t = get(x & 15, z & 15); - if(t == null) { + if (t == null) { t = function.apply(x, z); set(x & 15, z & 15, t); } diff --git a/src/main/java/com/volmit/iris/util/data/Cuboid.java b/src/main/java/com/volmit/iris/util/data/Cuboid.java index fc0d2d8bd..437f65298 100644 --- a/src/main/java/com/volmit/iris/util/data/Cuboid.java +++ b/src/main/java/com/volmit/iris/util/data/Cuboid.java @@ -41,13 +41,11 @@ public class Cuboid implements Iterable, Cloneable, ConfigurationSerializ * Construct a Cuboid given two Location objects which represent any two corners * of the Cuboid. * - * @param l1 - * one of the corners - * @param l2 - * the other corner + * @param l1 one of the corners + * @param l2 the other corner */ public Cuboid(Location l1, Location l2) { - if(!l1.getWorld().equals(l2.getWorld())) { + if (!l1.getWorld().equals(l2.getWorld())) { throw new IllegalArgumentException("locations must be on the same world"); } @@ -63,8 +61,7 @@ public Cuboid(Location l1, Location l2) { /** * Construct a one-block Cuboid at the given Location of the Cuboid. * - * @param l1 - * location of the Cuboid + * @param l1 location of the Cuboid */ public Cuboid(Location l1) { this(l1, l1); @@ -73,8 +70,7 @@ public Cuboid(Location l1) { /** * Copy constructor. * - * @param other - * the Cuboid to copy + * @param other the Cuboid to copy */ public Cuboid(Cuboid other) { this(other.getWorld().getName(), other.x1, other.y1, other.z1, other.x2, other.y2, other.z2); @@ -83,20 +79,13 @@ public Cuboid(Cuboid other) { /** * Construct a Cuboid in the given World and xyz co-ordinates * - * @param world - * the Cuboid's world - * @param x1 - * X co-ordinate of corner 1 - * @param y1 - * Y co-ordinate of corner 1 - * @param z1 - * Z co-ordinate of corner 1 - * @param x2 - * X co-ordinate of corner 2 - * @param y2 - * Y co-ordinate of corner 2 - * @param z2 - * Z co-ordinate of corner 2 + * @param world the Cuboid's world + * @param x1 X co-ordinate of corner 1 + * @param y1 Y co-ordinate of corner 1 + * @param z1 Z co-ordinate of corner 1 + * @param x2 X co-ordinate of corner 2 + * @param y2 Y co-ordinate of corner 2 + * @param z2 Z co-ordinate of corner 2 */ public Cuboid(World world, int x1, int y1, int z1, int x2, int y2, int z2) { this.worldName = world.getName(); @@ -111,20 +100,13 @@ public Cuboid(World world, int x1, int y1, int z1, int x2, int y2, int z2) { /** * Construct a Cuboid in the given world name and xyz co-ordinates. * - * @param worldName - * the Cuboid's world name - * @param x1 - * X co-ordinate of corner 1 - * @param y1 - * Y co-ordinate of corner 1 - * @param z1 - * Z co-ordinate of corner 1 - * @param x2 - * X co-ordinate of corner 2 - * @param y2 - * Y co-ordinate of corner 2 - * @param z2 - * Z co-ordinate of corner 2 + * @param worldName the Cuboid's world name + * @param x1 X co-ordinate of corner 1 + * @param y1 Y co-ordinate of corner 1 + * @param z1 Z co-ordinate of corner 1 + * @param x2 X co-ordinate of corner 2 + * @param y2 Y co-ordinate of corner 2 + * @param z2 Z co-ordinate of corner 2 */ private Cuboid(String worldName, int x1, int y1, int z1, int x2, int y2, int z2) { this.worldName = worldName; @@ -149,9 +131,9 @@ public Cuboid(Map map) { public KList getEntities() { KList en = new KList<>(); - for(Chunk i : getChunks()) { - for(Entity j : i.getEntities()) { - if(contains(j.getLocation())) { + for (Chunk i : getChunks()) { + for (Entity j : i.getEntities()) { + if (contains(j.getLocation())) { en.add(j); } } @@ -163,10 +145,8 @@ public KList getEntities() { /** * Set the locations * - * @param l1 - * a - * @param l2 - * b + * @param l1 a + * @param l2 b */ public void set(Location l1, Location l2) { x1 = Math.min(l1.getBlockX(), l2.getBlockX()); @@ -230,12 +210,11 @@ public Location getCenter() { * Get the Cuboid's world. * * @return the World object representing this Cuboid's world - * @throws IllegalStateException - * if the world is not loaded + * @throws IllegalStateException if the world is not loaded */ public World getWorld() { World world = Bukkit.getWorld(worldName); - if(world == null) { + if (world == null) { throw new IllegalStateException("world '" + worldName + "' is not loaded"); } return world; @@ -355,14 +334,12 @@ public Block[] corners() { * amounts will shrink the Cuboid in the given direction. Shrinking a cuboid's * face past the opposite face is not an error and will return a valid Cuboid. * - * @param dir - * the direction in which to expand - * @param amount - * the number of blocks by which to expand + * @param dir the direction in which to expand + * @param amount the number of blocks by which to expand * @return a new Cuboid expanded by the given direction and amount */ public Cuboid expand(CuboidDirection dir, int amount) { - return switch(dir) { + return switch (dir) { case North -> new Cuboid(worldName, x1 - amount, y1, z1, x2, y2, z2); case South -> new Cuboid(worldName, x1, y1, z1, x2 + amount, y2, z2); case East -> new Cuboid(worldName, x1, y1, z1 - amount, x2, y2, z2); @@ -386,10 +363,8 @@ public Cuboid expand(Direction dir, int amount) { /** * Shift the Cuboid in the given direction by the given amount. * - * @param dir - * the direction in which to shift - * @param amount - * the number of blocks by which to shift + * @param dir the direction in which to shift + * @param amount the number of blocks by which to shift * @return a new Cuboid shifted by the given direction and amount */ public Cuboid shift(CuboidDirection dir, int amount) { @@ -399,16 +374,15 @@ public Cuboid shift(CuboidDirection dir, int amount) { /** * Outset (grow) the Cuboid in the given direction by the given amount. * - * @param dir - * the direction in which to outset (must be Horizontal, Vertical, or - * Both) - * @param amount - * the number of blocks by which to outset + * @param dir the direction in which to outset (must be Horizontal, Vertical, or + * Both) + * @param amount the number of blocks by which to outset * @return a new Cuboid outset by the given direction and amount */ public Cuboid outset(CuboidDirection dir, int amount) { - Cuboid c = switch(dir) { - case Horizontal -> expand(CuboidDirection.North, amount).expand(CuboidDirection.South, amount).expand(CuboidDirection.East, amount).expand(CuboidDirection.West, amount); + Cuboid c = switch (dir) { + case Horizontal -> + expand(CuboidDirection.North, amount).expand(CuboidDirection.South, amount).expand(CuboidDirection.East, amount).expand(CuboidDirection.West, amount); case Vertical -> expand(CuboidDirection.Down, amount).expand(CuboidDirection.Up, amount); case Both -> outset(CuboidDirection.Horizontal, amount).outset(CuboidDirection.Vertical, amount); default -> throw new IllegalArgumentException("invalid direction " + dir); @@ -420,11 +394,9 @@ public Cuboid outset(CuboidDirection dir, int amount) { * Inset (shrink) the Cuboid in the given direction by the given amount. * Equivalent to calling outset() with a negative amount. * - * @param dir - * the direction in which to inset (must be Horizontal, Vertical, or - * Both) - * @param amount - * the number of blocks by which to inset + * @param dir the direction in which to inset (must be Horizontal, Vertical, or + * Both) + * @param amount the number of blocks by which to inset * @return a new Cuboid inset by the given direction and amount */ public Cuboid inset(CuboidDirection dir, int amount) { @@ -434,12 +406,9 @@ public Cuboid inset(CuboidDirection dir, int amount) { /** * Return true if the point at (x,y,z) is contained within this Cuboid. * - * @param x - * the X co-ordinate - * @param y - * the Y co-ordinate - * @param z - * the Z co-ordinate + * @param x the X co-ordinate + * @param y the Y co-ordinate + * @param z the Z co-ordinate * @return true if the given point is within this Cuboid, false otherwise */ public boolean contains(int x, int y, int z) { @@ -449,8 +418,7 @@ public boolean contains(int x, int y, int z) { /** * Check if the given Block is contained within this Cuboid. * - * @param b - * the Block to check for + * @param b the Block to check for * @return true if the Block is within this Cuboid, false otherwise */ public boolean contains(Block b) { @@ -460,8 +428,7 @@ public boolean contains(Block b) { /** * Check if the given Location is contained within this Cuboid. * - * @param l - * the Location to check for + * @param l the Location to check for * @return true if the Location is within this Cuboid, false otherwise */ public boolean contains(Location l) { @@ -486,8 +453,8 @@ public int volume() { public byte averageLightLevel() { long total = 0; int n = 0; - for(Block b : this) { - if(b.isEmpty()) { + for (Block b : this) { + if (b.isEmpty()) { total += b.getLightLevel(); ++n; } @@ -510,45 +477,44 @@ public Cuboid contract() { * no exterior empty space. E.g. a direction of Down will push the top face * downwards as much as possible. * - * @param dir - * the direction in which to contract + * @param dir the direction in which to contract * @return a new Cuboid contracted in the given direction */ public Cuboid contract(CuboidDirection dir) { Cuboid face = getFace(dir.opposite()); - switch(dir) { + switch (dir) { case Down -> { - while(face.containsOnly(Material.AIR) && face.getLowerY() > this.getLowerY()) { + while (face.containsOnly(Material.AIR) && face.getLowerY() > this.getLowerY()) { face = face.shift(CuboidDirection.Down, 1); } return new Cuboid(worldName, x1, y1, z1, x2, face.getUpperY(), z2); } case Up -> { - while(face.containsOnly(Material.AIR) && face.getUpperY() < this.getUpperY()) { + while (face.containsOnly(Material.AIR) && face.getUpperY() < this.getUpperY()) { face = face.shift(CuboidDirection.Up, 1); } return new Cuboid(worldName, x1, face.getLowerY(), z1, x2, y2, z2); } case North -> { - while(face.containsOnly(Material.AIR) && face.getLowerX() > this.getLowerX()) { + while (face.containsOnly(Material.AIR) && face.getLowerX() > this.getLowerX()) { face = face.shift(CuboidDirection.North, 1); } return new Cuboid(worldName, x1, y1, z1, face.getUpperX(), y2, z2); } case South -> { - while(face.containsOnly(Material.AIR) && face.getUpperX() < this.getUpperX()) { + while (face.containsOnly(Material.AIR) && face.getUpperX() < this.getUpperX()) { face = face.shift(CuboidDirection.South, 1); } return new Cuboid(worldName, face.getLowerX(), y1, z1, x2, y2, z2); } case East -> { - while(face.containsOnly(Material.AIR) && face.getLowerZ() > this.getLowerZ()) { + while (face.containsOnly(Material.AIR) && face.getLowerZ() > this.getLowerZ()) { face = face.shift(CuboidDirection.East, 1); } return new Cuboid(worldName, x1, y1, z1, x2, y2, face.getUpperZ()); } case West -> { - while(face.containsOnly(Material.AIR) && face.getUpperZ() < this.getUpperZ()) { + while (face.containsOnly(Material.AIR) && face.getUpperZ() < this.getUpperZ()) { face = face.shift(CuboidDirection.West, 1); } return new Cuboid(worldName, x1, y1, face.getLowerZ(), x2, y2, z2); @@ -561,12 +527,11 @@ public Cuboid contract(CuboidDirection dir) { * Get the Cuboid representing the face of this Cuboid. The resulting Cuboid * will be one block thick in the axis perpendicular to the requested face. * - * @param dir - * which face of the Cuboid to get + * @param dir which face of the Cuboid to get * @return the Cuboid representing this Cuboid's requested face */ public Cuboid getFace(CuboidDirection dir) { - return switch(dir) { + return switch (dir) { case Down -> new Cuboid(worldName, x1, y1, z1, x2, y1, z2); case Up -> new Cuboid(worldName, x1, y2, z1, x2, y2, z2); case North -> new Cuboid(worldName, x1, y1, z1, x1, y2, z2); @@ -580,13 +545,12 @@ public Cuboid getFace(CuboidDirection dir) { /** * Check if the Cuboid contains only blocks of the given type * - * @param material - * the material to check for + * @param material the material to check for * @return true if this Cuboid contains only blocks of the given type */ public boolean containsOnly(Material material) { - for(Block b : this) { - if(b.getType() != material) { + for (Block b : this) { + if (b.getType() != material) { return false; } } @@ -596,12 +560,11 @@ public boolean containsOnly(Material material) { /** * Get the Cuboid big enough to hold both this Cuboid and the given one. * - * @param other - * the other Cuboid to include + * @param other the other Cuboid to include * @return a new Cuboid large enough to hold this Cuboid and the given Cuboid */ public Cuboid getBoundingCuboid(Cuboid other) { - if(other == null) { + if (other == null) { return this; } @@ -618,12 +581,9 @@ public Cuboid getBoundingCuboid(Cuboid other) { /** * Get a block relative to the lower NE point of the Cuboid. * - * @param x - * the X co-ordinate - * @param y - * the Y co-ordinate - * @param z - * the Z co-ordinate + * @param x the X co-ordinate + * @param y the Y co-ordinate + * @param z the Z co-ordinate * @return the block at the given position */ public Block getRelativeBlock(int x, int y, int z) { @@ -635,14 +595,10 @@ public Block getRelativeBlock(int x, int y, int z) { * This version of getRelativeBlock() should be used if being called many times, * to avoid excessive calls to getWorld(). * - * @param w - * the World - * @param x - * the X co-ordinate - * @param y - * the Y co-ordinate - * @param z - * the Z co-ordinate + * @param w the World + * @param x the X co-ordinate + * @param y the Y co-ordinate + * @param z the Z co-ordinate * @return the block at the given position */ public Block getRelativeBlock(World w, int x, int y, int z) { @@ -663,8 +619,8 @@ public List getChunks() { int x2 = getUpperX() & ~0xf; int z1 = getLowerZ() & ~0xf; int z2 = getUpperZ() & ~0xf; - for(int x = x1; x <= x2; x += 16) { - for(int z = z1; z <= z2; z += 16) { + for (int x = x1; x <= x2; x += 16) { + for (int z = z1; z <= z2; z += 16) { res.add(w.getChunkAt(x >> 4, z >> 4)); } } @@ -730,7 +686,7 @@ public enum CuboidDirection { Unknown; public CuboidDirection opposite() { - return switch(this) { + return switch (this) { case North -> South; case East -> West; case South -> North; @@ -774,9 +730,9 @@ public boolean hasNext() { @Override public Block next() { Block b = w.getBlockAt(baseX + x, baseY + y, baseZ + z); - if(++x >= sizeX) { + if (++x >= sizeX) { x = 0; - if(++y >= sizeY) { + if (++y >= sizeY) { y = 0; ++z; } diff --git a/src/main/java/com/volmit/iris/util/data/DataPalette.java b/src/main/java/com/volmit/iris/util/data/DataPalette.java index 669674f88..dcdfc546c 100644 --- a/src/main/java/com/volmit/iris/util/data/DataPalette.java +++ b/src/main/java/com/volmit/iris/util/data/DataPalette.java @@ -39,7 +39,7 @@ public static DataPalette getPalette(IOAdapter adapter, DataInputStrea KList palette = new KList<>(); int s = din.readShort() - Short.MIN_VALUE; - for(int i = 0; i < s; i++) { + for (int i = 0; i < s; i++) { palette.add(adapter.read(din)); } @@ -51,8 +51,8 @@ public KList getPalette() { } public T get(int index) { - synchronized(palette) { - if(!palette.hasIndex(index)) { + synchronized (palette) { + if (!palette.hasIndex(index)) { return null; } @@ -63,10 +63,10 @@ public T get(int index) { public int getIndex(T t) { int v = 0; - synchronized(palette) { + synchronized (palette) { v = palette.indexOf(t); - if(v == -1) { + if (v == -1) { v = palette.size(); palette.add(t); } @@ -76,10 +76,10 @@ public int getIndex(T t) { } public void write(IOAdapter adapter, DataOutputStream dos) throws IOException { - synchronized(palette) { + synchronized (palette) { dos.writeShort(getPalette().size() + Short.MIN_VALUE); - for(T t : palette) { + for (T t : palette) { adapter.write(t, dos); } } diff --git a/src/main/java/com/volmit/iris/util/data/Dimension.java b/src/main/java/com/volmit/iris/util/data/Dimension.java index dd4626793..fac2bcb7f 100644 --- a/src/main/java/com/volmit/iris/util/data/Dimension.java +++ b/src/main/java/com/volmit/iris/util/data/Dimension.java @@ -31,12 +31,9 @@ public class Dimension { /** * Make a dimension * - * @param width - * width of this (X) - * @param height - * the height (Y) - * @param depth - * the depth (Z) + * @param width width of this (X) + * @param height the height (Y) + * @param depth the depth (Z) */ public Dimension(int width, int height, int depth) { this.width = width; @@ -47,10 +44,8 @@ public Dimension(int width, int height, int depth) { /** * Make a dimension * - * @param width - * width of this (X) - * @param height - * the height (Y) + * @param width width of this (X) + * @param height the height (Y) */ public Dimension(int width, int height) { this.width = width; @@ -65,15 +60,15 @@ public Dimension(int width, int height) { * @return the direction of the flat pane or null */ public DimensionFace getPane() { - if(width == 1) { + if (width == 1) { return DimensionFace.X; } - if(height == 1) { + if (height == 1) { return DimensionFace.Y; } - if(depth == 1) { + if (depth == 1) { return DimensionFace.Z; } diff --git a/src/main/java/com/volmit/iris/util/data/DoubleArrayUtils.java b/src/main/java/com/volmit/iris/util/data/DoubleArrayUtils.java index e947ecc41..11de75200 100644 --- a/src/main/java/com/volmit/iris/util/data/DoubleArrayUtils.java +++ b/src/main/java/com/volmit/iris/util/data/DoubleArrayUtils.java @@ -25,7 +25,7 @@ public class DoubleArrayUtils { public static void shiftRight(double[] values, double push) { - if(values.length - 2 + 1 >= 0) System.arraycopy(values, 0, values, 1, values.length - 2 + 1); + if (values.length - 2 + 1 >= 0) System.arraycopy(values, 0, values, 1, values.length - 2 + 1); values[0] = push; } @@ -40,7 +40,7 @@ public static void fill(double[] values, double value) { } public static void fill(AtomicDoubleArray values, double value) { - for(int i = 0; i < values.length(); i++) { + for (int i = 0; i < values.length(); i++) { values.set(i, value); } } diff --git a/src/main/java/com/volmit/iris/util/data/IrisBiomeStorage.java b/src/main/java/com/volmit/iris/util/data/IrisBiomeStorage.java index 7de7820b8..2dc81c542 100644 --- a/src/main/java/com/volmit/iris/util/data/IrisBiomeStorage.java +++ b/src/main/java/com/volmit/iris/util/data/IrisBiomeStorage.java @@ -54,12 +54,12 @@ public IrisBiomeStorage b() { public void inject(BiomeGrid grid) { // TODO: WARNING HEIGHT - for(int i = 0; i < 256; i++) { - for(int j = 0; j < 16; j++) { - for(int k = 0; k < 16; k++) { + for (int i = 0; i < 256; i++) { + for (int j = 0; j < 16; j++) { + for (int k = 0; k < 16; k++) { Biome b = getBiome(j, i, k); - if(b == null || b.equals(Biome.THE_VOID)) { + if (b == null || b.equals(Biome.THE_VOID)) { continue; } diff --git a/src/main/java/com/volmit/iris/util/data/KCache.java b/src/main/java/com/volmit/iris/util/data/KCache.java index b6d47fc96..5f33cdaeb 100644 --- a/src/main/java/com/volmit/iris/util/data/KCache.java +++ b/src/main/java/com/volmit/iris/util/data/KCache.java @@ -26,10 +26,10 @@ public class KCache implements MeteredCache { private final long max; - private CacheLoader loader; private final LoadingCache cache; private final boolean fastDump; private final RollingSequence msu = new RollingSequence(100); + private CacheLoader loader; public KCache(CacheLoader loader, long max) { this(loader, max, false); @@ -44,10 +44,10 @@ public KCache(CacheLoader loader, long max, boolean fastDump) { private LoadingCache create(CacheLoader loader) { return Caffeine - .newBuilder() - .maximumSize(max) - .initialCapacity((int) (max)) - .build((k) -> loader == null ? null : loader.load(k)); + .newBuilder() + .maximumSize(max) + .initialCapacity((int) (max)) + .build((k) -> loader == null ? null : loader.load(k)); } diff --git a/src/main/java/com/volmit/iris/util/data/MaterialBlock.java b/src/main/java/com/volmit/iris/util/data/MaterialBlock.java index 7762d8270..dd6a3b580 100644 --- a/src/main/java/com/volmit/iris/util/data/MaterialBlock.java +++ b/src/main/java/com/volmit/iris/util/data/MaterialBlock.java @@ -36,10 +36,8 @@ public class MaterialBlock { /** * Create a materialblock * - * @param material - * the material - * @param data - * the data + * @param material the material + * @param data the data */ public MaterialBlock(Material material, Byte data) { this.material = material; @@ -88,7 +86,7 @@ public void setData(Byte data) { @Override public String toString() { - if(getData() == 0) { + if (getData() == 0) { return getMaterial().toString(); } @@ -106,21 +104,21 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if(this == obj) { + if (this == obj) { return true; } - if(obj == null) { + if (obj == null) { return false; } - if(getClass() != obj.getClass()) { + if (getClass() != obj.getClass()) { return false; } MaterialBlock other = (MaterialBlock) obj; - if(data == null) { - if(other.data != null) { + if (data == null) { + if (other.data != null) { return false; } - } else if(!data.equals(other.data)) { + } else if (!data.equals(other.data)) { return false; } return material == other.material; diff --git a/src/main/java/com/volmit/iris/util/data/NibbleArray.java b/src/main/java/com/volmit/iris/util/data/NibbleArray.java index 2a493dc8f..33dcc6585 100644 --- a/src/main/java/com/volmit/iris/util/data/NibbleArray.java +++ b/src/main/java/com/volmit/iris/util/data/NibbleArray.java @@ -29,7 +29,7 @@ public class NibbleArray implements Writable { private static final int[] MASKS = new int[8]; static { - for(int i = 0; i < MASKS.length; i++) { + for (int i = 0; i < MASKS.length; i++) { MASKS[i] = maskFor(i); } } @@ -47,7 +47,7 @@ public NibbleArray(int capacity, DataInputStream in) throws IOException { } public NibbleArray(int nibbleDepth, int capacity) { - if(nibbleDepth > 8 || nibbleDepth < 1) { + if (nibbleDepth > 8 || nibbleDepth < 1) { throw new IllegalArgumentException(); } @@ -60,7 +60,7 @@ public NibbleArray(int nibbleDepth, int capacity) { } public NibbleArray(int nibbleDepth, int capacity, NibbleArray existing) { - if(nibbleDepth > 8 || nibbleDepth < 1) { + if (nibbleDepth > 8 || nibbleDepth < 1) { throw new IllegalArgumentException(); } @@ -70,7 +70,7 @@ public NibbleArray(int nibbleDepth, int capacity, NibbleArray existing) { data = new byte[(neededBits + neededBits % 8) / 8]; mask = (byte) maskFor(nibbleDepth); - for(int i = 0; i < Math.min(size, existing.size()); i++) { + for (int i = 0; i < Math.min(size, existing.size()); i++) { set(i, existing.get(i)); } } @@ -82,7 +82,7 @@ public static int maskFor(int amountOfBits) { public static int powerOfTwo(int power) { int result = 1; - for(int i = 0; i < power; i++) { + for (int i = 0; i < power; i++) { result *= 2; } @@ -119,13 +119,13 @@ public int size() { } public byte get(int index) { - synchronized(lock) { + synchronized (lock) { bitIndex = index * depth; byteIndex = bitIndex >> 3; bitInByte = bitIndex & 7; int value = data[byteIndex] >> bitInByte; - if(bitInByte + depth > 8) { + if (bitInByte + depth > 8) { value |= data[byteIndex + 1] << bitInByte; } @@ -150,13 +150,13 @@ public void set(int index, int nibble) { } public void set(int index, byte nybble) { - synchronized(lock) { + synchronized (lock) { bitIndex = index * depth; byteIndex = bitIndex >> 3; bitInByte = bitIndex & 7; data[byteIndex] = (byte) (((~(data[byteIndex] & (mask << bitInByte)) & data[byteIndex]) | ((nybble & mask) << bitInByte)) & 0xff); - if(bitInByte + depth > 8) { + if (bitInByte + depth > 8) { data[byteIndex + 1] = (byte) (((~(data[byteIndex + 1] & MASKS[bitInByte + depth - 8]) & data[byteIndex + 1]) | ((nybble & mask) >> (8 - bitInByte))) & 0xff); } } @@ -169,7 +169,7 @@ public String toBitsString() { public String toBitsString(ByteOrder byteOrder) { StringJoiner joiner = new StringJoiner(" "); - for(byte datum : data) { + for (byte datum : data) { joiner.add(binaryString(datum, byteOrder)); } @@ -181,13 +181,13 @@ public void clear() { } public void setAll(byte nibble) { - for(int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) { set(i, nibble); } } public void setAll(int nibble) { - for(int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) { set(i, (byte) nibble); } } diff --git a/src/main/java/com/volmit/iris/util/data/NibbleDataPalette.java b/src/main/java/com/volmit/iris/util/data/NibbleDataPalette.java index f2a19644c..09fb3954a 100644 --- a/src/main/java/com/volmit/iris/util/data/NibbleDataPalette.java +++ b/src/main/java/com/volmit/iris/util/data/NibbleDataPalette.java @@ -48,7 +48,7 @@ public void write(DataOutputStream o) throws IOException { o.writeByte(bpb + Byte.MIN_VALUE); o.writeByte(palette.size() + Byte.MIN_VALUE); - for(T i : palette) { + for (T i : palette) { writeType(i, o); } @@ -61,7 +61,7 @@ public void read(DataInputStream i) throws IOException { palette = new KList<>(); int v = i.readByte() - Byte.MIN_VALUE; - for(int j = 0; j < v; j++) { + for (int j = 0; j < v; j++) { palette.add(readType(i)); } @@ -69,7 +69,7 @@ public void read(DataInputStream i) throws IOException { } private void expand() { - if(bpb < 8) { + if (bpb < 8) { changeBitsPerBlock(bpb + 1); } else { throw new IndexOutOfBoundsException("The Data Palette can only handle at most 256 block types per 16x16x16 region. We cannot use more than 8 bits per block!"); @@ -80,8 +80,8 @@ public final void optimize() { int targetBits = bpb; int needed = palette.size(); - for(int i = 1; i < bpb; i++) { - if(Math.pow(2, i) > needed) { + for (int i = 1; i < bpb; i++) { + if (Math.pow(2, i) > needed) { targetBits = i; break; } @@ -106,11 +106,11 @@ public final T get(int x, int y, int z) { private int getPaletteId(T d) { int index = palette.indexOf(d); - if(index == -1) { + if (index == -1) { index = palette.size(); palette.add(d); - if(palette.size() > Math.pow(2, bpb)) { + if (palette.size() > Math.pow(2, bpb)) { expand(); } } diff --git a/src/main/java/com/volmit/iris/util/data/Recycler.java b/src/main/java/com/volmit/iris/util/data/Recycler.java index ac4218b08..fc1455607 100644 --- a/src/main/java/com/volmit/iris/util/data/Recycler.java +++ b/src/main/java/com/volmit/iris/util/data/Recycler.java @@ -9,14 +9,12 @@ public class Recycler { private final List> pool; private final Supplier factory; - public Recycler(Supplier factory) - { + public Recycler(Supplier factory) { pool = new CopyOnWriteArrayList<>(); this.factory = factory; } - public int getFreeObjects() - { + public int getFreeObjects() { int m = 0; RecycledObject o; for (RecycledObject tRecycledObject : pool) { @@ -30,8 +28,7 @@ public int getFreeObjects() return m; } - public int getUsedOjects() - { + public int getUsedOjects() { int m = 0; RecycledObject o; for (RecycledObject tRecycledObject : pool) { @@ -45,8 +42,7 @@ public int getUsedOjects() return m; } - public void dealloc(T t) - { + public void dealloc(T t) { RecycledObject o; for (RecycledObject tRecycledObject : pool) { @@ -58,8 +54,7 @@ public void dealloc(T t) } } - public T alloc() - { + public T alloc() { RecycledObject o; for (RecycledObject tRecycledObject : pool) { @@ -74,29 +69,23 @@ public T alloc() return alloc(); } - public boolean contract() - { + public boolean contract() { return contract(Math.max(getFreeObjects() / 2, Runtime.getRuntime().availableProcessors())); } - public boolean contract(int maxFree) - { + public boolean contract(int maxFree) { int remove = getFreeObjects() - maxFree; - if(remove > 0) - { + if (remove > 0) { RecycledObject o; - for(int i = pool.size()-1; i > 0; i--) - { + for (int i = pool.size() - 1; i > 0; i--) { o = pool.get(i); - if(!o.isUsed()) - { + if (!o.isUsed()) { pool.remove(i); remove--; - if(remove <= 0) - { + if (remove <= 0) { return true; } } @@ -106,10 +95,8 @@ public boolean contract(int maxFree) return false; } - public void expand() - { - if(pool.isEmpty()) - { + public void expand() { + if (pool.isEmpty()) { expand(Runtime.getRuntime().availableProcessors()); return; } @@ -117,54 +104,43 @@ public void expand() expand(getUsedOjects() + Runtime.getRuntime().availableProcessors()); } - public void expand(int by) - { - for(int i = 0; i < by; i++) - { + public void expand(int by) { + for (int i = 0; i < by; i++) { pool.add(new RecycledObject<>(factory.get())); } } - public int size() - { + public int size() { return pool.size(); } - public void deallocAll() - { + public void deallocAll() { pool.clear(); } - public static class RecycledObject - { + public static class RecycledObject { private final T object; private final AtomicBoolean used; - public RecycledObject(T object) - { + public RecycledObject(T object) { this.object = object; used = new AtomicBoolean(false); } - public T getObject() - { + public T getObject() { return object; } - public boolean isUsed() - { + public boolean isUsed() { return used.get(); } - public void dealloc() - { + public void dealloc() { used.set(false); } - public boolean alloc() - { - if(used.get()) - { + public boolean alloc() { + if (used.get()) { return false; } diff --git a/src/main/java/com/volmit/iris/util/data/VanillaBiomeMap.java b/src/main/java/com/volmit/iris/util/data/VanillaBiomeMap.java index 43be48b37..bd1db8325 100644 --- a/src/main/java/com/volmit/iris/util/data/VanillaBiomeMap.java +++ b/src/main/java/com/volmit/iris/util/data/VanillaBiomeMap.java @@ -102,8 +102,8 @@ public class VanillaBiomeMap { private static void add(Biome biome, int color, Color randomColor, Luminosity luminosity, SaturationType saturation) { BIOME_HEX.put(biome, color); BIOME_COLOR.put(biome, randomColor); - if(luminosity != null) BIOME_LUMINOSITY.put(biome, luminosity); - if(saturation != null) BIOME_SATURATION.put(biome, saturation); + if (luminosity != null) BIOME_LUMINOSITY.put(biome, luminosity); + if (saturation != null) BIOME_SATURATION.put(biome, saturation); BIOME_IDs.put(biome, (short) biome.ordinal()); } diff --git a/src/main/java/com/volmit/iris/util/data/Varint.java b/src/main/java/com/volmit/iris/util/data/Varint.java index 93eb31812..9a276e68d 100644 --- a/src/main/java/com/volmit/iris/util/data/Varint.java +++ b/src/main/java/com/volmit/iris/util/data/Varint.java @@ -44,12 +44,9 @@ private Varint() { * encode signed values. If values are known to be nonnegative, * {@link #writeUnsignedVarLong(long, DataOutput)} should be used. * - * @param value - * value to encode - * @param out - * to writeNodeData bytes to - * @throws IOException - * if {@link DataOutput} throws {@link IOException} + * @param value value to encode + * @param out to writeNodeData bytes to + * @throws IOException if {@link DataOutput} throws {@link IOException} */ public static void writeSignedVarLong(long value, DataOutput out) throws IOException { // Great trick from http://code.google.com/apis/protocolbuffers/docs/encoding.html#types @@ -63,15 +60,12 @@ public static void writeSignedVarLong(long value, DataOutput out) throws IOExcep * If values can be negative, use {@link #writeSignedVarLong(long, DataOutput)} * instead. This method treats negative input as like a large unsigned value. * - * @param value - * value to encode - * @param out - * to writeNodeData bytes to - * @throws IOException - * if {@link DataOutput} throws {@link IOException} + * @param value value to encode + * @param out to writeNodeData bytes to + * @throws IOException if {@link DataOutput} throws {@link IOException} */ public static void writeUnsignedVarLong(long value, DataOutput out) throws IOException { - while((value & 0xFFFFFFFFFFFFFF80L) != 0L) { + while ((value & 0xFFFFFFFFFFFFFF80L) != 0L) { out.writeByte(((int) value & 0x7F) | 0x80); value >>>= 7; } @@ -90,7 +84,7 @@ public static void writeSignedVarInt(int value, DataOutput out) throws IOExcepti * @see #writeUnsignedVarLong(long, DataOutput) */ public static void writeUnsignedVarInt(int value, DataOutput out) throws IOException { - while((value & 0xFFFFFF80) != 0L) { + while ((value & 0xFFFFFF80) != 0L) { out.writeByte((value & 0x7F) | 0x80); value >>>= 7; } @@ -111,27 +105,24 @@ public static byte[] writeSignedVarInt(int value) { public static byte[] writeUnsignedVarInt(int value) { byte[] byteArrayList = new byte[10]; int i = 0; - while((value & 0xFFFFFF80) != 0L) { + while ((value & 0xFFFFFF80) != 0L) { byteArrayList[i++] = ((byte) ((value & 0x7F) | 0x80)); value >>>= 7; } byteArrayList[i] = ((byte) (value & 0x7F)); byte[] out = new byte[i + 1]; - for(; i >= 0; i--) { + for (; i >= 0; i--) { out[i] = byteArrayList[i]; } return out; } /** - * @param in - * to read bytes from + * @param in to read bytes from * @return decode value - * @throws IOException - * if {@link DataInput} throws {@link IOException} - * @throws IllegalArgumentException - * if variable-length value does not terminate - * after 9 bytes have been read + * @throws IOException if {@link DataInput} throws {@link IOException} + * @throws IllegalArgumentException if variable-length value does not terminate + * after 9 bytes have been read * @see #writeSignedVarLong(long, DataOutput) */ public static long readSignedVarLong(DataInput in) throws IOException { @@ -145,24 +136,21 @@ public static long readSignedVarLong(DataInput in) throws IOException { } /** - * @param in - * to read bytes from + * @param in to read bytes from * @return decode value - * @throws IOException - * if {@link DataInput} throws {@link IOException} - * @throws IllegalArgumentException - * if variable-length value does not terminate - * after 9 bytes have been read + * @throws IOException if {@link DataInput} throws {@link IOException} + * @throws IllegalArgumentException if variable-length value does not terminate + * after 9 bytes have been read * @see #writeUnsignedVarLong(long, DataOutput) */ public static long readUnsignedVarLong(DataInput in) throws IOException { long value = 0L; int i = 0; long b; - while(((b = in.readByte()) & 0x80L) != 0) { + while (((b = in.readByte()) & 0x80L) != 0) { value |= (b & 0x7F) << i; i += 7; - if(i > 63) { + if (i > 63) { throw new IllegalArgumentException("Variable length quantity is too long"); } } @@ -170,11 +158,9 @@ public static long readUnsignedVarLong(DataInput in) throws IOException { } /** - * @throws IllegalArgumentException - * if variable-length value does not terminate - * after 5 bytes have been read - * @throws IOException - * if {@link DataInput} throws {@link IOException} + * @throws IllegalArgumentException if variable-length value does not terminate + * after 5 bytes have been read + * @throws IOException if {@link DataInput} throws {@link IOException} * @see #readSignedVarLong(DataInput) */ public static int readSignedVarInt(DataInput in) throws IOException { @@ -188,21 +174,19 @@ public static int readSignedVarInt(DataInput in) throws IOException { } /** - * @throws IllegalArgumentException - * if variable-length value does not terminate - * after 5 bytes have been read - * @throws IOException - * if {@link DataInput} throws {@link IOException} + * @throws IllegalArgumentException if variable-length value does not terminate + * after 5 bytes have been read + * @throws IOException if {@link DataInput} throws {@link IOException} * @see #readUnsignedVarLong(DataInput) */ public static int readUnsignedVarInt(DataInput in) throws IOException { int value = 0; int i = 0; int b; - while(((b = in.readByte()) & 0x80) != 0) { + while (((b = in.readByte()) & 0x80) != 0) { value |= (b & 0x7F) << i; i += 7; - if(i > 35) { + if (i > 35) { throw new IllegalArgumentException("Variable length quantity is too long"); } } @@ -223,14 +207,14 @@ public static int readUnsignedVarInt(byte[] bytes) { int value = 0; int i = 0; byte rb = Byte.MIN_VALUE; - for(byte b : bytes) { + for (byte b : bytes) { rb = b; - if((b & 0x80) == 0) { + if ((b & 0x80) == 0) { break; } value |= (b & 0x7f) << i; i += 7; - if(i > 35) { + if (i > 35) { throw new IllegalArgumentException("Variable length quantity is too long"); } } diff --git a/src/main/java/com/volmit/iris/util/data/WeightMap.java b/src/main/java/com/volmit/iris/util/data/WeightMap.java index c2d643ee3..7ab3d0a6f 100644 --- a/src/main/java/com/volmit/iris/util/data/WeightMap.java +++ b/src/main/java/com/volmit/iris/util/data/WeightMap.java @@ -26,7 +26,7 @@ public class WeightMap extends KMap { private double lastWeight = 0; public double getPercentChance(T t) { - if(totalWeight() <= 0) { + if (totalWeight() <= 0) { return 0; } @@ -49,7 +49,7 @@ public double getWeight(T t) { } public double totalWeight() { - if(!modified) { + if (!modified) { return lastWeight; } diff --git a/src/main/java/com/volmit/iris/util/data/WeightedRandom.java b/src/main/java/com/volmit/iris/util/data/WeightedRandom.java index c2fdb0fd1..16cdd6b4e 100644 --- a/src/main/java/com/volmit/iris/util/data/WeightedRandom.java +++ b/src/main/java/com/volmit/iris/util/data/WeightedRandom.java @@ -45,7 +45,7 @@ public void put(T object, int weight) { public T pullRandom() { int pull = random.nextInt(totalWeight); int index = 0; - while(pull > 0) { + while (pull > 0) { pull -= weightedObjects.get(index).getV(); index++; } diff --git a/src/main/java/com/volmit/iris/util/data/palette/BitStorage.java b/src/main/java/com/volmit/iris/util/data/palette/BitStorage.java index 714fd2761..22b965be9 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/BitStorage.java +++ b/src/main/java/com/volmit/iris/util/data/palette/BitStorage.java @@ -24,27 +24,27 @@ import java.util.function.IntConsumer; public class BitStorage { - private static final int[] MAGIC = new int[] { - -1, -1, 0, Integer.MIN_VALUE, 0, 0, 1431655765, 1431655765, 0, Integer.MIN_VALUE, - 0, 1, 858993459, 858993459, 0, 715827882, 715827882, 0, 613566756, 613566756, - 0, Integer.MIN_VALUE, 0, 2, 477218588, 477218588, 0, 429496729, 429496729, 0, - 390451572, 390451572, 0, 357913941, 357913941, 0, 330382099, 330382099, 0, 306783378, - 306783378, 0, 286331153, 286331153, 0, Integer.MIN_VALUE, 0, 3, 252645135, 252645135, - 0, 238609294, 238609294, 0, 226050910, 226050910, 0, 214748364, 214748364, 0, - 204522252, 204522252, 0, 195225786, 195225786, 0, 186737708, 186737708, 0, 178956970, - 178956970, 0, 171798691, 171798691, 0, 165191049, 165191049, 0, 159072862, 159072862, - 0, 153391689, 153391689, 0, 148102320, 148102320, 0, 143165576, 143165576, 0, - 138547332, 138547332, 0, Integer.MIN_VALUE, 0, 4, 130150524, 130150524, 0, 126322567, - 126322567, 0, 122713351, 122713351, 0, 119304647, 119304647, 0, 116080197, 116080197, - 0, 113025455, 113025455, 0, 110127366, 110127366, 0, 107374182, 107374182, 0, - 104755299, 104755299, 0, 102261126, 102261126, 0, 99882960, 99882960, 0, 97612893, - 97612893, 0, 95443717, 95443717, 0, 93368854, 93368854, 0, 91382282, 91382282, - 0, 89478485, 89478485, 0, 87652393, 87652393, 0, 85899345, 85899345, 0, - 84215045, 84215045, 0, 82595524, 82595524, 0, 81037118, 81037118, 0, 79536431, - 79536431, 0, 78090314, 78090314, 0, 76695844, 76695844, 0, 75350303, 75350303, - 0, 74051160, 74051160, 0, 72796055, 72796055, 0, 71582788, 71582788, 0, - 70409299, 70409299, 0, 69273666, 69273666, 0, 68174084, 68174084, 0, Integer.MIN_VALUE, - 0, 5}; + private static final int[] MAGIC = new int[]{ + -1, -1, 0, Integer.MIN_VALUE, 0, 0, 1431655765, 1431655765, 0, Integer.MIN_VALUE, + 0, 1, 858993459, 858993459, 0, 715827882, 715827882, 0, 613566756, 613566756, + 0, Integer.MIN_VALUE, 0, 2, 477218588, 477218588, 0, 429496729, 429496729, 0, + 390451572, 390451572, 0, 357913941, 357913941, 0, 330382099, 330382099, 0, 306783378, + 306783378, 0, 286331153, 286331153, 0, Integer.MIN_VALUE, 0, 3, 252645135, 252645135, + 0, 238609294, 238609294, 0, 226050910, 226050910, 0, 214748364, 214748364, 0, + 204522252, 204522252, 0, 195225786, 195225786, 0, 186737708, 186737708, 0, 178956970, + 178956970, 0, 171798691, 171798691, 0, 165191049, 165191049, 0, 159072862, 159072862, + 0, 153391689, 153391689, 0, 148102320, 148102320, 0, 143165576, 143165576, 0, + 138547332, 138547332, 0, Integer.MIN_VALUE, 0, 4, 130150524, 130150524, 0, 126322567, + 126322567, 0, 122713351, 122713351, 0, 119304647, 119304647, 0, 116080197, 116080197, + 0, 113025455, 113025455, 0, 110127366, 110127366, 0, 107374182, 107374182, 0, + 104755299, 104755299, 0, 102261126, 102261126, 0, 99882960, 99882960, 0, 97612893, + 97612893, 0, 95443717, 95443717, 0, 93368854, 93368854, 0, 91382282, 91382282, + 0, 89478485, 89478485, 0, 87652393, 87652393, 0, 85899345, 85899345, 0, + 84215045, 84215045, 0, 82595524, 82595524, 0, 81037118, 81037118, 0, 79536431, + 79536431, 0, 78090314, 78090314, 0, 76695844, 76695844, 0, 75350303, 75350303, + 0, 74051160, 74051160, 0, 72796055, 72796055, 0, 71582788, 71582788, 0, + 70409299, 70409299, 0, 69273666, 69273666, 0, 68174084, 68174084, 0, Integer.MIN_VALUE, + 0, 5}; private final AtomicLongArray data; private final int bits; @@ -59,32 +59,6 @@ public BitStorage(int bits, int length) { this(bits, length, (AtomicLongArray) null); } - private static AtomicLongArray atomic(long[] data) { - if(data == null) { - return null; - } - - AtomicLongArray d = new AtomicLongArray(data.length); - for(int i = 0; i < data.length; i++) { - d.set(i, data[i]); - } - - return d; - } - - private static long[] atomic(AtomicLongArray data) { - if(data == null) { - return null; - } - - long[] d = new long[data.length()]; - for(int i = 0; i < data.length(); i++) { - d[i] = data.get(i); - } - - return d; - } - public BitStorage(int bits, int length, long[] data) { this(bits, length, atomic(data)); } @@ -100,8 +74,8 @@ public BitStorage(int bits, int length, AtomicLongArray data) { this.divideAdd = MAGIC[var3 + 1]; this.divideShift = MAGIC[var3 + 2]; int var4 = (length + this.valuesPerLong - 1) / this.valuesPerLong; - if(data != null) { - if(data.length() != var4) { + if (data != null) { + if (data.length() != var4) { throw new RuntimeException("NO!"); } this.data = data; @@ -110,6 +84,32 @@ public BitStorage(int bits, int length, AtomicLongArray data) { } } + private static AtomicLongArray atomic(long[] data) { + if (data == null) { + return null; + } + + AtomicLongArray d = new AtomicLongArray(data.length); + for (int i = 0; i < data.length; i++) { + d.set(i, data[i]); + } + + return d; + } + + private static long[] atomic(AtomicLongArray data) { + if (data == null) { + return null; + } + + long[] d = new long[data.length()]; + for (int i = 0; i < data.length(); i++) { + d[i] = data.get(i); + } + + return d; + } + private int cellIndex(int var0) { long var1 = Integer.toUnsignedLong(this.divideMul); long var3 = Integer.toUnsignedLong(this.divideAdd); @@ -159,12 +159,12 @@ public int getBits() { public void getAll(IntConsumer var0) { int var1 = 0; - for(int i = 0; i < data.length(); i++) { + for (int i = 0; i < data.length(); i++) { long var5 = data.get(i); - for(int var7 = 0; var7 < this.valuesPerLong; var7++) { + for (int var7 = 0; var7 < this.valuesPerLong; var7++) { var0.accept((int) (var5 & this.mask)); var5 >>= this.bits; - if(++var1 >= this.size) + if (++var1 >= this.size) return; } } diff --git a/src/main/java/com/volmit/iris/util/data/palette/CrudeIncrementalIntIdentityHashBiMap.java b/src/main/java/com/volmit/iris/util/data/palette/CrudeIncrementalIntIdentityHashBiMap.java index 1f8476db1..92e4c7fb2 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/CrudeIncrementalIntIdentityHashBiMap.java +++ b/src/main/java/com/volmit/iris/util/data/palette/CrudeIncrementalIntIdentityHashBiMap.java @@ -48,14 +48,14 @@ public int getId(K var0) { public K byId(int var0) { - if(var0 < 0 || var0 >= this.byId.length()) { + if (var0 < 0 || var0 >= this.byId.length()) { return null; } return this.byId.get(var0); } private int getValue(int var0) { - if(var0 == -1) { + if (var0 == -1) { return -1; } return this.values.get(var0); @@ -76,7 +76,7 @@ public int add(K var0) { } private int nextId() { - while(nextId < byId.length() && byId.get(nextId) != null) { + while (nextId < byId.length() && byId.get(nextId) != null) { nextId++; } return nextId; @@ -90,8 +90,8 @@ private void grow(int var0) { this.byId = new AtomicReferenceArray<>(var0); this.nextId = 0; this.size = 0; - for(int var3 = 0; var3 < var1.length(); var3++) { - if(var1.get(var3) != null) { + for (int var3 = 0; var3 < var1.length(); var3++) { + if (var1.get(var3) != null) { addMapping(var1.get(var3), var2.get(var3)); } } @@ -99,9 +99,9 @@ private void grow(int var0) { public void addMapping(K var0, int var1) { int var2 = Math.max(var1, this.size + 1); - if(var2 >= this.keys.length() * 0.8F) { + if (var2 >= this.keys.length() * 0.8F) { int i = this.keys.length() << 1; - while(i < var1) + while (i < var1) i <<= 1; grow(i); } @@ -110,7 +110,7 @@ public void addMapping(K var0, int var1) { this.values.set(var3, var1); this.byId.set(var1, var0); this.size++; - if(var1 == this.nextId) + if (var1 == this.nextId) this.nextId++; } @@ -120,19 +120,19 @@ private int hash(K var0) { private int indexOf(K var0, int var1) { int var2; - for(var2 = var1; var2 < this.keys.length(); var2++) { - if(this.keys.get(var2) == null) { + for (var2 = var1; var2 < this.keys.length(); var2++) { + if (this.keys.get(var2) == null) { return 0; } - if(this.keys.get(var2).equals(var0)) + if (this.keys.get(var2).equals(var0)) return var2; - if(this.keys.get(var2) == EMPTY_SLOT) + if (this.keys.get(var2) == EMPTY_SLOT) return -1; } - for(var2 = 0; var2 < var1; var2++) { - if(this.keys.get(var2).equals(var0)) + for (var2 = 0; var2 < var1; var2++) { + if (this.keys.get(var2).equals(var0)) return var2; - if(this.keys.get(var2) == EMPTY_SLOT) + if (this.keys.get(var2) == EMPTY_SLOT) return -1; } return -1; @@ -140,12 +140,12 @@ private int indexOf(K var0, int var1) { private int findEmpty(int var0) { int var1; - for(var1 = var0; var1 < this.keys.length(); var1++) { - if(this.keys.get(var1) == EMPTY_SLOT) + for (var1 = var0; var1 < this.keys.length(); var1++) { + if (this.keys.get(var1) == EMPTY_SLOT) return var1; } - for(var1 = 0; var1 < var0; var1++) { - if(this.keys.get(var1) == EMPTY_SLOT) + for (var1 = 0; var1 < var0; var1++) { + if (this.keys.get(var1) == EMPTY_SLOT) return var1; } throw new RuntimeException("Overflowed :("); @@ -169,12 +169,12 @@ public K next() { public void clear() { - for(int i = 0; i < Math.max(keys.length(), byId.length()); i++) { - if(i < keys.length() - 1) { + for (int i = 0; i < Math.max(keys.length(), byId.length()); i++) { + if (i < keys.length() - 1) { keys.set(i, null); } - if(i < byId.length() - 1) { + if (i < byId.length() - 1) { byId.set(i, null); } } diff --git a/src/main/java/com/volmit/iris/util/data/palette/GlobalPalette.java b/src/main/java/com/volmit/iris/util/data/palette/GlobalPalette.java index 6dc98299f..5697f5c07 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/GlobalPalette.java +++ b/src/main/java/com/volmit/iris/util/data/palette/GlobalPalette.java @@ -28,7 +28,7 @@ public class GlobalPalette implements Palette { public GlobalPalette(T... f) { IdMapper mapper = new IdMapper<>(); - for(T i : f) { + for (T i : f) { mapper.add(i); } registry = mapper; diff --git a/src/main/java/com/volmit/iris/util/data/palette/HashMapPalette.java b/src/main/java/com/volmit/iris/util/data/palette/HashMapPalette.java index bdfb39cee..97cf14800 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/HashMapPalette.java +++ b/src/main/java/com/volmit/iris/util/data/palette/HashMapPalette.java @@ -37,14 +37,14 @@ public HashMapPalette(int var1, PaletteResize var2) { } public int idFor(T var0) { - if(var0 == null) { + if (var0 == null) { return 0; } return this.values.computeIfAbsent(var0, (k) -> { int newId = id++; - if(newId >= 1 << this.bits) { + if (newId >= 1 << this.bits) { Iris.info(newId + " to..."); newId = this.resizeHandler.onResize(this.bits + 1, var0); Iris.info(newId + ".."); diff --git a/src/main/java/com/volmit/iris/util/data/palette/IdMapper.java b/src/main/java/com/volmit/iris/util/data/palette/IdMapper.java index 74d27eeb1..77ddbfa8a 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/IdMapper.java +++ b/src/main/java/com/volmit/iris/util/data/palette/IdMapper.java @@ -49,11 +49,11 @@ public IdMapper(int var0) { public void addMapping(T var0, int var1) { this.tToId.put(var0, Integer.valueOf(var1)); - while(this.idToT.size() <= var1) { + while (this.idToT.size() <= var1) { this.idToT.add(null); } this.idToT.set(var1, var0); - if(this.nextId <= var1) + if (this.nextId <= var1) this.nextId = var1 + 1; } @@ -67,7 +67,7 @@ public int getId(T var0) { } public final T byId(int var0) { - if(var0 >= 0 && var0 < this.idToT.size()) { + if (var0 >= 0 && var0 < this.idToT.size()) { return this.idToT.get(var0); } return null; diff --git a/src/main/java/com/volmit/iris/util/data/palette/LinearPalette.java b/src/main/java/com/volmit/iris/util/data/palette/LinearPalette.java index 0e17042ce..25afb6a0b 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/LinearPalette.java +++ b/src/main/java/com/volmit/iris/util/data/palette/LinearPalette.java @@ -35,17 +35,17 @@ public LinearPalette(int var1, PaletteResize var2) { public int idFor(T var0) { int var1; - for(var1 = 0; var1 < size; var1++) { - if(values.get(var1) == null && var0 == null) { + for (var1 = 0; var1 < size; var1++) { + if (values.get(var1) == null && var0 == null) { return var1; } - if(values.get(var1) != null && values.get(var1).equals(var0)) { + if (values.get(var1) != null && values.get(var1).equals(var0)) { return var1; } } var1 = size; - if(var1 < values.length()) { + if (var1 < values.length()) { values.set(var1, var0); size++; return var1; @@ -54,7 +54,7 @@ public int idFor(T var0) { } public T valueFor(int var0) { - if(var0 >= 0 && var0 < size) { + if (var0 >= 0 && var0 < size) { return this.values.get(var0); } return null; @@ -66,7 +66,7 @@ public int getSize() { @Override public void read(List fromList) { - for(int i = 0; i < fromList.size(); i++) { + for (int i = 0; i < fromList.size(); i++) { values.set(i, fromList.get(i)); } @@ -75,7 +75,7 @@ public void read(List fromList) { @Override public void write(List toList) { - for(int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) { T v = values.get(i); toList.add(v); } diff --git a/src/main/java/com/volmit/iris/util/data/palette/Mth.java b/src/main/java/com/volmit/iris/util/data/palette/Mth.java index a4aa6f132..16ce7c89c 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/Mth.java +++ b/src/main/java/com/volmit/iris/util/data/palette/Mth.java @@ -41,11 +41,11 @@ public class Mth { private static final float[] SIN; private static final Random RANDOM = new Random(); - private static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION = new int[] { - 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, - 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, - 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, - 10, 9}; + private static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION = new int[]{ + 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, + 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, + 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, + 10, 9}; private static final double ONE_SIXTH = 0.16666666666666666D; private static final int FRAC_EXP = 8; private static final int LUT_SIZE = 257; @@ -55,13 +55,13 @@ public class Mth { static { SIN = make(new float[65536], var0 -> { - for(int var1 = 0; var1 < var0.length; var1++) + for (int var1 = 0; var1 < var0.length; var1++) var0[var1] = (float) Math.sin(var1 * Math.PI * 2.0D / 65536.0D); }); } static { - for(int var0 = 0; var0 < 257; var0++) { + for (int var0 = 0; var0 < 257; var0++) { double var1 = var0 / 256.0D; double var3 = Math.asin(var1); COS_TAB[var0] = Math.cos(var3); @@ -132,65 +132,65 @@ public static int ceil(double var0) { } public static byte clamp(byte var0, byte var1, byte var2) { - if(var0 < var1) + if (var0 < var1) return var1; - if(var0 > var2) + if (var0 > var2) return var2; return var0; } public static int clamp(int var0, int var1, int var2) { - if(var0 < var1) + if (var0 < var1) return var1; - if(var0 > var2) + if (var0 > var2) return var2; return var0; } public static long clamp(long var0, long var2, long var4) { - if(var0 < var2) + if (var0 < var2) return var2; - if(var0 > var4) + if (var0 > var4) return var4; return var0; } public static float clamp(float var0, float var1, float var2) { - if(var0 < var1) + if (var0 < var1) return var1; - if(var0 > var2) + if (var0 > var2) return var2; return var0; } public static double clamp(double var0, double var2, double var4) { - if(var0 < var2) + if (var0 < var2) return var2; - if(var0 > var4) + if (var0 > var4) return var4; return var0; } public static double clampedLerp(double var0, double var2, double var4) { - if(var4 < 0.0D) + if (var4 < 0.0D) return var0; - if(var4 > 1.0D) + if (var4 > 1.0D) return var2; return lerp(var4, var0, var2); } public static float clampedLerp(float var0, float var1, float var2) { - if(var2 < 0.0F) + if (var2 < 0.0F) return var0; - if(var2 > 1.0F) + if (var2 > 1.0F) return var1; return lerp(var2, var0, var1); } public static double absMax(double var0, double var2) { - if(var0 < 0.0D) + if (var0 < 0.0D) var0 = -var0; - if(var2 < 0.0D) + if (var2 < 0.0D) var2 = -var2; return (var0 > var2) ? var0 : var2; } @@ -200,26 +200,26 @@ public static int intFloorDiv(int var0, int var1) { } public static int nextInt(Random var0, int var1, int var2) { - if(var1 >= var2) + if (var1 >= var2) return var1; return var0.nextInt(var2 - var1 + 1) + var1; } public static float nextFloat(Random var0, float var1, float var2) { - if(var1 >= var2) + if (var1 >= var2) return var1; return var0.nextFloat() * (var2 - var1) + var1; } public static double nextDouble(Random var0, double var1, double var3) { - if(var1 >= var3) + if (var1 >= var3) return var1; return var0.nextDouble() * (var3 - var1) + var1; } public static double average(long[] var0) { long var1 = 0L; - for(long var6 : var0) + for (long var6 : var0) var1 += var6; return var1 / var0.length; } @@ -246,27 +246,27 @@ public static double positiveModulo(double var0, double var2) { public static int wrapDegrees(int var0) { int var1 = var0 % 360; - if(var1 >= 180) + if (var1 >= 180) var1 -= 360; - if(var1 < -180) + if (var1 < -180) var1 += 360; return var1; } public static float wrapDegrees(float var0) { float var1 = var0 % 360.0F; - if(var1 >= 180.0F) + if (var1 >= 180.0F) var1 -= 360.0F; - if(var1 < -180.0F) + if (var1 < -180.0F) var1 += 360.0F; return var1; } public static double wrapDegrees(double var0) { double var2 = var0 % 360.0D; - if(var2 >= 180.0D) + if (var2 >= 180.0D) var2 -= 360.0D; - if(var2 < -180.0D) + if (var2 < -180.0D) var2 += 360.0D; return var2; } @@ -287,7 +287,7 @@ public static float rotateIfNecessary(float var0, float var1, float var2) { public static float approach(float var0, float var1, float var2) { var2 = abs(var2); - if(var0 < var1) + if (var0 < var1) return clamp(var0 + var2, var0, var1); return clamp(var0 - var2, var1, var0); } @@ -308,7 +308,7 @@ public static int getInt(String var0, int var1, int var2) { public static double getDouble(String var0, double var1) { try { return Double.parseDouble(var0); - } catch(Throwable var3) { + } catch (Throwable var3) { return var1; } } @@ -404,16 +404,16 @@ public static double inverseLerp(double var0, double var2, double var4) { public static double atan2(double var0, double var2) { double var4 = var2 * var2 + var0 * var0; - if(Double.isNaN(var4)) + if (Double.isNaN(var4)) return Double.NaN; boolean var6 = (var0 < 0.0D); - if(var6) + if (var6) var0 = -var0; boolean var7 = (var2 < 0.0D); - if(var7) + if (var7) var2 = -var2; boolean var8 = (var0 > var2); - if(var8) { + if (var8) { double d = var2; var2 = var0; var0 = d; @@ -429,11 +429,11 @@ public static double atan2(double var0, double var2) { double var20 = var0 * var16 - var2 * var18; double var22 = (6.0D + var20 * var20) * var20 * 0.16666666666666666D; double var24 = var14 + var22; - if(var8) + if (var8) var24 = 1.5707963267948966D - var24; - if(var7) + if (var7) var24 = Math.PI - var24; - if(var6) + if (var6) var24 = -var24; return var24; } @@ -472,7 +472,7 @@ public static int hsvToRgb(float var0, float var1, float var2) { float var5 = var2 * (1.0F - var1); float var6 = var2 * (1.0F - var4 * var1); float var7 = var2 * (1.0F - (1.0F - var4) * var1); - switch(var3) { + switch (var3) { case 0: var8 = var2; var9 = var7; @@ -545,20 +545,20 @@ public static long murmurHash3Mixer(long var0) { public static double[] cumulativeSum(double... var0) { float var1 = 0.0F; - for(double var5 : var0) + for (double var5 : var0) var1 = (float) (var1 + var5); int var2; - for(var2 = 0; var2 < var0.length; var2++) + for (var2 = 0; var2 < var0.length; var2++) var0[var2] = var0[var2] / var1; - for(var2 = 0; var2 < var0.length; var2++) + for (var2 = 0; var2 < var0.length; var2++) var0[var2] = ((var2 == 0) ? 0.0D : var0[var2 - 1]) + var0[var2]; return var0; } public static int getRandomForDistributionIntegral(Random var0, double[] var1) { double var2 = var0.nextDouble(); - for(int var4 = 0; var4 < var1.length; var4++) { - if(var2 < var1[var4]) + for (int var4 = 0; var4 < var1.length; var4++) { + if (var2 < var1[var4]) return var4; } return var1.length; @@ -567,10 +567,10 @@ public static int getRandomForDistributionIntegral(Random var0, double[] var1) { public static double[] binNormalDistribution(double var0, double var2, double var4, int var6, int var7) { double[] var8 = new double[var7 - var6 + 1]; int var9 = 0; - for(int var10 = var6; var10 <= var7; var10++) { + for (int var10 = var6; var10 <= var7; var10++) { var8[var9] = Math.max(0.0D, var0 * - StrictMath.exp(-(var10 - var4) * (var10 - var4) / 2.0D * var2 * var2)); + StrictMath.exp(-(var10 - var4) * (var10 - var4) / 2.0D * var2 * var2)); var9++; } return var8; @@ -579,11 +579,11 @@ public static double[] binNormalDistribution(double var0, double var2, double va public static double[] binBiModalNormalDistribution(double var0, double var2, double var4, double var6, double var8, double var10, int var12, int var13) { double[] var14 = new double[var13 - var12 + 1]; int var15 = 0; - for(int var16 = var12; var16 <= var13; var16++) { + for (int var16 = var12; var16 <= var13; var16++) { var14[var15] = Math.max(0.0D, var0 * - StrictMath.exp(-(var16 - var4) * (var16 - var4) / 2.0D * var2 * var2) + var6 * - StrictMath.exp(-(var16 - var10) * (var16 - var10) / 2.0D * var8 * var8)); + StrictMath.exp(-(var16 - var4) * (var16 - var4) / 2.0D * var2 * var2) + var6 * + StrictMath.exp(-(var16 - var10) * (var16 - var10) / 2.0D * var8 * var8)); var15++; } return var14; @@ -592,7 +592,7 @@ public static double[] binBiModalNormalDistribution(double var0, double var2, do public static double[] binLogDistribution(double var0, double var2, int var4, int var5) { double[] var6 = new double[var5 - var4 + 1]; int var7 = 0; - for(int var8 = var4; var8 <= var5; var8++) { + for (int var8 = var4; var8 <= var5; var8++) { var6[var7] = Math.max(var0 * StrictMath.log(var8) + var2, 0.0D); var7++; } @@ -610,15 +610,15 @@ public static double lerp(double var0, double var2, double var4) { public static double lerp2(double var0, double var2, double var4, double var6, double var8, double var10) { return lerp(var2, - lerp(var0, var4, var6), - lerp(var0, var8, var10)); + lerp(var0, var4, var6), + lerp(var0, var8, var10)); } public static double lerp3(double var0, double var2, double var4, double var6, double var8, double var10, double var12, double var14, double var16, double var18, double var20) { return lerp(var4, - lerp2(var0, var2, var6, var8, var10, var12), - lerp2(var0, var2, var14, var16, var18, var20)); + lerp2(var0, var2, var6, var8, var10, var12), + lerp2(var0, var2, var14, var16, var18, var20)); } public static double smoothstep(double var0) { @@ -630,7 +630,7 @@ public static double smoothstepDerivative(double var0) { } public static int sign(double var0) { - if(var0 == 0.0D) + if (var0 == 0.0D) return 0; return (var0 > 0.0D) ? 1 : -1; } @@ -646,18 +646,18 @@ public static float diffuseLight(float var0, float var1, float var2) { @Deprecated public static float rotlerp(float var0, float var1, float var2) { float var3 = var1 - var0; - while(var3 < -180.0F) + while (var3 < -180.0F) var3 += 360.0F; - while(var3 >= 180.0F) + while (var3 >= 180.0F) var3 -= 360.0F; return var0 + var2 * var3; } @Deprecated public static float rotWrap(double var0) { - while(var0 >= 180.0D) + while (var0 >= 180.0D) var0 -= 360.0D; - while(var0 < -180.0D) + while (var0 < -180.0D) var0 += 360.0D; return (float) var0; } diff --git a/src/main/java/com/volmit/iris/util/data/palette/PaletteType.java b/src/main/java/com/volmit/iris/util/data/palette/PaletteType.java index d228f49b0..039b821b7 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/PaletteType.java +++ b/src/main/java/com/volmit/iris/util/data/palette/PaletteType.java @@ -33,7 +33,7 @@ public interface PaletteType { default void writeList(DataOutputStream dos, List list) throws IOException { Varint.writeUnsignedVarInt(list.size(), dos); - for(T i : list) { + for (T i : list) { writePaletteNode(dos, i); } } @@ -42,7 +42,7 @@ default List readList(DataInputStream din) throws IOException { int v = Varint.readUnsignedVarInt(din); List t = new ArrayList<>(); - for(int i = 0; i < v; i++) { + for (int i = 0; i < v; i++) { t.add(readPaletteNode(din)); } diff --git a/src/main/java/com/volmit/iris/util/data/palette/PalettedContainer.java b/src/main/java/com/volmit/iris/util/data/palette/PalettedContainer.java index c44dd35ff..eb3601c32 100644 --- a/src/main/java/com/volmit/iris/util/data/palette/PalettedContainer.java +++ b/src/main/java/com/volmit/iris/util/data/palette/PalettedContainer.java @@ -42,11 +42,11 @@ private static int getIndex(int var0, int var1, int var2) { } private void setBits(int var0) { - if(var0 == this.bits) { + if (var0 == this.bits) { return; } this.bits = var0; - if(this.bits <= 4) { + if (this.bits <= 4) { this.bits = 4; this.palette = new LinearPalette<>(this.bits, this); } else { @@ -61,9 +61,9 @@ public int onResize(int var0, T var1) { BitStorage var2 = this.storage; Palette var3 = this.palette; setBits(var0); - for(int var4 = 0; var4 < var2.getSize(); var4++) { + for (int var4 = 0; var4 < var2.getSize(); var4++) { T var5 = var3.valueFor(var2.get(var4)); - if(var5 != null) { + if (var5 != null) { set(var4, var5); } } @@ -92,7 +92,7 @@ public void set(int var0, int var1, int var2, T var3) { private void set(int var0, T var1) { int var2 = this.palette.idFor(var1); - if(M.r(0.003)) { + if (M.r(0.003)) { Iris.info("ID for " + var1 + " is " + var2 + " Palette: " + palette.getSize()); } @@ -109,17 +109,17 @@ protected T get(int var0) { public void read(List palette, long[] data) { int var2 = Math.max(4, Mth.ceillog2(palette.size())); - if(var2 != this.bits) { + if (var2 != this.bits) { setBits(var2); } this.palette.read(palette); int var3 = data.length * 64 / 4096; - if(var3 == this.bits) { + if (var3 == this.bits) { System.arraycopy(data, 0, this.storage.getRaw(), 0, data.length); } else { BitStorage var4 = new BitStorage(var3, 4096, data); - for(int var5 = 0; var5 < 4096; var5++) { + for (int var5 = 0; var5 < 4096; var5++) { this.storage.set(var5, var4.get(var5)); } } @@ -130,9 +130,9 @@ public long[] write(List toList) { T var4 = null; int var5 = 0; int[] var6 = new int[4096]; - for(int i = 0; i < 4096; i++) { + for (int i = 0; i < 4096; i++) { T t = get(i); - if(t != var4) { + if (t != var4) { var4 = t; var5 = var3.idFor(t); } @@ -142,7 +142,7 @@ public long[] write(List toList) { var3.write(toList); int var8 = Math.max(4, Mth.ceillog2(toList.size())); BitStorage var9 = new BitStorage(var8, 4096); - for(int var10 = 0; var10 < var6.length; var10++) { + for (int var10 = 0; var10 < var6.length; var10++) { var9.set(var10, var6[var10]); } return var9.getRaw(); diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeContext.java b/src/main/java/com/volmit/iris/util/decree/DecreeContext.java index 4a1ad0cfc..f8ee1e233 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeContext.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeContext.java @@ -31,12 +31,12 @@ public static VolmitSender get() { } public static void touch(VolmitSender c) { - synchronized(context) { + synchronized (context) { context.put(Thread.currentThread(), c); - if(cl.flip()) { - for(Thread i : context.k()) { - if(!i.isAlive()) { + if (cl.flip()) { + for (Thread i : context.k()) { + if (!i.isAlive()) { context.remove(i); } } diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeContextHandler.java b/src/main/java/com/volmit/iris/util/decree/DecreeContextHandler.java index db2074aab..faa2a29b3 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeContextHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeContextHandler.java @@ -30,8 +30,8 @@ static KMap, DecreeContextHandler> buildContextHandlers() { try { Iris.initialize("com.volmit.iris.util.decree.context").forEach((i) - -> contextHandlers.put(((DecreeContextHandler) i).getType(), (DecreeContextHandler) i)); - } catch(Throwable e) { + -> contextHandlers.put(((DecreeContextHandler) i).getType(), (DecreeContextHandler) i)); + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeExecutor.java b/src/main/java/com/volmit/iris/util/decree/DecreeExecutor.java index 71f196396..8d25d6ca3 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeExecutor.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeExecutor.java @@ -35,9 +35,9 @@ default Player player() { } default Engine engine() { - if(sender().isPlayer() && IrisToolbelt.access(sender().player().getWorld()) != null) { + if (sender().isPlayer() && IrisToolbelt.access(sender().player().getWorld()) != null) { PlatformChunkGenerator gen = IrisToolbelt.access(sender().player().getWorld()); - if(gen != null) { + if (gen != null) { return gen.getEngine(); } } @@ -46,14 +46,14 @@ default Engine engine() { } default PlatformChunkGenerator access() { - if(sender().isPlayer()) { + if (sender().isPlayer()) { return IrisToolbelt.access(world()); } return null; } default World world() { - if(sender().isPlayer()) { + if (sender().isPlayer()) { return sender().player().getWorld(); } return null; diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeNode.java b/src/main/java/com/volmit/iris/util/decree/DecreeNode.java index d647b0cd2..488108699 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeNode.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeNode.java @@ -36,7 +36,7 @@ public DecreeNode(Object instance, Method method) { this.instance = instance; this.method = method; this.decree = method.getDeclaredAnnotation(Decree.class); - if(decree == null) { + if (decree == null) { throw new RuntimeException("Cannot instantiate DecreeNode on method " + method.getName() + " in " + method.getDeclaringClass().getCanonicalName() + " not annotated by @Decree"); } } @@ -50,9 +50,9 @@ public KList getParameters() { KList required = new KList<>(); KList optional = new KList<>(); - for(Parameter i : method.getParameters()) { + for (Parameter i : method.getParameters()) { DecreeParameter p = new DecreeParameter(i); - if(p.isRequired()) { + if (p.isRequired()) { required.add(p); } else { optional.add(p); @@ -80,8 +80,8 @@ public KList getNames() { KList d = new KList<>(); d.add(getName()); - for(String i : decree.aliases()) { - if(i.isEmpty()) { + for (String i : decree.aliases()) { + if (i.isEmpty()) { continue; } diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeOrigin.java b/src/main/java/com/volmit/iris/util/decree/DecreeOrigin.java index 970414f4e..5c09e0790 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeOrigin.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeOrigin.java @@ -31,12 +31,11 @@ public enum DecreeOrigin { /** * Check if the origin is valid for a sender * - * @param sender - * The sender to check + * @param sender The sender to check * @return True if valid for origin */ public boolean validFor(VolmitSender sender) { - if(sender.isPlayer()) { + if (sender.isPlayer()) { return this.equals(PLAYER) || this.equals(BOTH); } else { return this.equals(CONSOLE) || this.equals(BOTH); diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeParameter.java b/src/main/java/com/volmit/iris/util/decree/DecreeParameter.java index d35215490..3a977f87b 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeParameter.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeParameter.java @@ -36,7 +36,7 @@ public class DecreeParameter { public DecreeParameter(Parameter parameter) { this.parameter = parameter; this.param = parameter.getDeclaredAnnotation(Param.class); - if(param == null) { + if (param == null) { throw new RuntimeException("Cannot instantiate DecreeParameter on " + parameter.getName() + " in method " + parameter.getDeclaringExecutable().getName() + "(...) in class " + parameter.getDeclaringExecutable().getDeclaringClass().getCanonicalName() + " not annotated by @Param"); } } @@ -44,12 +44,12 @@ public DecreeParameter(Parameter parameter) { public DecreeParameterHandler getHandler() { return handlerCache.aquire(() -> { try { - if(param.customHandler().equals(DummyHandler.class)) { + if (param.customHandler().equals(DummyHandler.class)) { return DecreeSystem.getHandler(getType()); } return param.customHandler().getConstructor().newInstance(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } @@ -76,8 +76,8 @@ public boolean isRequired() { public KList getNames() { KList d = new KList<>(); - for(String i : param.aliases()) { - if(i.isEmpty()) { + for (String i : param.aliases()) { + if (i.isEmpty()) { continue; } @@ -102,7 +102,7 @@ public String example() { KList ff = getHandler().getPossibilities(); ff = ff != null ? ff : new KList<>(); KList f = ff.convert((i) -> getHandler().toStringForce(i)); - if(f.isEmpty()) { + if (f.isEmpty()) { f = new KList<>(); f.add(getHandler().getRandomDefault()); } diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeParameterHandler.java b/src/main/java/com/volmit/iris/util/decree/DecreeParameterHandler.java index efe11b38d..ee959d2b3 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeParameterHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeParameterHandler.java @@ -38,8 +38,7 @@ default boolean isDummy() { /** * Converting the type back to a string (inverse of the {@link #parse(String) parse} method) * - * @param t - * The input of the designated type to convert to a String + * @param t The input of the designated type to convert to a String * @return The resulting string */ String toString(T t); @@ -47,8 +46,7 @@ default boolean isDummy() { /** * Forces conversion to the designated type before converting to a string using {@link #toString(T t)} * - * @param t - * The object to convert to string (that should be of this type) + * @param t The object to convert to string (that should be of this type) * @return The resulting string. */ default String toStringForce(Object t) { @@ -58,11 +56,9 @@ default String toStringForce(Object t) { /** * Should parse a String into the designated type * - * @param in - * The string to parse + * @param in The string to parse * @return The value extracted from the string, of the designated type - * @throws DecreeParsingException - * Thrown when the parsing fails (ex: "oop" translated to an integer throws this) + * @throws DecreeParsingException Thrown when the parsing fails (ex: "oop" translated to an integer throws this) */ default T parse(String in) throws DecreeParsingException { return parse(in, false); @@ -71,21 +67,17 @@ default T parse(String in) throws DecreeParsingException { /** * Should parse a String into the designated type. You can force it to not throw a whichexception * - * @param in - * The string to parse - * @param force - * force an option instead of throwing decreewhich + * @param in The string to parse + * @param force force an option instead of throwing decreewhich * @return The value extracted from the string, of the designated type - * @throws DecreeParsingException - * Thrown when the parsing fails (ex: "oop" translated to an integer throws this) + * @throws DecreeParsingException Thrown when the parsing fails (ex: "oop" translated to an integer throws this) */ T parse(String in, boolean force) throws DecreeParsingException; /** * Returns whether a certain type is supported by this handler
* - * @param type - * The type to check + * @param type The type to check * @return True if supported, false if not */ boolean supports(Class type); @@ -93,12 +85,11 @@ default T parse(String in) throws DecreeParsingException { /** * The possible entries for the inputted string (support for autocomplete on partial entries) * - * @param input - * The inputted string to check against + * @param input The inputted string to check against * @return A {@link KList} of possibilities */ default KList getPossibilities(String input) { - if(input.trim().isEmpty()) { + if (input.trim().isEmpty()) { KList f = getPossibilities(); return f == null ? new KList<>() : f; } @@ -107,23 +98,23 @@ default KList getPossibilities(String input) { KList possible = getPossibilities(); KList matches = new KList<>(); - if(possible == null || possible.isEmpty()) { + if (possible == null || possible.isEmpty()) { return matches; } - if(input.isEmpty()) { + if (input.isEmpty()) { return getPossibilities(); } KList converted = possible.convert(v -> toString(v).trim()); - for(int i = 0; i < converted.size(); i++) { + for (int i = 0; i < converted.size(); i++) { String g = converted.get(i); // if // G == I or // I in G or // G in I - if(g.equalsIgnoreCase(input) || g.toLowerCase().contains(input.toLowerCase()) || input.toLowerCase().contains(g.toLowerCase())) { + if (g.equalsIgnoreCase(input) || g.toLowerCase().contains(input.toLowerCase()) || input.toLowerCase().contains(g.toLowerCase())) { matches.add(possible.get(i)); } } @@ -139,28 +130,28 @@ default double getMultiplier(AtomicReference g) { double multiplier = 1; String in = g.get(); boolean valid = true; - while(valid) { + while (valid) { boolean trim = false; - if(in.toLowerCase().endsWith("k")) { + if (in.toLowerCase().endsWith("k")) { multiplier *= 1000; trim = true; - } else if(in.toLowerCase().endsWith("m")) { + } else if (in.toLowerCase().endsWith("m")) { multiplier *= 1000000; trim = true; - } else if(in.toLowerCase().endsWith("h")) { + } else if (in.toLowerCase().endsWith("h")) { multiplier *= 100; trim = true; - } else if(in.toLowerCase().endsWith("c")) { + } else if (in.toLowerCase().endsWith("c")) { multiplier *= 16; trim = true; - } else if(in.toLowerCase().endsWith("r")) { + } else if (in.toLowerCase().endsWith("r")) { multiplier *= (16 * 32); trim = true; } else { valid = false; } - if(trim) { + if (trim) { in = in.substring(0, in.length() - 1); } } diff --git a/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java b/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java index fd869c46d..e76f62965 100644 --- a/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java +++ b/src/main/java/com/volmit/iris/util/decree/DecreeSystem.java @@ -47,20 +47,20 @@ static KList enhanceArgs(String[] args) { static KList enhanceArgs(String[] args, boolean trim) { KList a = new KList<>(); - if(args.length == 0) { + if (args.length == 0) { return a; } StringBuilder flat = new StringBuilder(); - for(String i : args) { - if(trim) { - if(i.trim().isEmpty()) { + for (String i : args) { + if (trim) { + if (i.trim().isEmpty()) { continue; } flat.append(" ").append(i.trim()); } else { - if(i.endsWith(" ")) { + if (i.endsWith(" ")) { flat.append(" ").append(i.trim()).append(" "); } } @@ -70,29 +70,29 @@ static KList enhanceArgs(String[] args, boolean trim) { StringBuilder arg = new StringBuilder(); boolean quoting = false; - for(int x = 0; x < flat.length(); x++) { + for (int x = 0; x < flat.length(); x++) { char i = flat.charAt(x); char j = x < flat.length() - 1 ? flat.charAt(x + 1) : i; boolean hasNext = x < flat.length(); - if(i == ' ' && !quoting) { - if(!arg.toString().trim().isEmpty() && trim) { + if (i == ' ' && !quoting) { + if (!arg.toString().trim().isEmpty() && trim) { a.add(arg.toString().trim()); arg = new StringBuilder(); } - } else if(i == '"') { - if(!quoting && (arg.length() == 0)) { + } else if (i == '"') { + if (!quoting && (arg.length() == 0)) { quoting = true; - } else if(quoting) { + } else if (quoting) { quoting = false; - if(hasNext && j == ' ') { - if(!arg.toString().trim().isEmpty() && trim) { + if (hasNext && j == ' ') { + if (!arg.toString().trim().isEmpty() && trim) { a.add(arg.toString().trim()); arg = new StringBuilder(); } - } else if(!hasNext) { - if(!arg.toString().trim().isEmpty() && trim) { + } else if (!hasNext) { + if (!arg.toString().trim().isEmpty() && trim) { a.add(arg.toString().trim()); arg = new StringBuilder(); } @@ -103,7 +103,7 @@ static KList enhanceArgs(String[] args, boolean trim) { } } - if(!arg.toString().trim().isEmpty() && trim) { + if (!arg.toString().trim().isEmpty() && trim) { a.add(arg.toString().trim()); } @@ -113,13 +113,12 @@ static KList enhanceArgs(String[] args, boolean trim) { /** * Get the handler for the specified type * - * @param type - * The type to handle + * @param type The type to handle * @return The corresponding {@link DecreeParameterHandler}, or null */ static DecreeParameterHandler getHandler(Class type) { - for(DecreeParameterHandler i : handlers) { - if(i.supports(type)) { + for (DecreeParameterHandler i : handlers) { + if (i.supports(type)) { return i; } } @@ -144,8 +143,8 @@ default List onTabComplete(@NotNull CommandSender sender, @NotNull Comma KList v = getRoot().tabComplete(enhanced, enhanced.toString(" ")); v.removeDuplicates(); - if(sender instanceof Player) { - if(IrisSettings.get().getGeneral().isCommandSounds()) { + if (sender instanceof Player) { + if (IrisSettings.get().getGeneral().isCommandSounds()) { ((Player) sender).playSound(((Player) sender).getLocation(), Sound.BLOCK_AMETHYST_BLOCK_CHIME, 0.25f, RNG.r.f(0.125f, 1.95f)); } } @@ -155,16 +154,16 @@ default List onTabComplete(@NotNull CommandSender sender, @NotNull Comma @Override default boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { - if(!sender.hasPermission("iris.all")) { + if (!sender.hasPermission("iris.all")) { sender.sendMessage("You lack the Permission 'iris.all'"); return true; } J.aBukkit(() -> { - if(!call(new VolmitSender(sender), args)) { + if (!call(new VolmitSender(sender), args)) { - if(IrisSettings.get().getGeneral().isCommandSounds()) { - if(sender instanceof Player) { + if (IrisSettings.get().getGeneral().isCommandSounds()) { + if (sender instanceof Player) { ((Player) sender).playSound(((Player) sender).getLocation(), Sound.BLOCK_AMETHYST_CLUSTER_BREAK, 0.77f, 0.25f); ((Player) sender).playSound(((Player) sender).getLocation(), Sound.BLOCK_BEACON_DEACTIVATE, 0.2f, 0.45f); } @@ -172,8 +171,8 @@ default boolean onCommand(@NotNull CommandSender sender, @NotNull Command comman sender.sendMessage(C.RED + "Unknown Iris Command"); } else { - if(IrisSettings.get().getGeneral().isCommandSounds()) { - if(sender instanceof Player) { + if (IrisSettings.get().getGeneral().isCommandSounds()) { + if (sender instanceof Player) { ((Player) sender).playSound(((Player) sender).getLocation(), Sound.BLOCK_AMETHYST_CLUSTER_BREAK, 0.77f, 1.65f); ((Player) sender).playSound(((Player) sender).getLocation(), Sound.BLOCK_RESPAWN_ANCHOR_CHARGE, 0.125f, 2.99f); } diff --git a/src/main/java/com/volmit/iris/util/decree/context/BiomeContextHandler.java b/src/main/java/com/volmit/iris/util/decree/context/BiomeContextHandler.java index d99502a9f..3389a6a19 100644 --- a/src/main/java/com/volmit/iris/util/decree/context/BiomeContextHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/context/BiomeContextHandler.java @@ -29,9 +29,9 @@ public Class getType() { } public IrisBiome handle(VolmitSender sender) { - if(sender.isPlayer() - && IrisToolbelt.isIrisWorld(sender.player().getWorld()) - && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { + if (sender.isPlayer() + && IrisToolbelt.isIrisWorld(sender.player().getWorld()) + && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { return IrisToolbelt.access(sender.player().getWorld()).getEngine().getBiomeOrMantle(sender.player().getLocation()); } diff --git a/src/main/java/com/volmit/iris/util/decree/context/DimensionContextHandler.java b/src/main/java/com/volmit/iris/util/decree/context/DimensionContextHandler.java index efd52c31f..1ea77b6d9 100644 --- a/src/main/java/com/volmit/iris/util/decree/context/DimensionContextHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/context/DimensionContextHandler.java @@ -29,9 +29,9 @@ public Class getType() { } public IrisDimension handle(VolmitSender sender) { - if(sender.isPlayer() - && IrisToolbelt.isIrisWorld(sender.player().getWorld()) - && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { + if (sender.isPlayer() + && IrisToolbelt.isIrisWorld(sender.player().getWorld()) + && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { return IrisToolbelt.access(sender.player().getWorld()).getEngine().getDimension(); } diff --git a/src/main/java/com/volmit/iris/util/decree/context/GeneratorContextHandler.java b/src/main/java/com/volmit/iris/util/decree/context/GeneratorContextHandler.java index fd09da671..d6843037d 100644 --- a/src/main/java/com/volmit/iris/util/decree/context/GeneratorContextHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/context/GeneratorContextHandler.java @@ -32,9 +32,9 @@ public Class getType() { @Override public IrisGenerator handle(VolmitSender sender) { - if(sender.isPlayer() - && IrisToolbelt.isIrisWorld(sender.player().getWorld()) - && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { + if (sender.isPlayer() + && IrisToolbelt.isIrisWorld(sender.player().getWorld()) + && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { Engine engine = IrisToolbelt.access(sender.player().getWorld()).getEngine(); return engine.getData().getGeneratorLoader().load(engine.getBiome(sender.player().getLocation()).getGenerators().getRandom().getGenerator()); } diff --git a/src/main/java/com/volmit/iris/util/decree/context/RegionContextHandler.java b/src/main/java/com/volmit/iris/util/decree/context/RegionContextHandler.java index 5ca3b7f97..5ed09c879 100644 --- a/src/main/java/com/volmit/iris/util/decree/context/RegionContextHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/context/RegionContextHandler.java @@ -29,9 +29,9 @@ public Class getType() { } public IrisRegion handle(VolmitSender sender) { - if(sender.isPlayer() - && IrisToolbelt.isIrisWorld(sender.player().getWorld()) - && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { + if (sender.isPlayer() + && IrisToolbelt.isIrisWorld(sender.player().getWorld()) + && IrisToolbelt.access(sender.player().getWorld()).getEngine() != null) { return IrisToolbelt.access(sender.player().getWorld()).getEngine().getRegion(sender.player().getLocation()); } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/BiomeHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/BiomeHandler.java index 64d7635cd..ca950c8e6 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/BiomeHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/BiomeHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisBiome j : data.getBiomeLoader().loadAll(data.getBiomeLoader().getPossibleKeys())) { + for (IrisBiome j : data.getBiomeLoader().loadAll(data.getBiomeLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -56,18 +56,18 @@ public String toString(IrisBiome dim) { @Override public IrisBiome parse(String in, boolean force) throws DecreeParsingException { - if(in.equals("null")) { + if (in.equals("null")) { return null; } KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Biome \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/BlockVectorHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/BlockVectorHandler.java index f456161e9..468050126 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/BlockVectorHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/BlockVectorHandler.java @@ -36,7 +36,7 @@ public KList getPossibilities() { KList vx = new KList<>(); VolmitSender s = DecreeContext.get(); - if(s.isPlayer()) { + if (s.isPlayer()) { vx.add(s.player().getLocation().toVector().toBlockVector()); } @@ -45,7 +45,7 @@ public KList getPossibilities() { @Override public String toString(BlockVector v) { - if(v.getY() == 0) { + if (v.getY() == 0) { return Form.f(v.getBlockX(), 2) + "," + Form.f(v.getBlockZ(), 2); } @@ -55,43 +55,43 @@ public String toString(BlockVector v) { @Override public BlockVector parse(String in, boolean force) throws DecreeParsingException { try { - if(in.contains(",")) { + if (in.contains(",")) { String[] comp = in.split("\\Q,\\E"); - if(comp.length == 2) { + if (comp.length == 2) { return new BlockVector(Integer.parseInt(comp[0].trim()), 0, Integer.parseInt(comp[1].trim())); - } else if(comp.length == 3) { + } else if (comp.length == 3) { return new BlockVector(Integer.parseInt(comp[0].trim()), - Integer.parseInt(comp[1].trim()), - Integer.parseInt(comp[2].trim())); + Integer.parseInt(comp[1].trim()), + Integer.parseInt(comp[2].trim())); } else { throw new DecreeParsingException("Could not parse components for vector. You have " + comp.length + " components. Expected 2 or 3."); } - } else if(in.equalsIgnoreCase("here") || in.equalsIgnoreCase("me") || in.equalsIgnoreCase("self")) { - if(!DecreeContext.get().isPlayer()) { + } else if (in.equalsIgnoreCase("here") || in.equalsIgnoreCase("me") || in.equalsIgnoreCase("self")) { + if (!DecreeContext.get().isPlayer()) { throw new DecreeParsingException("You cannot specify me,self,here as a console."); } return DecreeContext.get().player().getLocation().toVector().toBlockVector(); - } else if(in.equalsIgnoreCase("look") || in.equalsIgnoreCase("cursor") || in.equalsIgnoreCase("crosshair")) { - if(!DecreeContext.get().isPlayer()) { + } else if (in.equalsIgnoreCase("look") || in.equalsIgnoreCase("cursor") || in.equalsIgnoreCase("crosshair")) { + if (!DecreeContext.get().isPlayer()) { throw new DecreeParsingException("You cannot specify look,cursor,crosshair as a console."); } return DecreeContext.get().player().getTargetBlockExact(256, FluidCollisionMode.NEVER).getLocation().toVector().toBlockVector(); - } else if(in.trim().toLowerCase().startsWith("player:")) { + } else if (in.trim().toLowerCase().startsWith("player:")) { String v = in.trim().split("\\Q:\\E")[1]; KList px = DecreeSystem.getHandler(Player.class).getPossibilities(v); - if(px != null && px.isNotEmpty()) { + if (px != null && px.isNotEmpty()) { return ((Player) px.get(0)).getLocation().toVector().toBlockVector(); - } else if(px == null || px.isEmpty()) { + } else if (px == null || px.isEmpty()) { throw new DecreeParsingException("Cannot find player: " + v); } } - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to get Vector for \"" + in + "\" because of an uncaught exception: " + e); } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/BooleanHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/BooleanHandler.java index 9a6355b17..5109425d9 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/BooleanHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/BooleanHandler.java @@ -37,11 +37,11 @@ public String toString(Boolean aByte) { @Override public Boolean parse(String in, boolean force) throws DecreeParsingException { try { - if(in.equals("null") || in.equals("other") || in.equals("flip")) { + if (in.equals("null") || in.equals("other") || in.equals("flip")) { return null; } return Boolean.parseBoolean(in); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to parse boolean \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/ByteHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/ByteHandler.java index 41f9ce831..9c4257529 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/ByteHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/ByteHandler.java @@ -38,7 +38,7 @@ public String toString(Byte aByte) { public Byte parse(String in, boolean force) throws DecreeParsingException { try { return Byte.parseByte(in); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to parse byte \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/CaveHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/CaveHandler.java index 62a02be1c..db8f86651 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/CaveHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/CaveHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisCave j : data.getCaveLoader().loadAll(data.getCaveLoader().getPossibleKeys())) { + for (IrisCave j : data.getCaveLoader().loadAll(data.getCaveLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -56,17 +56,17 @@ public String toString(IrisCave dim) { @Override public IrisCave parse(String in, boolean force) throws DecreeParsingException { - if(in.equals("null")) { + if (in.equals("null")) { return null; } KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Cave \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Cave\"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/DimensionHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/DimensionHandler.java index 16cbbd93a..721577d28 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/DimensionHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/DimensionHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisDimension j : data.getDimensionLoader().loadAll(data.getDimensionLoader().getPossibleKeys())) { + for (IrisDimension j : data.getDimensionLoader().loadAll(data.getDimensionLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -57,19 +57,19 @@ public String toString(IrisDimension dim) { @Override public IrisDimension parse(String in, boolean force) throws DecreeParsingException { - if(in.equalsIgnoreCase("default")) { + if (in.equalsIgnoreCase("default")) { return parse(IrisSettings.get().getGenerator().getDefaultWorldType()); } KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Dimension \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).toList().get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/DoubleHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/DoubleHandler.java index 85974e35d..1918c6292 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/DoubleHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/DoubleHandler.java @@ -38,7 +38,7 @@ public Double parse(String in, boolean force) throws DecreeParsingException { AtomicReference r = new AtomicReference<>(in); double m = getMultiplier(r); return Double.parseDouble(r.get()) * m; - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to parse double \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/EntityHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/EntityHandler.java index e1ba7bd65..68eb3b12b 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/EntityHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/EntityHandler.java @@ -41,10 +41,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisEntity j : data.getEntityLoader().loadAll(data.getEntityLoader().getPossibleKeys())) { + for (IrisEntity j : data.getEntityLoader().loadAll(data.getEntityLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -58,8 +58,7 @@ public KList getPossibilities() { /** * Converting the type back to a string (inverse of the {@link #parse(String) parse} method) * - * @param entity - * The input of the designated type to convert to a String + * @param entity The input of the designated type to convert to a String * @return The resulting string */ @Override @@ -70,22 +69,20 @@ public String toString(IrisEntity entity) { /** * Should parse a String into the designated type * - * @param in - * The string to parse + * @param in The string to parse * @return The value extracted from the string, of the designated type - * @throws DecreeParsingException - * Thrown when the parsing fails (ex: "oop" translated to an integer throws this) + * @throws DecreeParsingException Thrown when the parsing fails (ex: "oop" translated to an integer throws this) */ @Override public IrisEntity parse(String in, boolean force) throws DecreeParsingException { KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Entity \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } @@ -93,8 +90,7 @@ public IrisEntity parse(String in, boolean force) throws DecreeParsingException /** * Returns whether a certain type is supported by this handler
* - * @param type - * The type to check + * @param type The type to check * @return True if supported, false if not */ @Override diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/FloatHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/FloatHandler.java index f64771ad2..f4085e64f 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/FloatHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/FloatHandler.java @@ -38,7 +38,7 @@ public Float parse(String in, boolean force) throws DecreeParsingException { AtomicReference r = new AtomicReference<>(in); double m = getMultiplier(r); return (float) (Float.parseFloat(r.get()) * m); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to parse float \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/GeneratorHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/GeneratorHandler.java index 56590128e..f1619b621 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/GeneratorHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/GeneratorHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisGenerator j : data.getGeneratorLoader().loadAll(data.getGeneratorLoader().getPossibleKeys())) { + for (IrisGenerator j : data.getGeneratorLoader().loadAll(data.getGeneratorLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -58,12 +58,12 @@ public String toString(IrisGenerator gen) { public IrisGenerator parse(String in, boolean force) throws DecreeParsingException { KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Generator \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/IntegerHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/IntegerHandler.java index 477242ad9..c8579b9b0 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/IntegerHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/IntegerHandler.java @@ -37,7 +37,7 @@ public Integer parse(String in, boolean force) throws DecreeParsingException { AtomicReference r = new AtomicReference<>(in); double m = getMultiplier(r); return (int) (Integer.valueOf(r.get()).doubleValue() * m); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to parse integer \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPieceHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPieceHandler.java index 06f84f920..0457674be 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPieceHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPieceHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisJigsawPiece j : data.getJigsawPieceLoader().loadAll(data.getJigsawPieceLoader().getPossibleKeys())) { + for (IrisJigsawPiece j : data.getJigsawPieceLoader().loadAll(data.getJigsawPieceLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -56,17 +56,17 @@ public String toString(IrisJigsawPiece dim) { @Override public IrisJigsawPiece parse(String in, boolean force) throws DecreeParsingException { - if(in.equals("null")) { + if (in.equals("null")) { return null; } KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Jigsaw Piece \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Jigsaw Piece \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPoolHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPoolHandler.java index 3200b22c7..da29d9fe8 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPoolHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/JigsawPoolHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisJigsawPool j : data.getJigsawPoolLoader().loadAll(data.getJigsawPoolLoader().getPossibleKeys())) { + for (IrisJigsawPool j : data.getJigsawPoolLoader().loadAll(data.getJigsawPoolLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -56,17 +56,17 @@ public String toString(IrisJigsawPool dim) { @Override public IrisJigsawPool parse(String in, boolean force) throws DecreeParsingException { - if(in.equals("null")) { + if (in.equals("null")) { return null; } KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Jigsaw Pool \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Jigsaw Pool \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/JigsawStructureHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/JigsawStructureHandler.java index 35fd9215a..21dec6246 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/JigsawStructureHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/JigsawStructureHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisJigsawStructure j : data.getJigsawStructureLoader().loadAll(data.getJigsawStructureLoader().getPossibleKeys())) { + for (IrisJigsawStructure j : data.getJigsawStructureLoader().loadAll(data.getJigsawStructureLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -56,17 +56,17 @@ public String toString(IrisJigsawStructure dim) { @Override public IrisJigsawStructure parse(String in, boolean force) throws DecreeParsingException { - if(in.equals("null")) { + if (in.equals("null")) { return null; } KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Jigsaw Structure \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Jigsaw Structure \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/LongHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/LongHandler.java index a354e8508..d973bc7ea 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/LongHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/LongHandler.java @@ -36,11 +36,11 @@ public Long parse(String in, boolean force) throws DecreeParsingException { try { AtomicReference r = new AtomicReference<>(in); double m = getMultiplier(r); - if(m == 1) + if (m == 1) return Long.parseLong(r.get()); else return (long) (Long.valueOf(r.get()).doubleValue() * m); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to parse long \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/PlayerHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/PlayerHandler.java index 9cf8fade2..ce102b92b 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/PlayerHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/PlayerHandler.java @@ -42,12 +42,12 @@ public String toString(Player player) { public Player parse(String in, boolean force) throws DecreeParsingException { KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Player \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/RegionHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/RegionHandler.java index f5b7e95b3..de77cf01e 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/RegionHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/RegionHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisRegion j : data.getRegionLoader().loadAll(data.getRegionLoader().getPossibleKeys())) { + for (IrisRegion j : data.getRegionLoader().loadAll(data.getRegionLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -56,17 +56,17 @@ public String toString(IrisRegion dim) { @Override public IrisRegion parse(String in, boolean force) throws DecreeParsingException { - if(in.equals("null")) { + if (in.equals("null")) { return null; } KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Region \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/ScriptHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/ScriptHandler.java index 52112a889..65f27c41e 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/ScriptHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/ScriptHandler.java @@ -35,10 +35,10 @@ public KList getPossibilities() { KMap p = new KMap<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); - for(IrisScript j : data.getScriptLoader().loadAll(data.getScriptLoader().getPossibleKeys())) { + for (IrisScript j : data.getScriptLoader().loadAll(data.getScriptLoader().getPossibleKeys())) { p.putIfAbsent(j.getLoadKey(), j); } @@ -58,12 +58,12 @@ public String toString(IrisScript script) { public IrisScript parse(String in, boolean force) throws DecreeParsingException { KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Script \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/ShortHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/ShortHandler.java index 8b72fe9c2..5d7cb6eaa 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/ShortHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/ShortHandler.java @@ -37,7 +37,7 @@ public Short parse(String in, boolean force) throws DecreeParsingException { AtomicReference r = new AtomicReference<>(in); double m = getMultiplier(r); return (short) (Short.valueOf(r.get()).doubleValue() * m); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to parse short \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/StringHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/StringHandler.java index 26557bd74..c4c6bf236 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/StringHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/StringHandler.java @@ -49,6 +49,6 @@ public boolean supports(Class type) { @Override public String getRandomDefault() { return new KList().qadd("text").qadd("string") - .qadd("blah").qadd("derp").qadd("yolo").getRandom(); + .qadd("blah").qadd("derp").qadd("yolo").getRandom(); } } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/VectorHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/VectorHandler.java index 611706b62..b8c63c853 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/VectorHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/VectorHandler.java @@ -32,11 +32,11 @@ public class VectorHandler implements DecreeParameterHandler { private static final KList randoms = new KList<>( - "here", - "0,0,0", - "0,0", - "look", - "player:" + "here", + "0,0,0", + "0,0", + "look", + "player:" ); @Override @@ -46,7 +46,7 @@ public KList getPossibilities() { @Override public String toString(Vector v) { - if(v.getY() == 0) { + if (v.getY() == 0) { return Form.f(v.getX(), 2) + "," + Form.f(v.getZ(), 2); } @@ -56,43 +56,43 @@ public String toString(Vector v) { @Override public Vector parse(String in, boolean force) throws DecreeParsingException { try { - if(in.contains(",")) { + if (in.contains(",")) { String[] comp = in.split("\\Q,\\E"); - if(comp.length == 2) { + if (comp.length == 2) { return new BlockVector(Double.parseDouble(comp[0].trim()), 0, Double.parseDouble(comp[1].trim())); - } else if(comp.length == 3) { + } else if (comp.length == 3) { return new BlockVector(Double.parseDouble(comp[0].trim()), - Double.parseDouble(comp[1].trim()), - Double.parseDouble(comp[2].trim())); + Double.parseDouble(comp[1].trim()), + Double.parseDouble(comp[2].trim())); } else { throw new DecreeParsingException("Could not parse components for vector. You have " + comp.length + " components. Expected 2 or 3."); } - } else if(in.equalsIgnoreCase("here") || in.equalsIgnoreCase("me") || in.equalsIgnoreCase("self")) { - if(!DecreeContext.get().isPlayer()) { + } else if (in.equalsIgnoreCase("here") || in.equalsIgnoreCase("me") || in.equalsIgnoreCase("self")) { + if (!DecreeContext.get().isPlayer()) { throw new DecreeParsingException("You cannot specify me,self,here as a console."); } return DecreeContext.get().player().getLocation().toVector(); - } else if(in.equalsIgnoreCase("look") || in.equalsIgnoreCase("cursor") || in.equalsIgnoreCase("crosshair")) { - if(!DecreeContext.get().isPlayer()) { + } else if (in.equalsIgnoreCase("look") || in.equalsIgnoreCase("cursor") || in.equalsIgnoreCase("crosshair")) { + if (!DecreeContext.get().isPlayer()) { throw new DecreeParsingException("You cannot specify look,cursor,crosshair as a console."); } return DecreeContext.get().player().getTargetBlockExact(256, FluidCollisionMode.NEVER).getLocation().toVector(); - } else if(in.trim().toLowerCase().startsWith("player:")) { + } else if (in.trim().toLowerCase().startsWith("player:")) { String v = in.trim().split("\\Q:\\E")[1]; KList px = DecreeSystem.getHandler(Player.class).getPossibilities(v); - if(px != null && px.isNotEmpty()) { + if (px != null && px.isNotEmpty()) { return ((Player) px.get(0)).getLocation().toVector(); - } else if(px == null || px.isEmpty()) { + } else if (px == null || px.isEmpty()) { throw new DecreeParsingException("Cannot find player: " + v); } } - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to get Vector for \"" + in + "\" because of an uncaught exception: " + e); } diff --git a/src/main/java/com/volmit/iris/util/decree/handlers/WorldHandler.java b/src/main/java/com/volmit/iris/util/decree/handlers/WorldHandler.java index 16debe629..40072d202 100644 --- a/src/main/java/com/volmit/iris/util/decree/handlers/WorldHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/handlers/WorldHandler.java @@ -30,8 +30,8 @@ public class WorldHandler implements DecreeParameterHandler { @Override public KList getPossibilities() { KList options = new KList<>(); - for(World world : Bukkit.getWorlds()) { - if(!world.getName().toLowerCase().startsWith("iris/")) { + for (World world : Bukkit.getWorlds()) { + if (!world.getName().toLowerCase().startsWith("iris/")) { options.add(world); } } @@ -47,12 +47,12 @@ public String toString(World world) { public World parse(String in, boolean force) throws DecreeParsingException { KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find World \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/specialhandlers/ObjectHandler.java b/src/main/java/com/volmit/iris/util/decree/specialhandlers/ObjectHandler.java index 47bb5a5a8..99db24b1e 100644 --- a/src/main/java/com/volmit/iris/util/decree/specialhandlers/ObjectHandler.java +++ b/src/main/java/com/volmit/iris/util/decree/specialhandlers/ObjectHandler.java @@ -33,8 +33,8 @@ public KList getPossibilities() { KList p = new KList<>(); //noinspection ConstantConditions - for(File i : Iris.instance.getDataFolder("packs").listFiles()) { - if(i.isDirectory()) { + for (File i : Iris.instance.getDataFolder("packs").listFiles()) { + if (i.isDirectory()) { IrisData data = IrisData.get(i); p.add(data.getObjectLoader().getPossibleKeys()); } @@ -52,12 +52,12 @@ public String toString(String irisObject) { public String parse(String in, boolean force) throws DecreeParsingException { KList options = getPossibilities(in); - if(options.isEmpty()) { + if (options.isEmpty()) { throw new DecreeParsingException("Unable to find Object \"" + in + "\""); } try { return options.stream().filter((i) -> toString(i).equalsIgnoreCase(in)).collect(Collectors.toList()).get(0); - } catch(Throwable e) { + } catch (Throwable e) { throw new DecreeParsingException("Unable to filter which Biome \"" + in + "\""); } } diff --git a/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java b/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java index 9e97c205d..27cd69af5 100644 --- a/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java +++ b/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java @@ -49,13 +49,13 @@ public class VirtualDecreeCommand { private final VirtualDecreeCommand parent; private final KList nodes; private final DecreeNode node; - String[] gradients = new String[] { - "", - "", - "", - "", - "", - "" + String[] gradients = new String[]{ + "", + "", + "", + "", + "", + "" }; private ChronoLatch cl = new ChronoLatch(1000); @@ -73,19 +73,19 @@ public static VirtualDecreeCommand createRoot(Object v) throws Throwable { public static VirtualDecreeCommand createRoot(VirtualDecreeCommand parent, Object v) throws Throwable { VirtualDecreeCommand c = new VirtualDecreeCommand(v.getClass(), parent, new KList<>(), null); - for(Field i : v.getClass().getDeclaredFields()) { - if(Modifier.isStatic(i.getModifiers()) || Modifier.isFinal(i.getModifiers()) || Modifier.isTransient(i.getModifiers()) || Modifier.isVolatile(i.getModifiers())) { + for (Field i : v.getClass().getDeclaredFields()) { + if (Modifier.isStatic(i.getModifiers()) || Modifier.isFinal(i.getModifiers()) || Modifier.isTransient(i.getModifiers()) || Modifier.isVolatile(i.getModifiers())) { continue; } - if(!i.getType().isAnnotationPresent(Decree.class)) { + if (!i.getType().isAnnotationPresent(Decree.class)) { continue; } i.setAccessible(true); Object childRoot = i.get(v); - if(childRoot == null) { + if (childRoot == null) { childRoot = i.getType().getConstructor().newInstance(); i.set(v, childRoot); } @@ -93,12 +93,12 @@ public static VirtualDecreeCommand createRoot(VirtualDecreeCommand parent, Objec c.getNodes().add(createRoot(c, childRoot)); } - for(Method i : v.getClass().getDeclaredMethods()) { - if(Modifier.isStatic(i.getModifiers()) || Modifier.isFinal(i.getModifiers()) || Modifier.isPrivate(i.getModifiers())) { + for (Method i : v.getClass().getDeclaredMethods()) { + if (Modifier.isStatic(i.getModifiers()) || Modifier.isFinal(i.getModifiers()) || Modifier.isPrivate(i.getModifiers())) { continue; } - if(!i.isAnnotationPresent(Decree.class)) { + if (!i.isAnnotationPresent(Decree.class)) { continue; } @@ -111,11 +111,11 @@ public static VirtualDecreeCommand createRoot(VirtualDecreeCommand parent, Objec public void cacheAll() { VolmitSender sender = new VolmitSender(new CommandDummy()); - if(isNode()) { + if (isNode()) { sender.sendDecreeHelpNode(this); } - for(VirtualDecreeCommand j : nodes) { + for (VirtualDecreeCommand j : nodes) { j.cacheAll(); } } @@ -124,7 +124,7 @@ public String getPath() { KList n = new KList<>(); VirtualDecreeCommand cursor = this; - while(cursor.getParent() != null) { + while (cursor.getParent() != null) { cursor = cursor.getParent(); n.add(cursor.getName()); } @@ -149,15 +149,15 @@ public String getDescription() { } public KList getNames() { - if(isNode()) { + if (isNode()) { return getNode().getNames(); } Decree dc = getType().getDeclaredAnnotation(Decree.class); KList d = new KList<>(); d.add(dc.name()); - for(String i : dc.aliases()) { - if(i.isEmpty()) { + for (String i : dc.aliases()) { + if (i.isEmpty()) { continue; } @@ -181,27 +181,27 @@ public KList tabComplete(KList args, String raw) { } private boolean invokeTabComplete(KList args, KList skip, KList tabs, String raw) { - if(isStudio() && !IrisSettings.get().getStudio().isStudio()) { + if (isStudio() && !IrisSettings.get().getStudio().isStudio()) { return false; } - if(isNode()) { + if (isNode()) { tab(args, tabs); skip.add(hashCode()); return false; } - if(args.isEmpty()) { + if (args.isEmpty()) { tab(args, tabs); return true; } String head = args.get(0); - if(args.size() > 1 || head.endsWith(" ")) { + if (args.size() > 1 || head.endsWith(" ")) { VirtualDecreeCommand match = matchNode(head, skip); - if(match != null) { + if (match != null) { args.pop(); return match.invokeTabComplete(args, skip, tabs, raw); } @@ -220,18 +220,18 @@ private void tab(KList args, KList tabs) { Runnable la = () -> { }; - for(String a : args) { + for (String a : args) { la.run(); last = a; la = () -> { - if(isNode()) { + if (isNode()) { String sea = a.contains("=") ? a.split("\\Q=\\E")[0] : a; sea = sea.trim(); searching: - for(DecreeParameter i : getNode().getParameters()) { - for(String m : i.getNames()) { - if(m.equalsIgnoreCase(sea) || m.toLowerCase().contains(sea.toLowerCase()) || sea.toLowerCase().contains(m.toLowerCase())) { + for (DecreeParameter i : getNode().getParameters()) { + for (String m : i.getNames()) { + if (m.equalsIgnoreCase(sea) || m.toLowerCase().contains(sea.toLowerCase()) || sea.toLowerCase().contains(m.toLowerCase())) { ignore.add(i); continue searching; } @@ -241,37 +241,37 @@ private void tab(KList args, KList tabs) { }; } - if(last != null) { - if(isNode()) { - for(DecreeParameter i : getNode().getParameters()) { - if(ignore.contains(i)) { + if (last != null) { + if (isNode()) { + for (DecreeParameter i : getNode().getParameters()) { + if (ignore.contains(i)) { continue; } int g = 0; - if(last.contains("=")) { + if (last.contains("=")) { String[] vv = last.trim().split("\\Q=\\E"); String vx = vv.length == 2 ? vv[1] : ""; - for(String f : i.getHandler().getPossibilities(vx).convert((v) -> i.getHandler().toStringForce(v))) { + for (String f : i.getHandler().getPossibilities(vx).convert((v) -> i.getHandler().toStringForce(v))) { g++; tabs.add(i.getName() + "=" + f); } } else { - for(String f : i.getHandler().getPossibilities("").convert((v) -> i.getHandler().toStringForce(v))) { + for (String f : i.getHandler().getPossibilities("").convert((v) -> i.getHandler().toStringForce(v))) { g++; tabs.add(i.getName() + "=" + f); } } - if(g == 0) { + if (g == 0) { tabs.add(i.getName() + "="); } } } else { - for(VirtualDecreeCommand i : getNodes()) { + for (VirtualDecreeCommand i : getNodes()) { String m = i.getName(); - if(m.equalsIgnoreCase(last) || m.toLowerCase().contains(last.toLowerCase()) || last.toLowerCase().contains(m.toLowerCase())) { + if (m.equalsIgnoreCase(last) || m.toLowerCase().contains(last.toLowerCase()) || last.toLowerCase().contains(m.toLowerCase())) { tabs.addAll(i.getNames()); } } @@ -282,10 +282,8 @@ private void tab(KList args, KList tabs) { /** * Maps the input a player typed to the parameters of this command * - * @param sender - * The sender - * @param in - * The input + * @param sender The sender + * @param in The input * @return A map of all the parameter names and their values */ private KMap map(VolmitSender sender, KList in) { @@ -296,7 +294,7 @@ private KMap map(VolmitSender sender, KList in) { KList knownInputs = new KList<>(in.stream().filter(s -> s.contains("=")).collect(Collectors.toList())); //Loop known inputs - for(int x = 0; x < knownInputs.size(); x++) { + for (int x = 0; x < knownInputs.size(); x++) { String stringParam = knownInputs.get(x); int original = in.indexOf(stringParam); @@ -306,9 +304,9 @@ private KMap map(VolmitSender sender, KList in) { DecreeParameter param = null; //Find decree parameter from string param - for(DecreeParameter j : getNode().getParameters()) { - for(String k : j.getNames()) { - if(k.equalsIgnoreCase(key)) { + for (DecreeParameter j : getNode().getParameters()) { + for (String k : j.getNames()) { + if (k.equalsIgnoreCase(key)) { param = j; break; } @@ -316,10 +314,10 @@ private KMap map(VolmitSender sender, KList in) { } //If it failed, see if we can find it by checking if the names contain the param - if(param == null) { - for(DecreeParameter j : getNode().getParameters()) { - for(String k : j.getNames()) { - if(k.toLowerCase().contains(key.toLowerCase()) || key.toLowerCase().contains(k.toLowerCase())) { + if (param == null) { + for (DecreeParameter j : getNode().getParameters()) { + for (String k : j.getNames()) { + if (k.toLowerCase().contains(key.toLowerCase()) || key.toLowerCase().contains(k.toLowerCase())) { param = j; break; } @@ -328,7 +326,7 @@ private KMap map(VolmitSender sender, KList in) { } //Still failed to find, error them - if(param == null) { + if (param == null) { Iris.debug("Can't find parameter key for " + key + "=" + value + " in " + getPath()); sender.sendMessage(C.YELLOW + "Unknown Parameter: " + key); unknownInputs.add(value); //Add the value to the unknowns and see if we can assume it later @@ -339,7 +337,7 @@ private KMap map(VolmitSender sender, KList in) { try { data.put(key, param.getHandler().parse(value, nowhich.contains(original))); //Parse and put - } catch(DecreeParsingException e) { + } catch (DecreeParsingException e) { Iris.debug("Can't parse parameter value for " + key + "=" + value + " in " + getPath() + " using handler " + param.getHandler().getClass().getSimpleName()); sender.sendMessage(C.RED + "Cannot convert \"" + value + "\" into a " + param.getType().getSimpleName()); e.printStackTrace(); @@ -351,7 +349,7 @@ private KMap map(VolmitSender sender, KList in) { KList decreeParameters = new KList<>(getNode().getParameters().stream().filter(param -> !data.contains(param.getName())).collect(Collectors.toList())); //Loop Unknown inputs - for(int x = 0; x < unknownInputs.size(); x++) { + for (int x = 0; x < unknownInputs.size(); x++) { String stringParam = unknownInputs.get(x); int original = in.indexOf(stringParam); try { @@ -359,13 +357,13 @@ private KMap map(VolmitSender sender, KList in) { try { data.put(par.getName(), par.getHandler().parse(stringParam, nowhich.contains(original))); - } catch(DecreeParsingException e) { + } catch (DecreeParsingException e) { Iris.debug("Can't parse parameter value for " + par.getName() + "=" + stringParam + " in " + getPath() + " using handler " + par.getHandler().getClass().getSimpleName()); sender.sendMessage(C.RED + "Cannot convert \"" + stringParam + "\" into a " + par.getType().getSimpleName()); e.printStackTrace(); return null; } - } catch(IndexOutOfBoundsException e) { + } catch (IndexOutOfBoundsException e) { sender.sendMessage(C.YELLOW + "Unknown Parameter: " + stringParam + " (" + Form.getNumberSuffixThStRd(x + 1) + " argument)"); } } @@ -378,15 +376,15 @@ public boolean invoke(VolmitSender sender, KList realArgs) { } public boolean invoke(VolmitSender sender, KList args, KList skip) { - if(isStudio() && !IrisSettings.get().getStudio().isStudio()) { + if (isStudio() && !IrisSettings.get().getStudio().isStudio()) { sender.sendMessage(C.RED + "To use Iris Studio Commands, please enable studio in Iris/settings.json (settings auto-reload)"); return false; } Iris.debug("@ " + getPath() + " with " + args.toString(", ")); - if(isNode()) { + if (isNode()) { Iris.debug("Invoke " + getPath() + "(" + args.toString(",") + ") at "); - if(invokeNode(sender, map(sender, args))) { + if (invokeNode(sender, map(sender, args))) { return true; } @@ -394,13 +392,13 @@ public boolean invoke(VolmitSender sender, KList args, KList sk return false; } - if(args.isEmpty()) { + if (args.isEmpty()) { sender.sendDecreeHelp(this); return true; - } else if(args.size() == 1) { - for(String i : args) { - if(i.startsWith("help=")) { + } else if (args.size() == 1) { + for (String i : args) { + if (i.startsWith("help=")) { sender.sendDecreeHelp(this, Integer.parseInt(i.split("\\Q=\\E")[1]) - 1); return true; } @@ -410,7 +408,7 @@ public boolean invoke(VolmitSender sender, KList args, KList sk String head = args.get(0); VirtualDecreeCommand match = matchNode(head, skip); - if(match != null) { + if (match != null) { args.pop(); return match.invoke(sender, args, skip); } @@ -421,33 +419,33 @@ public boolean invoke(VolmitSender sender, KList args, KList sk } private boolean invokeNode(VolmitSender sender, KMap map) { - if(map == null) { + if (map == null) { return false; } Object[] params = new Object[getNode().getMethod().getParameterCount()]; int vm = 0; - for(DecreeParameter i : getNode().getParameters()) { + for (DecreeParameter i : getNode().getParameters()) { Object value = map.get(i.getName()); try { - if(value == null && i.hasDefault()) { + if (value == null && i.hasDefault()) { value = i.getDefaultValue(); } - } catch(DecreeParsingException e) { + } catch (DecreeParsingException e) { Iris.debug("Can't parse parameter value for " + i.getName() + "=" + i.getParam().defaultValue() + " in " + getPath() + " using handler " + i.getHandler().getClass().getSimpleName()); sender.sendMessage(C.RED + "Cannot convert \"" + i.getParam().defaultValue() + "\" into a " + i.getType().getSimpleName()); return false; } - if(sender.isPlayer() && i.isContextual() && value == null) { + if (sender.isPlayer() && i.isContextual() && value == null) { Iris.debug("Contextual!"); DecreeContextHandler ch = DecreeContextHandler.contextHandlers.get(i.getType()); - if(ch != null) { + if (ch != null) { value = ch.handle(sender); - if(value != null) { + if (value != null) { Iris.debug("Parameter \"" + i.getName() + "\" derived a value of \"" + i.getHandler().toStringForce(value) + "\" from " + ch.getClass().getSimpleName()); } else { Iris.debug("Parameter \"" + i.getName() + "\" could not derive a value from \"" + ch.getClass().getSimpleName()); @@ -457,16 +455,16 @@ private boolean invokeNode(VolmitSender sender, KMap map) { } } - if(i.hasDefault() && value == null) { + if (i.hasDefault() && value == null) { try { Iris.debug("Parameter \"" + i.getName() + "\" is using default value \"" + i.getParam().defaultValue() + "\""); value = i.getDefaultValue(); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } } - if(i.isRequired() && value == null) { + if (i.isRequired() && value == null) { sender.sendMessage(C.RED + "Missing argument \"" + i.getName() + "\" (" + i.getType().getSimpleName() + ") as the " + Form.getNumberSuffixThStRd(vm + 1) + " argument."); sender.sendDecreeHelpNode(this); return false; @@ -482,13 +480,13 @@ private boolean invokeNode(VolmitSender sender, KMap map) { DecreeContext.touch(sender); getNode().getMethod().setAccessible(true); getNode().getMethod().invoke(getNode().getInstance(), params); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); throw new RuntimeException("Failed to execute "); // TODO: } }; - if(getNode().isSync()) { + if (getNode().isSync()) { J.s(rx); } else { rx.run(); @@ -500,19 +498,19 @@ private boolean invokeNode(VolmitSender sender, KMap map) { public KList matchAllNodes(String in) { KList g = new KList<>(); - if(in.trim().isEmpty()) { + if (in.trim().isEmpty()) { g.addAll(nodes); return g; } - for(VirtualDecreeCommand i : nodes) { - if(i.matches(in)) { + for (VirtualDecreeCommand i : nodes) { + if (i.matches(in)) { g.add(i); } } - for(VirtualDecreeCommand i : nodes) { - if(i.deepMatches(in)) { + for (VirtualDecreeCommand i : nodes) { + if (i.deepMatches(in)) { g.add(i); } } @@ -522,26 +520,26 @@ public KList matchAllNodes(String in) { } public VirtualDecreeCommand matchNode(String in, KList skip) { - if(in.trim().isEmpty()) { + if (in.trim().isEmpty()) { return null; } - for(VirtualDecreeCommand i : nodes) { - if(skip.contains(i.hashCode())) { + for (VirtualDecreeCommand i : nodes) { + if (skip.contains(i.hashCode())) { continue; } - if(i.matches(in)) { + if (i.matches(in)) { return i; } } - for(VirtualDecreeCommand i : nodes) { - if(skip.contains(i.hashCode())) { + for (VirtualDecreeCommand i : nodes) { + if (skip.contains(i.hashCode())) { continue; } - if(i.deepMatches(in)) { + if (i.deepMatches(in)) { return i; } } @@ -552,8 +550,8 @@ public VirtualDecreeCommand matchNode(String in, KList skip) { public boolean deepMatches(String in) { KList a = getNames(); - for(String i : a) { - if(i.toLowerCase().contains(in.toLowerCase()) || in.toLowerCase().contains(i.toLowerCase())) { + for (String i : a) { + if (i.toLowerCase().contains(in.toLowerCase()) || in.toLowerCase().contains(i.toLowerCase())) { return true; } } @@ -568,7 +566,7 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if(!(obj instanceof VirtualDecreeCommand)) { + if (!(obj instanceof VirtualDecreeCommand)) { return false; } return this.hashCode() == obj.hashCode(); @@ -577,8 +575,8 @@ public boolean equals(Object obj) { public boolean matches(String in) { KList a = getNames(); - for(String i : a) { - if(i.equalsIgnoreCase(in)) { + for (String i : a) { + if (i.equalsIgnoreCase(in)) { return true; } } diff --git a/src/main/java/com/volmit/iris/util/format/C.java b/src/main/java/com/volmit/iris/util/format/C.java index 8876bc922..de1893c8f 100644 --- a/src/main/java/com/volmit/iris/util/format/C.java +++ b/src/main/java/com/volmit/iris/util/format/C.java @@ -253,9 +253,9 @@ public net.md_5.bungee.api.ChatColor asBungee() { * need to dynamically convert colour codes from your custom format. */ public static final char COLOR_CHAR = '\u00A7'; - public final static C[] COLORCYCLE = new C[] {C.GOLD, C.YELLOW, C.GREEN, C.AQUA, C.LIGHT_PURPLE, C.AQUA, C.GREEN, C.YELLOW, C.GOLD, C.RED}; + public final static C[] COLORCYCLE = new C[]{C.GOLD, C.YELLOW, C.GREEN, C.AQUA, C.LIGHT_PURPLE, C.AQUA, C.GREEN, C.YELLOW, C.GOLD, C.RED}; private static final Pattern STRIP_COLOR_PATTERN = Pattern.compile("(?i)" + COLOR_CHAR + "[0-9A-FK-OR]"); - private final static C[] COLORS = new C[] {C.BLACK, C.DARK_BLUE, C.DARK_GREEN, C.DARK_AQUA, C.DARK_RED, C.DARK_PURPLE, C.GOLD, C.GRAY, C.DARK_GRAY, C.BLUE, C.GREEN, C.AQUA, C.RED, C.LIGHT_PURPLE, C.YELLOW, C.WHITE}; + private final static C[] COLORS = new C[]{C.BLACK, C.DARK_BLUE, C.DARK_GREEN, C.DARK_AQUA, C.DARK_RED, C.DARK_PURPLE, C.GOLD, C.GRAY, C.DARK_GRAY, C.BLUE, C.GREEN, C.AQUA, C.RED, C.LIGHT_PURPLE, C.YELLOW, C.WHITE}; @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") private final static Map BY_ID = new HashMap<>(); private final static Map BY_CHAR = new HashMap<>(); @@ -316,7 +316,7 @@ public net.md_5.bungee.api.ChatColor asBungee() { } static { - for(C color : values()) { + for (C color : values()) { BY_ID.put(color.intCode, color); BY_CHAR.put(color.code, color); } @@ -345,15 +345,15 @@ public net.md_5.bungee.api.ChatColor asBungee() { this.token = token.equalsIgnoreCase("^") ? "<" + name().toLowerCase(Locale.ROOT) + ">" : token; this.intCode = intCode; this.isFormat = isFormat; - this.toString = new String(new char[] {COLOR_CHAR, code}); + this.toString = new String(new char[]{COLOR_CHAR, code}); } public static float[] spin(float[] c, int shift) { - return new float[] {spin(c[0], shift), spinc(c[1], shift), spinc(c[2], shift)}; + return new float[]{spin(c[0], shift), spinc(c[1], shift), spinc(c[2], shift)}; } public static float[] spin(float[] c, int a, int b, int d) { - return new float[] {spin(c[0], a), spinc(c[1], b), spinc(c[2], d)}; + return new float[]{spin(c[0], a), spinc(c[1], b), spinc(c[2], d)}; } public static float spin(float c, int shift) { @@ -385,21 +385,21 @@ public static String aura(String s, int hrad, int srad, int vrad, double pulse) StringBuilder b = new StringBuilder(); boolean c = false; - for(char i : msg.toCharArray()) { - if(c) { + for (char i : msg.toCharArray()) { + if (c) { c = false; C o = C.getByChar(i); - if(hrad != 0 || srad != 0 || vrad != 0) { - if(pulse > 0) { + if (hrad != 0 || srad != 0 || vrad != 0) { + if (pulse > 0) { b.append(VolmitSender.pulse(spinToHex(o, hrad, srad, vrad), spinToHex(o, -hrad, -srad, -vrad), pulse)); } else { b.append(""); + .append(spinToHex(o, hrad, srad, vrad)) + .append(":") + .append(spinToHex(o, -hrad, -srad, -vrad)) + .append(">"); } } else { b.append(C.getByChar(i).token); @@ -408,7 +408,7 @@ public static String aura(String s, int hrad, int srad, int vrad, double pulse) continue; } - if(i == C.COLOR_CHAR) { + if (i == C.COLOR_CHAR) { c = true; continue; } @@ -426,8 +426,7 @@ public static String compress(String c) { /** * Gets the color represented by the specified color code * - * @param code - * Code to check + * @param code Code to check * @return Associative {@link org.bukkit.ChatColor} with the given code, or null * if it doesn't exist */ @@ -435,7 +434,7 @@ public static C getByChar(char code) { try { C c = BY_CHAR.get(code); return c == null ? C.WHITE : c; - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return C.WHITE; } @@ -444,8 +443,7 @@ public static C getByChar(char code) { /** * Gets the color represented by the specified color code * - * @param code - * Code to check + * @param code Code to check * @return Associative {@link org.bukkit.ChatColor} with the given code, or null * if it doesn't exist */ @@ -455,7 +453,7 @@ public static C getByChar(String code) { Validate.isTrue(code.length() > 0, "Code must have at least one char"); return BY_CHAR.get(code.charAt(0)); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return C.WHITE; } @@ -464,12 +462,11 @@ public static C getByChar(String code) { /** * Strips the given message of all color codes * - * @param input - * String to strip of color + * @param input String to strip of color * @return A copy of the input string, without any coloring */ public static String stripColor(final String input) { - if(input == null) { + if (input == null) { return null; } @@ -479,12 +476,11 @@ public static String stripColor(final String input) { /** * DyeColor to ChatColor * - * @param dclr - * the dye color + * @param dclr the dye color * @return the color */ public static C dyeToChat(DyeColor dclr) { - if(dyeChatMap.containsKey(dclr)) { + if (dyeChatMap.containsKey(dclr)) { return dyeChatMap.get(dclr); } @@ -492,8 +488,8 @@ public static C dyeToChat(DyeColor dclr) { } public static DyeColor chatToDye(ChatColor color) { - for(Map.Entry entry : dyeChatMap.entrySet()) { - if(entry.getValue().toString().equals(color.toString())) { + for (Map.Entry entry : dyeChatMap.entrySet()) { + if (entry.getValue().toString().equals(color.toString())) { return entry.getKey(); } } @@ -503,7 +499,7 @@ public static DyeColor chatToDye(ChatColor color) { @SuppressWarnings("unlikely-arg-type") public static String chatToHex(C clr) { - if(chatHexMap.containsKey(clr)) { + if (chatHexMap.containsKey(clr)) { return chatHexMap.get(clr); } @@ -511,7 +507,7 @@ public static String chatToHex(C clr) { } public static String dyeToHex(DyeColor clr) { - if(dyeHexMap.containsKey(clr)) { + if (dyeHexMap.containsKey(clr)) { return dyeHexMap.get(clr); } @@ -519,20 +515,20 @@ public static String dyeToHex(DyeColor clr) { } public static Color hexToColor(String hex) { - if(hex.startsWith("#")) { + if (hex.startsWith("#")) { hex = hex.substring(1); } - if(hex.contains("x")) { + if (hex.contains("x")) { hex = hex.substring(hex.indexOf("x")); } - if(hex.length() != 6 && hex.length() != 3) { + if (hex.length() != 6 && hex.length() != 3) { return null; } int sz = hex.length() / 3, mult = 1 << ((2 - sz) * 4), x = 0; - for(int i = 0, z = 0; z < hex.length(); ++i, z += sz) { + for (int i = 0, z = 0; z < hex.length(); ++i, z += sz) { x |= (mult * Integer.parseInt(hex.substring(z, z + sz), 16)) << (i * 8); } @@ -541,13 +537,13 @@ public static Color hexToColor(String hex) { public static Color rgbToColor(String rgb) { String[] parts = rgb.split("[^0-9]+"); - if(parts.length < 3) { + if (parts.length < 3) { return null; } int x = 0, i; - for(i = 0; i < 3; ++i) { + for (i = 0; i < 3; ++i) { x |= Integer.parseInt(parts[i]) << (i * 8); } @@ -559,13 +555,13 @@ public static String generateColorTable() { str.append(""); - for(Map.Entry e : chatHexMap.entrySet()) { + for (Map.Entry e : chatHexMap.entrySet()) { str.append(String.format("" + "", e.getKey().name(), e.getValue())); } str.append("
Chat ColorColor
%1$sTest String
"); str.append(""); - for(Map.Entry e : dyeHexMap.entrySet()) { + for (Map.Entry e : dyeHexMap.entrySet()) { str.append(String.format("" + "", e.getKey().name(), e.getValue())); } @@ -580,20 +576,18 @@ public static String generateColorTable() { * alternate color code character will only be replaced if it is immediately * followed by 0-9, A-F, a-f, K-O, k-o, R or r. * - * @param altColorChar - * The alternate color code character to replace. Ex: {@literal &} - * @param textToTranslate - * Text containing the alternate color code character. + * @param altColorChar The alternate color code character to replace. Ex: {@literal &} + * @param textToTranslate Text containing the alternate color code character. * @return Text containing the ChatColor.COLOR_CODE color code character. */ public static String translateAlternateColorCodes(char altColorChar, String textToTranslate) { - if(textToTranslate == null) { + if (textToTranslate == null) { return null; } char[] b = textToTranslate.toCharArray(); - for(int i = 0; i < b.length - 1; i++) { - if(b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(b[i + 1]) > -1) { + for (int i = 0; i < b.length - 1; i++) { + if (b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(b[i + 1]) > -1) { b[i] = C.COLOR_CHAR; b[i + 1] = Character.toLowerCase(b[i + 1]); } @@ -602,8 +596,8 @@ public static String translateAlternateColorCodes(char altColorChar, String text } public static C fromItemMeta(byte c) { - for(C i : C.values()) { - if(i.getItemMeta() == c) { + for (C i : C.values()) { + if (i.getItemMeta() == c) { return i; } } @@ -618,8 +612,7 @@ public static C randomColor() { /** * Gets the ChatColors used at the end of the given input string. * - * @param input - * Input string to retrieve the colors from. + * @param input Input string to retrieve the colors from. * @return Any remaining ChatColors to pass onto the next line. */ public static String getLastColors(String input) { @@ -627,17 +620,17 @@ public static String getLastColors(String input) { int length = input.length(); // Search backwards from the end as it is faster - for(int index = length - 1; index > -1; index--) { + for (int index = length - 1; index > -1; index--) { char section = input.charAt(index); - if(section == COLOR_CHAR && index < length - 1) { + if (section == COLOR_CHAR && index < length - 1) { char c = input.charAt(index + 1); C color = getByChar(c); - if(color != null) { + if (color != null) { result.insert(0, color); // Once we find a color or reset we can stop searching - if(color.isColor() || color.equals(RESET)) { + if (color.isColor() || color.equals(RESET)) { break; } } @@ -706,7 +699,7 @@ public ChatColor chatColor() { } public byte getMeta() { - return switch(this) { + return switch (this) { case AQUA -> (byte) 11; case BLACK -> (byte) 0; case BLUE, DARK_AQUA -> (byte) 9; @@ -727,7 +720,7 @@ public byte getMeta() { } public byte getItemMeta() { - return switch(this) { + return switch (this) { case AQUA, DARK_AQUA -> (byte) 9; case BLUE -> (byte) 3; case BOLD, UNDERLINE, RESET, STRIKETHROUGH, MAGIC, ITALIC -> (byte) -1; diff --git a/src/main/java/com/volmit/iris/util/format/Form.java b/src/main/java/com/volmit/iris/util/format/Form.java index ba4d2dd96..a38867767 100644 --- a/src/main/java/com/volmit/iris/util/format/Form.java +++ b/src/main/java/com/volmit/iris/util/format/Form.java @@ -31,7 +31,7 @@ import java.util.regex.Pattern; public class Form { - private static final String[] NAMES = new String[] {"Thousand", "Million", "Billion", "Trillion", "Quadrillion", "Quintillion", "Sextillion", "Septillion", "Octillion", "Nonillion", "Decillion", "Undecillion", "Duodecillion", "Tredecillion", "Quattuordecillion", "Quindecillion", "Sexdecillion", "Septendecillion", "Octodecillion", "Novemdecillion", "Vigintillion",}; + private static final String[] NAMES = new String[]{"Thousand", "Million", "Billion", "Trillion", "Quadrillion", "Quintillion", "Sextillion", "Septillion", "Octillion", "Nonillion", "Decillion", "Undecillion", "Duodecillion", "Tredecillion", "Quattuordecillion", "Quindecillion", "Sexdecillion", "Septendecillion", "Octodecillion", "Novemdecillion", "Vigintillion",}; private static final BigInteger THOUSAND = BigInteger.valueOf(1000); private static final NavigableMap MAP; private static NumberFormat NF; @@ -39,16 +39,16 @@ public class Form { static { MAP = new TreeMap<>(); - for(int i = 0; i < NAMES.length; i++) { + for (int i = 0; i < NAMES.length; i++) { MAP.put(THOUSAND.pow(i + 1), NAMES[i]); } } public static String getNumberSuffixThStRd(int day) { - if(day >= 11 && day <= 13) { + if (day >= 11 && day <= 13) { return Form.f(day) + "th"; } - return switch(day % 10) { + return switch (day % 10) { case 1 -> Form.f(day) + "st"; case 2 -> Form.f(day) + "nd"; case 3 -> Form.f(day) + "rd"; @@ -57,7 +57,7 @@ public static String getNumberSuffixThStRd(int day) { } private static void instantiate() { - if(NF == null) { + if (NF == null) { NF = NumberFormat.getInstance(Locale.US); } } @@ -65,12 +65,9 @@ private static void instantiate() { /** * Scroll text * - * @param smx - * the text - * @param viewport - * the viewport length - * @param time - * the timeline value + * @param smx the text + * @param viewport the viewport length + * @param time the timeline value */ public static String scroll(String smx, int viewport, long time) { String src = Form.repeat(" ", viewport) + smx + Form.repeat(" ", viewport); @@ -85,16 +82,15 @@ public static String scroll(String smx, int viewport, long time) { /** * Capitalize the first letter * - * @param s - * the string + * @param s the string * @return the capitalized string */ public static String capitalize(String s) { StringBuilder roll = new StringBuilder(); boolean f = true; - for(Character i : s.trim().toCharArray()) { - if(f) { + for (Character i : s.trim().toCharArray()) { + if (f) { roll.append(Character.toUpperCase(i)); f = false; } else { @@ -108,14 +104,13 @@ public static String capitalize(String s) { /** * Capitalize all words in the string * - * @param s - * the string + * @param s the string * @return the capitalized string */ public static String capitalizeWords(String s) { StringBuilder rollx = new StringBuilder(); - for(String i : s.trim().split(" ")) { + for (String i : s.trim().split(" ")) { rollx.append(" ").append(capitalize(i.trim())); } @@ -125,10 +120,8 @@ public static String capitalizeWords(String s) { /** * Hard word wrap * - * @param s - * the words - * @param len - * the length per line + * @param s the words + * @param len the length per line * @return the wrapped string */ public static String wrap(String s, int len) { @@ -138,10 +131,8 @@ public static String wrap(String s, int len) { /** * Soft Word wrap * - * @param s - * the string - * @param len - * the length to wrap + * @param s the string + * @param len the length to wrap * @return the wrapped string */ public static String wrapWords(String s, int len) { @@ -151,14 +142,10 @@ public static String wrapWords(String s, int len) { /** * Wrap words * - * @param s - * the string - * @param len - * the wrap length - * @param newLineSep - * the new line seperator - * @param soft - * should it be soft wrapped or hard wrapped? + * @param s the string + * @param len the wrap length + * @param newLineSep the new line seperator + * @param soft should it be soft wrapped or hard wrapped? * @return the wrapped words */ public static String wrap(String s, int len, String newLineSep, boolean soft) { @@ -168,8 +155,8 @@ public static String wrap(String s, int len, String newLineSep, boolean soft) { public static String hardWrap(String s, int len) { StringBuilder ss = new StringBuilder(); - for(int i = 0; i < s.length(); i += len) { - if(i + len > s.length()) { + for (int i = 0; i < s.length(); i += len) { + if (i + len > s.length()) { ss.append(s, i, s.length()); break; } @@ -182,8 +169,8 @@ public static String hardWrap(String s, int len) { public static List hardWrapList(String s, int len) { List l = new ArrayList<>(); - for(int i = 0; i < s.length(); i += len) { - if(i + len > s.length()) { + for (int i = 0; i < s.length(); i += len) { + if (i + len > s.length()) { l.add(s.substring(i)); break; } @@ -198,31 +185,26 @@ public static List hardWrapList(String s, int len) { /** * Wrap words * - * @param s - * the string - * @param len - * the length - * @param newLineSep - * the new line seperator - * @param soft - * soft or hard wrapping - * @param regex - * the regex + * @param s the string + * @param len the length + * @param newLineSep the new line seperator + * @param soft soft or hard wrapping + * @param regex the regex * @return the wrapped string */ public static String wrap(String s, int len, String newLineSep, boolean soft, String regex) { - if(s == null) { + if (s == null) { return null; } else { - if(newLineSep == null) { + if (newLineSep == null) { newLineSep = "\n"; } - if(len < 1) { + if (len < 1) { len = 1; } - if(regex.trim().equals("")) { + if (regex.trim().equals("")) { regex = " "; } @@ -231,11 +213,11 @@ public static String wrap(String s, int len, String newLineSep, boolean soft, St int arg6 = 0; StringBuilder arg7 = new StringBuilder(arg5 + 32); - while(arg6 < arg5) { + while (arg6 < arg5) { int arg8 = -1; Matcher arg9 = arg4.matcher(s.substring(arg6, Math.min(arg6 + len + 1, arg5))); - if(arg9.find()) { - if(arg9.start() == 0) { + if (arg9.find()) { + if (arg9.start() == 0) { arg6 += arg9.end(); continue; } @@ -243,29 +225,29 @@ public static String wrap(String s, int len, String newLineSep, boolean soft, St arg8 = arg9.start(); } - if(arg5 - arg6 <= len) { + if (arg5 - arg6 <= len) { break; } - while(arg9.find()) { + while (arg9.find()) { arg8 = arg9.start() + arg6; } - if(arg8 >= arg6) { + if (arg8 >= arg6) { arg7.append(s, arg6, arg8); arg7.append(newLineSep); arg6 = arg8 + 1; - } else if(soft) { + } else if (soft) { arg7.append(s, arg6, len + arg6); arg7.append(newLineSep); arg6 += len; } else { arg9 = arg4.matcher(s.substring(arg6 + len)); - if(arg9.find()) { + if (arg9.find()) { arg8 = arg9.start() + arg6 + len; } - if(arg8 >= 0) { + if (arg8 >= 0) { arg7.append(s, arg6, arg8); arg7.append(newLineSep); arg6 = arg8 + 1; @@ -284,8 +266,7 @@ public static String wrap(String s, int len, String newLineSep, boolean soft, St /** * Returns a fancy duration up to Years * - * @param duration - * the duration in ms + * @param duration the duration in ms * @return the fancy duration */ public static String duration(RollingSequence rollingSequence, long duration) { @@ -293,37 +274,37 @@ public static String duration(RollingSequence rollingSequence, long duration) { double phantom = duration; int div = 1000; - if(phantom > div) { + if (phantom > div) { phantom /= div; suffix = "Second"; div = 60; - if(phantom > div) { + if (phantom > div) { phantom /= div; suffix = "Minute"; - if(phantom > div) { + if (phantom > div) { phantom /= div; suffix = "Hour"; div = 24; - if(phantom > 24) { + if (phantom > 24) { phantom /= div; suffix = "Day"; div = 7; - if(phantom > div) { + if (phantom > div) { phantom /= div; suffix = "Week"; div = 4; - if(phantom > div) { + if (phantom > div) { phantom /= div; suffix = "Month"; div = 12; //noinspection IfStatementWithIdenticalBranches - if(phantom > div) { + if (phantom > div) { phantom /= div; suffix = "Year"; return Form.fd(phantom, 0) + " " + suffix + ((int) phantom == 1 ? "" : "s"); @@ -353,13 +334,12 @@ public static String duration(RollingSequence rollingSequence, long duration) { /** * Fixes the minute issue with formatting * - * @param c - * the calendar + * @param c the calendar * @return the minute string */ public static String fmin(Calendar c) { String s = c.get(Calendar.MINUTE) + ""; - if(s.length() == 1) { + if (s.length() == 1) { return "0" + s; } @@ -369,18 +349,17 @@ public static String fmin(Calendar c) { /** * Get a fancy time stamp * - * @param time - * the stamp in time (ago) + * @param time the stamp in time (ago) * @return the fancy stamp in time (ago) */ public static String ago(long time) { long current = M.ms(); - if(time > current - TimeUnit.SECONDS.toMillis(30) && time < current) { + if (time > current - TimeUnit.SECONDS.toMillis(30) && time < current) { return "Just Now"; - } else if(time > current - TimeUnit.SECONDS.toMillis(60) && time < current) { + } else if (time > current - TimeUnit.SECONDS.toMillis(60) && time < current) { return "Seconds Ago"; - } else if(time > current - TimeUnit.MINUTES.toMillis(10) && time < current) { + } else if (time > current - TimeUnit.MINUTES.toMillis(10) && time < current) { return "Minutes Ago"; } else { Calendar now = Calendar.getInstance(); @@ -389,15 +368,15 @@ public static String ago(long time) { boolean sameYear = now.get(Calendar.YEAR) == c.get(Calendar.YEAR); boolean sameDay = now.get(Calendar.DAY_OF_YEAR) == c.get(Calendar.DAY_OF_YEAR); - if(sameDay) { + if (sameDay) { int h = c.get(Calendar.HOUR); h = h == 0 ? 12 : h; return "Today at " + h + ":" + fmin(c) + " " + (c.get(Calendar.AM_PM) == Calendar.PM ? "PM" : "AM"); - } else if(sameYear) { + } else if (sameYear) { boolean yesterday = now.get(Calendar.DAY_OF_YEAR) - 1 == c.get(Calendar.DAY_OF_YEAR); - if(yesterday) { + if (yesterday) { int h = c.get(Calendar.HOUR); h = h == 0 ? 12 : h; @@ -405,7 +384,7 @@ public static String ago(long time) { } else { int h = c.get(Calendar.HOUR); h = h == 0 ? 12 : h; - String dow = switch(c.get(Calendar.DAY_OF_WEEK)) { + String dow = switch (c.get(Calendar.DAY_OF_WEEK)) { case Calendar.SUNDAY -> "Sunday"; case Calendar.MONDAY -> "Monday"; case Calendar.TUESDAY -> "Tuesday"; @@ -419,7 +398,7 @@ public static String ago(long time) { String monthName = "Error Month"; int month = c.get(Calendar.MONTH); - switch(month) { + switch (month) { case Calendar.JANUARY -> monthName = "Jan"; case Calendar.FEBRUARY -> monthName = "Feb"; case Calendar.MARCH -> monthName = "Mar"; @@ -442,7 +421,7 @@ public static String ago(long time) { } else { int h = c.get(Calendar.HOUR); h = h == 0 ? 12 : h; - String dow = switch(c.get(Calendar.DAY_OF_WEEK)) { + String dow = switch (c.get(Calendar.DAY_OF_WEEK)) { case Calendar.SUNDAY -> "Sunday"; case Calendar.MONDAY -> "Monday"; case Calendar.TUESDAY -> "Tuesday"; @@ -456,7 +435,7 @@ public static String ago(long time) { String monthName = "Error Month"; int month = c.get(Calendar.MONTH); - switch(month) { + switch (month) { case Calendar.JANUARY -> monthName = "Jan"; case Calendar.FEBRUARY -> monthName = "Feb"; case Calendar.MARCH -> monthName = "Mar"; @@ -483,13 +462,12 @@ public static String ago(long time) { /** * Get the suffix for a number i.e. 1st 2nd 3rd * - * @param i - * the number + * @param i the number * @return the suffix */ public static String numberSuffix(int i) { - String[] sufixes = new String[] {"th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th"}; - return switch(i % 100) { + String[] sufixes = new String[]{"th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th"}; + return switch (i % 100) { case 11, 12, 13 -> i + "th"; default -> i + sufixes[i % 10]; }; @@ -499,30 +477,28 @@ public static String numberSuffix(int i) { * Get a high accuracy but limited range duration (accurate up to a couple * minutes) * - * @param ms - * the milliseconds (double) - * @param prec - * the precision (decimal format) + * @param ms the milliseconds (double) + * @param prec the precision (decimal format) * @return the formatted string */ public static String duration(double ms, int prec) { - if(ms < 1000.0) { + if (ms < 1000.0) { return Form.f(ms, prec) + "ms"; } - if(ms / 1000.0 < 60.0) { + if (ms / 1000.0 < 60.0) { return Form.f(ms / 1000.0, prec) + "s"; } - if(ms / 1000.0 / 60.0 < 60.0) { + if (ms / 1000.0 / 60.0 < 60.0) { return Form.f(ms / 1000.0 / 60.0, prec) + "m"; } - if(ms / 1000.0 / 60.0 / 60.0 < 24.0) { + if (ms / 1000.0 / 60.0 / 60.0 < 24.0) { return Form.f(ms / 1000.0 / 60.0 / 60.0, prec) + " hours"; } - if(ms / 1000.0 / 60.0 / 60.0 / 24.0 < 7) { + if (ms / 1000.0 / 60.0 / 60.0 / 24.0 < 7) { return Form.f(ms / 1000.0 / 60.0 / 24.0, prec) + " days"; } @@ -536,30 +512,28 @@ public static String duration(long ms) { /** * Get a duration from milliseconds up to days * - * @param ms - * the ms - * @param prec - * the precision (decimal format) + * @param ms the ms + * @param prec the precision (decimal format) * @return the formatted string */ public static String duration(long ms, int prec) { - if(ms < 1000.0) { + if (ms < 1000.0) { return Form.f(ms, prec) + "ms"; } - if(ms / 1000.0 < 60.0) { + if (ms / 1000.0 < 60.0) { return Form.f(ms / 1000.0, prec) + " seconds"; } - if(ms / 1000.0 / 60.0 < 60.0) { + if (ms / 1000.0 / 60.0 < 60.0) { return Form.f(ms / 1000.0 / 60.0, prec) + " minutes"; } - if(ms / 1000.0 / 60.0 / 60.0 < 24.0) { + if (ms / 1000.0 / 60.0 / 60.0 < 24.0) { return Form.f(ms / 1000.0 / 60.0 / 60.0, prec) + " hours"; } - if(ms / 1000.0 / 60.0 / 60.0 / 24.0 < 7) { + if (ms / 1000.0 / 60.0 / 60.0 / 24.0 < 7) { return Form.f(ms / 1000.0 / 60.0 / 60.0 / 24.0, prec) + " days"; } @@ -569,8 +543,7 @@ public static String duration(long ms, int prec) { /** * Format a big value * - * @param i - * the number + * @param i the number * @return the full value in string */ public static String b(int i) { @@ -580,8 +553,7 @@ public static String b(int i) { /** * Format a big value * - * @param i - * the number + * @param i the number * @return the full value in string */ public static String b(long i) { @@ -591,8 +563,7 @@ public static String b(long i) { /** * Format a big value * - * @param i - * the number + * @param i the number * @return the full value in string */ public static String b(double i) { @@ -602,13 +573,12 @@ public static String b(double i) { /** * Format a big number * - * @param number - * the big number + * @param number the big number * @return the value in string */ public static String b(BigInteger number) { Entry entry = MAP.floorEntry(number); - if(entry == null) { + if (entry == null) { return "Nearly nothing"; } @@ -618,7 +588,7 @@ public static String b(BigInteger number) { float f = m.floatValue() / 1000.0f; float rounded = ((int) (f * 100.0)) / 100.0f; - if(rounded % 1 == 0) { + if (rounded % 1 == 0) { return ((int) rounded) + " " + entry.getValue(); } @@ -629,8 +599,7 @@ public static String b(BigInteger number) { * Calculate a fancy string representation of a file size. Adds a suffix of B, * KB, MB, GB, or TB * - * @param s - * the size (in bytes) + * @param s the size (in bytes) * @return the string */ public static String fileSize(long s) { @@ -640,16 +609,14 @@ public static String fileSize(long s) { /** * ":", "a", "b", "c" -> a:b:c * - * @param splitter - * the splitter that goes in between - * @param strings - * the strings + * @param splitter the splitter that goes in between + * @param strings the strings * @return the result */ public static String split(String splitter, String... strings) { StringBuilder b = new StringBuilder(); - for(String i : strings) { + for (String i : strings) { b.append(splitter); b.append(i); } @@ -661,8 +628,7 @@ public static String split(String splitter, String... strings) { * Calculate a fancy string representation of a file size. Adds a suffix of B, * KB, MB, GB, or TB * - * @param s - * the size (in bytes) + * @param s the size (in bytes) * @return the string */ public static String memSize(long s) { @@ -676,8 +642,7 @@ public static String memSize(long s, int dec) { /** * Get the timestamp of the time t (ms since 1970) * - * @param t - * the time + * @param t the time * @return the stamp */ @SuppressWarnings("deprecation") @@ -694,7 +659,7 @@ public static String stampTime(long t) { } public static String forceDoubleDigit(int dig) { - if(dig < 10) { + if (dig < 10) { return "0" + dig; } @@ -712,29 +677,27 @@ public static String stampDay(long t) { * with a special divisor. The divisor decides how much goes up in the suffix * chain. * - * @param s - * the size (in bytes) - * @param div - * the divisor + * @param s the size (in bytes) + * @param div the divisor * @return the string */ public static String ofSize(long s, int div) { double d = (double) s; String sub = "Bytes"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "KB"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "MB"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "GB"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "TB"; } @@ -742,7 +705,7 @@ public static String ofSize(long s, int div) { } } - if(sub.equals("GB") || sub.equals("TB")) { + if (sub.equals("GB") || sub.equals("TB")) { return Form.f(d, 1) + sub; } else { return Form.f(d, 0) + sub; @@ -754,31 +717,28 @@ public static String ofSize(long s, int div) { * with a special divisor. The divisor decides how much goes up in the suffix * chain. * - * @param s - * the size (in bytes) - * @param div - * the divisor - * @param dec - * the decimal places + * @param s the size (in bytes) + * @param div the divisor + * @param dec the decimal places * @return the string */ public static String ofSize(long s, int div, int dec) { double d = (double) s; String sub = "Bytes"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "KB"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "MB"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "GB"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "TB"; } @@ -794,35 +754,32 @@ public static String ofSize(long s, int div, int dec) { * with a special divisor. The divisor decides how much goes up in the suffix * chain. * - * @param s - * the size (in bytes) - * @param div - * the divisor - * @param dec - * the decimal places + * @param s the size (in bytes) + * @param div the divisor + * @param dec the decimal places * @return the string */ public static String ofSizeMetricWeight(long s, int div, int dec) { boolean neg = s < 0; - if(neg) { + if (neg) { s = -s; } double d = (double) s; String sub = "Grams"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "KG"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "MG"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "GG"; - if(d > div - 1) { + if (d > div - 1) { d /= div; sub = "TG"; } @@ -836,14 +793,12 @@ public static String ofSizeMetricWeight(long s, int div, int dec) { /** * Trim a string to a length, then append ... at the end if it extends the limit * - * @param s - * the string - * @param l - * the limit + * @param s the string + * @param l the limit * @return the modified string */ public static String trim(String s, int l) { - if(s.length() <= l) { + if (s.length() <= l) { return s; } @@ -854,22 +809,21 @@ public static String trim(String s, int l) { * Get a class name into a configuration/filename key For example, * PhantomController.class is converted to phantom-controller * - * @param clazz - * the class + * @param clazz the class * @return the string representation */ public static String cname(String clazz) { StringBuilder codeName = new StringBuilder(); - for(Character i : clazz.toCharArray()) { - if(Character.isUpperCase(i)) { + for (Character i : clazz.toCharArray()) { + if (Character.isUpperCase(i)) { codeName.append("-").append(Character.toLowerCase(i)); } else { codeName.append(i); } } - if(codeName.toString().startsWith("-")) { + if (codeName.toString().startsWith("-")) { codeName = new StringBuilder(codeName.substring(1)); } @@ -879,12 +833,11 @@ public static String cname(String clazz) { /** * Get a formatted representation of the memory given in megabytes * - * @param mb - * the megabytes + * @param mb the megabytes * @return the string representation with suffixes */ public static String mem(long mb) { - if(mb < 1024) { + if (mb < 1024) { return f(mb) + " MB"; } else { return f(((double) mb / (double) 1024), 1) + " GB"; @@ -897,12 +850,12 @@ public static String mem(long mb) { * @return the string representation with suffixes */ public static String memx(long kb) { - if(kb < 1024) { + if (kb < 1024) { return fd(kb, 2) + " KB"; } else { double mb = (double) kb / 1024.0; - if(mb < 1024) { + if (mb < 1024) { return fd(mb, 2) + " MB"; } else { double gb = mb / 1024.0; @@ -915,8 +868,7 @@ public static String memx(long kb) { /** * Format a long. Changes -10334 into -10,334 * - * @param i - * the number + * @param i the number * @return the string representation of the number */ public static String f(long i) { @@ -927,8 +879,7 @@ public static String f(long i) { /** * Format a number. Changes -10334 into -10,334 * - * @param i - * the number + * @param i the number * @return the string representation of the number */ public static String f(int i) { @@ -939,16 +890,14 @@ public static String f(int i) { /** * Formats a double's decimals to a limit * - * @param i - * the double - * @param p - * the number of decimal places to use + * @param i the double + * @param p the number of decimal places to use * @return the formated string */ public static String f(double i, int p) { String form = "#"; - if(p > 0) { + if (p > 0) { form = form + "." + repeat("#", p); } @@ -962,16 +911,14 @@ public static String f(double i, int p) { * decimal places that dont need to be placed down. 2.4343 formatted with 6 * decimals gets returned as 2.434300 * - * @param i - * the double - * @param p - * the number of decimal places to use + * @param i the double + * @param p the number of decimal places to use * @return the formated string */ public static String fd(double i, int p) { String form = "0"; - if(p > 0) { + if (p > 0) { form = form + "." + repeat("0", p); } @@ -983,16 +930,14 @@ public static String fd(double i, int p) { /** * Formats a float's decimals to a limit * - * @param i - * the float - * @param p - * the number of decimal places to use + * @param i the float + * @param p the number of decimal places to use * @return the formated string */ public static String f(float i, int p) { String form = "#"; - if(p > 0) { + if (p > 0) { form = form + "." + repeat("#", p); } @@ -1004,8 +949,7 @@ public static String f(float i, int p) { /** * Formats a double's decimals (one decimal point) * - * @param i - * the double + * @param i the double */ public static String f(double i) { return f(i, 1); @@ -1014,8 +958,7 @@ public static String f(double i) { /** * Formats a float's decimals (one decimal point) * - * @param i - * the float + * @param i the float */ public static String f(float i) { return f(i, 1); @@ -1025,10 +968,8 @@ public static String f(float i) { * Get a percent representation of a double and decimal places (0.53) would * return 53% * - * @param i - * the double - * @param p - * the number of decimal points + * @param i the double + * @param p the number of decimal points * @return a string */ public static String pc(double i, int p) { @@ -1039,10 +980,8 @@ public static String pc(double i, int p) { * Get a percent representation of a float and decimal places (0.53) would * return 53% * - * @param i - * the float - * @param p - * the number of decimal points + * @param i the float + * @param p the number of decimal points * @return a string */ public static String pc(float i, int p) { @@ -1053,8 +992,7 @@ public static String pc(float i, int p) { * Get a percent representation of a double and zero decimal places (0.53) would * return 53% * - * @param i - * the double + * @param i the double * @return a string */ public static String pc(double i) { @@ -1065,8 +1003,7 @@ public static String pc(double i) { * Get a percent representation of a float and zero decimal places (0.53) would * return 53% * - * @param i - * the double + * @param i the double * @return a string */ public static String pc(float i) { @@ -1076,12 +1013,9 @@ public static String pc(float i) { /** * Get a percent as the percent of i out of "of" with custom decimal places * - * @param i - * the percent out of - * @param of - * of of - * @param p - * the decimal places + * @param i the percent out of + * @param of of of + * @param p the decimal places * @return the string */ public static String pc(int i, int of, int p) { @@ -1091,10 +1025,8 @@ public static String pc(int i, int of, int p) { /** * Get a percent as the percent of i out of "of" * - * @param i - * the percent out of - * @param of - * of of + * @param i the percent out of + * @param of of of * @return the string */ public static String pc(int i, int of) { @@ -1104,12 +1036,9 @@ public static String pc(int i, int of) { /** * Get a percent as the percent of i out of "of" with custom decimal places * - * @param i - * the percent out of - * @param of - * of of - * @param p - * the decimal places + * @param i the percent out of + * @param of of of + * @param p the decimal places * @return the string */ public static String pc(long i, long of, int p) { @@ -1119,10 +1048,8 @@ public static String pc(long i, long of, int p) { /** * Get a percent as the percent of i out of "of" * - * @param i - * the percent out of - * @param of - * of of + * @param i the percent out of + * @param of of of * @return the string */ public static String pc(long i, long of) { @@ -1132,8 +1059,7 @@ public static String pc(long i, long of) { /** * Milliseconds to seconds (double) * - * @param ms - * the milliseconds + * @param ms the milliseconds * @return a formatted string to milliseconds */ public static String msSeconds(long ms) { @@ -1143,10 +1069,8 @@ public static String msSeconds(long ms) { /** * Milliseconds to seconds (double) custom decimals * - * @param ms - * the milliseconds - * @param p - * number of decimal points + * @param ms the milliseconds + * @param p number of decimal points * @return a formatted string to milliseconds */ public static String msSeconds(long ms, int p) { @@ -1165,8 +1089,7 @@ public static String nsMs(long ns) { /** * nanoseconds to seconds (double) custom decimals * - * @param p - * number of decimal points + * @param p number of decimal points * @return a formatted string to nanoseconds */ public static String nsMs(long ns, int p) { @@ -1176,8 +1099,7 @@ public static String nsMs(long ns, int p) { /** * nanoseconds to seconds (double) custom decimals * - * @param p - * number of decimal points + * @param p number of decimal points * @return a formatted string to nanoseconds */ public static String nsMsd(long ns, int p) { @@ -1187,8 +1109,7 @@ public static String nsMsd(long ns, int p) { /** * Get roman numeral representation of the int * - * @param num - * the int + * @param num the int * @return the numerals */ public static String toRoman(int num) { @@ -1210,7 +1131,7 @@ public static String toRoman(int num) { StringBuilder res = new StringBuilder(); - for(Map.Entry entry : roman_numerals.entrySet()) { + for (Map.Entry entry : roman_numerals.entrySet()) { int matches = num / entry.getValue(); res.append(repeat(entry.getKey(), matches)); @@ -1223,66 +1144,65 @@ public static String toRoman(int num) { /** * Get the number representation from roman numerals. * - * @param number - * the roman number + * @param number the roman number * @return the int representation */ public static int fromRoman(String number) { - if(number.isEmpty()) { + if (number.isEmpty()) { return 0; } number = number.toUpperCase(); - if(number.startsWith("M")) { + if (number.startsWith("M")) { return 1000 + fromRoman(number.substring(1)); } - if(number.startsWith("CM")) { + if (number.startsWith("CM")) { return 900 + fromRoman(number.substring(2)); } - if(number.startsWith("D")) { + if (number.startsWith("D")) { return 500 + fromRoman(number.substring(1)); } - if(number.startsWith("CD")) { + if (number.startsWith("CD")) { return 400 + fromRoman(number.substring(2)); } - if(number.startsWith("C")) { + if (number.startsWith("C")) { return 100 + fromRoman(number.substring(1)); } - if(number.startsWith("XC")) { + if (number.startsWith("XC")) { return 90 + fromRoman(number.substring(2)); } - if(number.startsWith("L")) { + if (number.startsWith("L")) { return 50 + fromRoman(number.substring(1)); } - if(number.startsWith("XL")) { + if (number.startsWith("XL")) { return 40 + fromRoman(number.substring(2)); } - if(number.startsWith("X")) { + if (number.startsWith("X")) { return 10 + fromRoman(number.substring(1)); } - if(number.startsWith("IX")) { + if (number.startsWith("IX")) { return 9 + fromRoman(number.substring(2)); } - if(number.startsWith("V")) { + if (number.startsWith("V")) { return 5 + fromRoman(number.substring(1)); } - if(number.startsWith("IV")) { + if (number.startsWith("IV")) { return 4 + fromRoman(number.substring(2)); } - if(number.startsWith("I")) { + if (number.startsWith("I")) { return 1 + fromRoman(number.substring(1)); } @@ -1292,21 +1212,19 @@ public static int fromRoman(String number) { /** * Repeat a string * - * @param s - * the string - * @param n - * the amount of times to repeat + * @param s the string + * @param n the amount of times to repeat * @return the repeated string */ @SuppressWarnings("StringRepeatCanBeUsed") public static String repeat(String s, int n) { - if(s == null) { + if (s == null) { return null; } final StringBuilder sb = new StringBuilder(); - for(int i = 0; i < n; i++) { + for (int i = 0; i < n; i++) { sb.append(s); } diff --git a/src/main/java/com/volmit/iris/util/format/MemoryMonitor.java b/src/main/java/com/volmit/iris/util/format/MemoryMonitor.java index 16e7993b5..63f175651 100644 --- a/src/main/java/com/volmit/iris/util/format/MemoryMonitor.java +++ b/src/main/java/com/volmit/iris/util/format/MemoryMonitor.java @@ -23,15 +23,15 @@ import com.volmit.iris.util.scheduling.Looper; public class MemoryMonitor { + private final ChronoLatch cl; + private final RollingSequence pressureAvg; + private final Runtime runtime; private Looper looper; private long usedMemory; private long garbageMemory; private long garbageLast; private long garbageBin; private long pressure; - private final ChronoLatch cl; - private final RollingSequence pressureAvg; - private final Runtime runtime; public MemoryMonitor(int sampleDelay) { this.runtime = Runtime.getRuntime(); @@ -78,13 +78,13 @@ public double getUsagePercent() { @SuppressWarnings("IfStatementWithIdenticalBranches") private void sample() { long used = getVMUse(); - if(usedMemory == -1) { + if (usedMemory == -1) { usedMemory = used; garbageMemory = 0; return; } - if(used < usedMemory) { + if (used < usedMemory) { usedMemory = used; } else { garbageMemory = used - usedMemory; @@ -92,7 +92,7 @@ private void sample() { long g = garbageMemory - garbageLast; - if(g >= 0) { + if (g >= 0) { garbageBin += g; garbageLast = garbageMemory; } else { @@ -100,8 +100,8 @@ private void sample() { garbageLast = 0; } - if(cl.flip()) { - if(garbageMemory > 0) { + if (cl.flip()) { + if (garbageMemory > 0) { pressure = garbageBin; garbageBin = 0; } else { @@ -118,7 +118,7 @@ private long getVMUse() { } public void close() { - if(looper != null) { + if (looper != null) { looper.interrupt(); looper = null; } diff --git a/src/main/java/com/volmit/iris/util/hunk/Hunk.java b/src/main/java/com/volmit/iris/util/hunk/Hunk.java index cc6f43bbb..125268e57 100644 --- a/src/main/java/com/volmit/iris/util/hunk/Hunk.java +++ b/src/main/java/com/volmit/iris/util/hunk/Hunk.java @@ -50,10 +50,8 @@ public interface Hunk { * Create a hunk view from a source hunk. This view reads and writes through to * the source hunk. Its is not a copy. * - * @param - * the type - * @param src - * the source hunk + * @param the type + * @param src the source hunk * @return the hunk view */ static Hunk view(Hunk src) { @@ -171,12 +169,9 @@ static Hunk newCombinedAtomicIntegerHunk(Hunk... hunks) { /** * Creates a new bounding hunk from the given hunks * - * @param - * the type - * @param factory - * the factory that creates a hunk - * @param hunks - * the hunks + * @param the type + * @param factory the factory that creates a hunk + * @param hunks the hunks * @return the new bounding hunk */ @SafeVarargs @@ -185,7 +180,7 @@ static Hunk combined(Function3> factor int h = 0; int d = 0; - for(Hunk i : hunks) { + for (Hunk i : hunks) { w = Math.max(w, i.getWidth()); h = Math.max(h, i.getHeight()); d = Math.max(d, i.getDepth()); @@ -193,7 +188,7 @@ static Hunk combined(Function3> factor Hunk b = factory.apply(w, h, d); - for(Hunk i : hunks) { + for (Hunk i : hunks) { b.insert(i); } @@ -201,11 +196,11 @@ static Hunk combined(Function3> factor } static void computeDual2D(int parallelism, Hunk a, Hunk b, Consumer5, Hunk> v) { - if(a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight() || a.getDepth() != b.getDepth()) { + if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight() || a.getDepth() != b.getDepth()) { throw new RuntimeException("Hunk sizes must match!"); } - if(a.get2DDimension(parallelism) == 1) { + if (a.get2DDimension(parallelism) == 1) { v.accept(0, 0, 0, a, b); return; } @@ -216,7 +211,7 @@ static void computeDual2D(int parallelism, Hunk a, Hunk b, Consumer { v.accept(xx, yy, zz, ha, hr); - synchronized(rq) { + synchronized (rq) { rq.add(r); } }), (x, y, z, hax, hbx) -> @@ -230,13 +225,13 @@ static void computeDual2D(int parallelism, Hunk a, Hunk b, Consumer } static void getDualSections2D(int sections, Hunk a, Hunk b, Consumer6, Hunk, Runnable> v, Consumer5, Hunk> inserterAB) { - if(a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight() || a.getDepth() != b.getDepth()) { + if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight() || a.getDepth() != b.getDepth()) { throw new RuntimeException("Hunk sizes must match!"); } int dim = a.get2DDimension(sections); - if(sections <= 1) { + if (sections <= 1) { getDualSection(0, 0, 0, a.getWidth(), a.getHeight(), a.getDepth(), a, b, (ha, hr, r) -> v.accept(0, 0, 0, ha, hr, r), inserterAB); return; } @@ -247,10 +242,10 @@ static void getDualSections2D(int sections, Hunk a, Hunk b, Consume int dr = a.getDepth() - (d * dim); int i, j; - for(i = 0; i < a.getWidth(); i += w) { + for (i = 0; i < a.getWidth(); i += w) { int ii = i; - for(j = 0; j < a.getDepth(); j += d) { + for (j = 0; j < a.getDepth(); j += d) { int jj = j; getDualSection(i, 0, j, i + w + (i == 0 ? wr : 0), a.getHeight(), j + d + (j == 0 ? dr : 0), a, b, (ha, hr, r) -> v.accept(ii, 0, jj, ha, hr, r), inserterAB); i = i == 0 ? i + wr : i; @@ -268,44 +263,37 @@ static void getDualSection(int x, int y, int z, int x1, int y1, int z1, H /** * Create a hunk that is optimized for specific uses * - * @param w - * width - * @param h - * height - * @param d - * depth - * @param type - * the class type - * @param packed - * if the hunk is generally more than 50% full (non-null nodes) - * @param concurrent - * if this hunk must be thread safe - * @param - * the type + * @param w width + * @param h height + * @param d depth + * @param type the class type + * @param packed if the hunk is generally more than 50% full (non-null nodes) + * @param concurrent if this hunk must be thread safe + * @param the type * @return the hunk */ static Hunk newHunk(int w, int h, int d, Class type, boolean packed, boolean concurrent) { - if(type.equals(Double.class)) { + if (type.equals(Double.class)) { return concurrent ? - packed ? (Hunk) newAtomicDoubleHunk(w, h, d) : newMappedHunk(w, h, d) - : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); + packed ? (Hunk) newAtomicDoubleHunk(w, h, d) : newMappedHunk(w, h, d) + : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); } - if(type.equals(Integer.class)) { + if (type.equals(Integer.class)) { return concurrent ? - packed ? (Hunk) newAtomicIntegerHunk(w, h, d) : newMappedHunk(w, h, d) - : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); + packed ? (Hunk) newAtomicIntegerHunk(w, h, d) : newMappedHunk(w, h, d) + : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); } - if(type.equals(Long.class)) { + if (type.equals(Long.class)) { return concurrent ? - packed ? (Hunk) newAtomicLongHunk(w, h, d) : newMappedHunk(w, h, d) - : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); + packed ? (Hunk) newAtomicLongHunk(w, h, d) : newMappedHunk(w, h, d) + : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); } return concurrent ? - packed ? newAtomicHunk(w, h, d) : newMappedHunk(w, h, d) - : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); + packed ? newAtomicHunk(w, h, d) : newMappedHunk(w, h, d) + : packed ? newArrayHunk(w, h, d) : newMappedHunkSynced(w, h, d); } static IrisPosition rotatedBounding(int w, int h, int d, double x, double y, double z) { @@ -343,15 +331,15 @@ static int min(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { } static void rotate(double x, double y, double z, int[] c) { - if(x % 360 != 0) { + if (x % 360 != 0) { rotateAroundX(Math.toRadians(x), c); } - if(y % 360 != 0) { + if (y % 360 != 0) { rotateAroundY(Math.toRadians(y), c); } - if(z % 360 != 0) { + if (z % 360 != 0) { rotateAroundZ(Math.toRadians(z), c); } } @@ -453,14 +441,14 @@ default int getMax3DParallelism() { } default int filterDimension(int dim) { - if(dim <= 1) { + if (dim <= 1) { return 1; } dim = dim % 2 != 0 ? dim + 1 : dim; - if(dim > getMinimumDimension() / 2) { - if(dim <= 2) { + if (dim > getMinimumDimension() / 2) { + if (dim <= 2) { return 1; } @@ -471,7 +459,7 @@ default int filterDimension(int dim) { } default int get2DDimension(int sections) { - if(sections <= 1) { + if (sections <= 1) { return 1; } @@ -479,7 +467,7 @@ default int get2DDimension(int sections) { } default int get3DDimension(int sections) { - if(sections <= 1) { + if (sections <= 1) { return 1; } @@ -540,10 +528,8 @@ default int get3DDimension(int sections) { * hunk.set(hunkX, ?, hunkZ, noise(actualBlockX, ?, actualBlockZ));
* }
* - * @param p - * the predicate - * @param c - * the consumer + * @param p the predicate + * @param c the consumer * @return this */ default Hunk iterateSurfaces2D(Predicate p, Consumer8> c) { @@ -604,12 +590,9 @@ default Hunk iterateSurfaces2D(Predicate p, Consumer8 * }
* - * @param parallelism - * the ideal threads to use on this - * @param p - * the predicate - * @param c - * the consumer + * @param parallelism the ideal threads to use on this + * @param p the predicate + * @param c the consumer * @return this */ default Hunk iterateSurfaces2D(int parallelism, Predicate p, Consumer8> c) { @@ -618,20 +601,20 @@ default Hunk iterateSurfaces2D(int parallelism, Predicate p, Consumer8= 0; i--) { + for (int i = getHeight() - 1; i >= 0; i--) { boolean solid = p.test(h.get(ax, i, az)); - if(!hitting && solid) { + if (!hitting && solid) { in = i; hitting = true; - } else if(hitting && !solid) { + } else if (hitting && !solid) { hitting = false; c.accept(ax, az, hox, hoz, in, i - 1, last, h); last = i - 1; } } - if(hitting) { + if (hitting) { c.accept(ax, az, hox, hoz, in, 0, last, h); } }); @@ -646,8 +629,7 @@ default Hunk iterateSurfaces2D(int parallelism, Predicate p, Consumer8 * hunk.set(ax, ?, az, NOISE.get(ax+hx, az+hz)); * - * @param c - * the consumer hunkX, hunkZ, hunkOffsetX, hunkOffsetZ. + * @param c the consumer hunkX, hunkZ, hunkOffsetX, hunkOffsetZ. * @return this */ default Hunk iterate2DTop(Consumer5> c) { @@ -665,17 +647,15 @@ default Hunk drift(int x, int y, int z) { *

* hunk.set(ax, ?, az, NOISE.get(ax+hx, az+hz)); * - * @param parallelism - * the target parallelism value or 0 to disable - * @param c - * the consumer hunkX, hunkZ, hunkOffsetX, hunkOffsetZ. + * @param parallelism the target parallelism value or 0 to disable + * @param c the consumer hunkX, hunkZ, hunkOffsetX, hunkOffsetZ. * @return this */ default Hunk iterate2DTop(int parallelism, Consumer5> c) { compute2D(parallelism, (x, y, z, h) -> { - for(int i = 0; i < h.getWidth(); i++) { - for(int k = 0; k < h.getDepth(); k++) { + for (int i = 0; i < h.getWidth(); i++) { + for (int k = 0; k < h.getDepth(); k++) { c.accept(i, k, x, z, h); } } @@ -691,7 +671,7 @@ default Hunk iterate(Predicate p, Consumer3 c) default Hunk iterate(int parallelism, Predicate p, Consumer3 c) { iterate(parallelism, (x, y, z, t) -> { - if(p.test(t)) { + if (p.test(t)) { c.accept(x, y, z); } }); @@ -706,7 +686,7 @@ default Hunk iterate(Predicate p, Consumer4 default Hunk iterate(int parallelism, Predicate p, Consumer4 c) { iterate(parallelism, (x, y, z, t) -> { - if(p.test(t)) { + if (p.test(t)) { c.accept(x, y, z, t); } }); @@ -719,9 +699,9 @@ default Hunk iterate(Consumer3 c) { } default Hunk iterateSync(Consumer3 c) { - for(int i = 0; i < getWidth(); i++) { - for(int j = 0; j < getHeight(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getWidth(); i++) { + for (int j = 0; j < getHeight(); j++) { + for (int k = 0; k < getDepth(); k++) { c.accept(i, j, k); } } @@ -731,9 +711,9 @@ default Hunk iterateSync(Consumer3 c) { } default Hunk iterateSync(Consumer4 c) { - for(int i = 0; i < getWidth(); i++) { - for(int j = 0; j < getHeight(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getWidth(); i++) { + for (int j = 0; j < getHeight(); j++) { + for (int k = 0; k < getDepth(); k++) { c.accept(i, j, k, get(i, j, k)); } } @@ -743,9 +723,9 @@ default Hunk iterateSync(Consumer4 c) { } default Hunk updateSync(Function4 c) { - for(int i = 0; i < getWidth(); i++) { - for(int j = 0; j < getHeight(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getWidth(); i++) { + for (int j = 0; j < getHeight(); j++) { + for (int k = 0; k < getDepth(); k++) { set(i, j, k, c.apply(i, j, k, get(i, j, k))); } } @@ -755,9 +735,9 @@ default Hunk updateSync(Function4 c) { } default Hunk iterateSyncIO(Consumer4IO c) throws IOException { - for(int i = 0; i < getWidth(); i++) { - for(int j = 0; j < getHeight(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getWidth(); i++) { + for (int j = 0; j < getHeight(); j++) { + for (int k = 0; k < getDepth(); k++) { c.accept(i, j, k, get(i, j, k)); } } @@ -769,9 +749,9 @@ default Hunk iterateSyncIO(Consumer4IO c) throw default Hunk iterate(int parallelism, Consumer3 c) { compute3D(parallelism, (x, y, z, h) -> { - for(int i = 0; i < h.getWidth(); i++) { - for(int j = 0; j < h.getHeight(); j++) { - for(int k = 0; k < h.getDepth(); k++) { + for (int i = 0; i < h.getWidth(); i++) { + for (int j = 0; j < h.getHeight(); j++) { + for (int k = 0; k < h.getDepth(); k++) { c.accept(i + x, j + y, k + z); } } @@ -788,9 +768,9 @@ default Hunk iterate(Consumer4 c) { default Hunk iterate(int parallelism, Consumer4 c) { compute3D(parallelism, (x, y, z, h) -> { - for(int i = 0; i < h.getWidth(); i++) { - for(int j = 0; j < h.getHeight(); j++) { - for(int k = 0; k < h.getDepth(); k++) { + for (int i = 0; i < h.getWidth(); i++) { + for (int j = 0; j < h.getHeight(); j++) { + for (int k = 0; k < h.getDepth(); k++) { c.accept(i + x, j + y, k + z, h.get(i, j, k)); } } @@ -805,14 +785,14 @@ default Hunk compute2D(Consumer4> v) { } default Hunk compute2D(int parallelism, Consumer4> v) { - if(get2DDimension(parallelism) == 1) { + if (get2DDimension(parallelism) == 1) { v.accept(0, 0, 0, this); return this; } BurstExecutor e = MultiBurst.burst.burst(parallelism); - if(isAtomic()) { + if (isAtomic()) { getSectionsAtomic2D(parallelism, (xx, yy, zz, h) -> e.queue(() -> { v.accept(xx, yy, zz, h); @@ -826,7 +806,7 @@ default Hunk compute2D(int parallelism, Consumer4 compute2D(int parallelism, Consumer4 compute2DYRange(int parallelism, int ymin, int ymax, Consumer4> v) { - if(get2DDimension(parallelism) == 1) { + if (get2DDimension(parallelism) == 1) { v.accept(0, 0, 0, this); return this; } @@ -850,7 +830,7 @@ default Hunk compute2DYRange(int parallelism, int ymin, int ymax, Consumer4 compute3D(Consumer4> v) { } default Hunk compute3D(int parallelism, Consumer4> v) { - if(get3DDimension(parallelism) == 1) { + if (get3DDimension(parallelism) == 1) { v.accept(0, 0, 0, this); return this; } @@ -874,7 +854,7 @@ default Hunk compute3D(int parallelism, Consumer4 e.queue(() -> { v.accept(xx, yy, zz, h); - synchronized(rq) { + synchronized (rq) { rq.add(r); } }), this::insert); @@ -890,7 +870,7 @@ default Hunk getSections2D(int sections, Consumer5 getSectionsAtomic2D(int sections, Consumer4> v) { int dim = get2DDimension(sections); - if(sections <= 1) { + if (sections <= 1) { getAtomicSection(0, 0, 0, getWidth(), getHeight(), getDepth(), (hh) -> v.accept(0, 0, 0, hh)); return this; } @@ -901,10 +881,10 @@ default Hunk getSectionsAtomic2D(int sections, Consumer4 v.accept(ii, 0, jj, h)); i = i == 0 ? i + wr : i; @@ -918,7 +898,7 @@ default Hunk getSectionsAtomic2D(int sections, Consumer4 getSections2D(int sections, Consumer5, Runnable> v, Consumer4> inserter) { int dim = get2DDimension(sections); - if(sections <= 1) { + if (sections <= 1) { getSection(0, 0, 0, getWidth(), getHeight(), getDepth(), (hh, r) -> v.accept(0, 0, 0, hh, r), inserter); return this; } @@ -929,10 +909,10 @@ default Hunk getSections2D(int sections, Consumer5 v.accept(ii, 0, jj, h, r), inserter); i = i == 0 ? i + wr : i; @@ -946,7 +926,7 @@ default Hunk getSections2D(int sections, Consumer5 getSections2DYLimit(int sections, int ymin, int ymax, Consumer5, Runnable> v, Consumer4> inserter) { int dim = get2DDimension(sections); - if(sections <= 1) { + if (sections <= 1) { getSection(0, 0, 0, getWidth(), getHeight(), getDepth(), (hh, r) -> v.accept(0, 0, 0, hh, r), inserter); return this; } @@ -957,10 +937,10 @@ default Hunk getSections2DYLimit(int sections, int ymin, int ymax, Consumer5< int dr = getDepth() - (d * dim); int i, j; - for(i = 0; i < getWidth(); i += w) { + for (i = 0; i < getWidth(); i += w) { int ii = i; - for(j = 0; j < getDepth(); j += d) { + for (j = 0; j < getDepth(); j += d) { int jj = j; getSection(i, ymin, j, i + w + (i == 0 ? wr : 0), ymax, j + d + (j == 0 ? dr : 0), (h, r) -> v.accept(ii, ymin, jj, h, r), inserter); i = i == 0 ? i + wr : i; @@ -978,7 +958,7 @@ default Hunk getSections3D(int sections, Consumer5 getSections3D(int sections, Consumer5, Runnable> v, Consumer4> inserter) { int dim = get3DDimension(sections); - if(sections <= 1) { + if (sections <= 1) { getSection(0, 0, 0, getWidth(), getHeight(), getDepth(), (hh, r) -> v.accept(0, 0, 0, hh, r), inserter); return this; } @@ -991,13 +971,13 @@ default Hunk getSections3D(int sections, Consumer5 v.accept(ii, jj, kk, hh, r), inserter); i = i == 0 ? i + wr : i; @@ -1029,26 +1009,20 @@ default Hunk getAtomicSection(int x, int y, int z, int x1, int y1, int z1, Co /** * Create a new hunk from a section of this hunk. * - * @param x1 - * The min x (inclusive) - * @param y1 - * The min y (inclusive) - * @param z1 - * The min z (inclusive) - * @param x2 - * The max x (exclusive) - * @param y2 - * The max y (exclusive) - * @param z2 - * The max z (exclusive) + * @param x1 The min x (inclusive) + * @param y1 The min y (inclusive) + * @param z1 The min z (inclusive) + * @param x2 The max x (exclusive) + * @param y2 The max y (exclusive) + * @param z2 The max z (exclusive) * @return the new hunk (x2-x1, y2-y1, z2-z1) */ default ArrayHunk crop(int x1, int y1, int z1, int x2, int y2, int z2) { ArrayHunk h = new ArrayHunk(x2 - x1, y2 - y1, z2 - z1); - for(int i = x1; i < x2; i++) { - for(int j = y1; j < y2; j++) { - for(int k = z1; k < z2; k++) { + for (int i = x1; i < x2; i++) { + for (int j = y1; j < y2; j++) { + for (int k = z1; k < z2; k++) { h.setRaw(i - x1, j - y1, k - z1, getRaw(i, j, k)); } } @@ -1061,18 +1035,12 @@ default ArrayHunk crop(int x1, int y1, int z1, int x2, int y2, int z2) { * Create a new view of this same hunk from a section of this hunk. * Modifications are routed to this hunk! * - * @param x1 - * The min x (inclusive) - * @param y1 - * The min y (inclusive) - * @param z1 - * The min z (inclusive) - * @param x2 - * The max x (exclusive) - * @param y2 - * The max y (exclusive) - * @param z2 - * The max z (exclusive) + * @param x1 The min x (inclusive) + * @param y1 The min y (inclusive) + * @param z1 The min z (inclusive) + * @param x2 The max x (exclusive) + * @param y2 The max y (exclusive) + * @param z2 The max z (exclusive) * @return the cropped view of this hunk (x2-x1, y2-y1, z2-z1) */ default Hunk croppedView(int x1, int y1, int z1, int x2, int y2, int z2) { @@ -1097,25 +1065,18 @@ default Hunk croppedView(int x1, int y1, int z1, int x2, int y2, int z2) { /** * Set a region * - * @param x1 - * inclusive 1st x - * @param y1 - * inclusive 1st y - * @param z1 - * inclusive 1st z - * @param x2 - * inclusive 2nd x - * @param y2 - * inclusive 2nd y - * @param z2 - * inclusive 2nd z - * @param t - * the value to set + * @param x1 inclusive 1st x + * @param y1 inclusive 1st y + * @param z1 inclusive 1st z + * @param x2 inclusive 2nd x + * @param y2 inclusive 2nd y + * @param z2 inclusive 2nd z + * @param t the value to set */ default void set(int x1, int y1, int z1, int x2, int y2, int z2, T t) { - for(int i = x1; i <= x2; i++) { - for(int j = y1; j <= y2; j++) { - for(int k = z1; k <= z2; k++) { + for (int i = x1; i <= x2; i++) { + for (int j = y1; j <= y2; j++) { + for (int k = z1; k <= z2; k++) { setRaw(i, j, k, t); } } @@ -1125,12 +1086,9 @@ default void set(int x1, int y1, int z1, int x2, int y2, int z2, T t) { /** * Get the value to the closest valid position * - * @param x - * the x - * @param y - * the y - * @param z - * the z + * @param x the x + * @param y the y + * @param z the z * @return the value closest to the border of the hunk */ default T getClosest(int x, int y, int z) { @@ -1160,12 +1118,11 @@ default void fill(T t) { /** * Get a 1 node thick hunk representing the face of this hunk * - * @param f - * the face + * @param f the face * @return the hunk view of this hunk */ default Hunk viewFace(HunkFace f) { - switch(f) { + switch (f) { case BOTTOM: return croppedView(0, 0, 0, getWidth() - 1, 0, getDepth() - 1); case EAST: @@ -1188,12 +1145,11 @@ default Hunk viewFace(HunkFace f) { /** * Crop (copy) a 1 node thick hunk representing the face of this hunk * - * @param f - * the face + * @param f the face * @return the hunk copy (face) of this hunk */ default Hunk cropFace(HunkFace f) { - switch(f) { + switch (f) { case BOTTOM: return crop(0, 0, 0, getWidth() - 1, 0, getDepth() - 1); case EAST: @@ -1216,19 +1172,14 @@ default Hunk cropFace(HunkFace f) { /** * Set a value at the given position * - * @param x - * the x - * @param y - * the y - * @param z - * the z - * @param t - * the value + * @param x the x + * @param y the y + * @param z the z + * @param t the value */ default void set(int x, int y, int z, T t) { - if(!contains(x, y, z)) - { - Iris.warn("OUT OF BOUNDS " + x + " " + y + " "+ z + " in bounds " + getWidth() + " " + getHeight() + " " + getDepth() ); + if (!contains(x, y, z)) { + Iris.warn("OUT OF BOUNDS " + x + " " + y + " " + z + " in bounds " + getWidth() + " " + getHeight() + " " + getDepth()); return; } @@ -1236,7 +1187,7 @@ default void set(int x, int y, int z, T t) { } default void setIfExists(int x, int y, int z, T t) { - if(x < 0 || x >= getWidth() || y < 0 || y >= getHeight() || z < 0 || z >= getDepth()) { + if (x < 0 || x >= getWidth() || y < 0 || y >= getHeight() || z < 0 || z >= getDepth()) { return; } @@ -1244,7 +1195,7 @@ default void setIfExists(int x, int y, int z, T t) { } default T getIfExists(int x, int y, int z, T t) { - if(x < 0 || x >= getWidth() || y < 0 || y >= getHeight() || z < 0 || z >= getDepth()) { + if (x < 0 || x >= getWidth() || y < 0 || y >= getHeight() || z < 0 || z >= getDepth()) { return t; } @@ -1258,26 +1209,19 @@ default T getIfExists(int x, int y, int z) { /** * Set a value at the given position without checking coordinate bounds * - * @param x - * the x - * @param y - * the y - * @param z - * the z - * @param t - * the value + * @param x the x + * @param y the y + * @param z the z + * @param t the value */ void setRaw(int x, int y, int z, T t); /** * Get a value at the given position without checking coordinate bounds * - * @param x - * the x - * @param y - * the y - * @param z - * the z + * @param x the x + * @param y the y + * @param z the z * @return the value or null */ T getRaw(int x, int y, int z); @@ -1285,12 +1229,9 @@ default T getIfExists(int x, int y, int z) { /** * Get a value at the given position * - * @param x - * the x - * @param y - * the y - * @param z - * the z + * @param x the x + * @param y the y + * @param z the z * @return the value or null */ default T get(int x, int y, int z) { @@ -1300,7 +1241,7 @@ default T get(int x, int y, int z) { default T getOr(int x, int y, int z, T t) { T v = getRaw(x, y, z); - if(v == null) { + if (v == null) { return t; } @@ -1310,14 +1251,10 @@ default T getOr(int x, int y, int z, T t) { /** * Insert a hunk into this one with an offset the inserted hunk * - * @param offX - * the offset from zero for x - * @param offY - * the offset from zero for y - * @param offZ - * the offset from zero for z - * @param hunk - * the hunk to insert + * @param offX the offset from zero for x + * @param offY the offset from zero for y + * @param offZ the offset from zero for z + * @param hunk the hunk to insert */ default void insert(int offX, int offY, int offZ, Hunk hunk) { insert(offX, offY, offZ, hunk, false); @@ -1330,8 +1267,7 @@ default void insertSoftly(int offX, int offY, int offZ, Hunk hunk, Predicate< /** * Insert a hunk into this one * - * @param hunk - * the hunk to insert + * @param hunk the hunk to insert */ default void insert(Hunk hunk) { insert(0, 0, 0, hunk, false); @@ -1351,10 +1287,8 @@ default Hunk getSource() { /** * Insert a hunk into this one * - * @param hunk - * the hunk to insert - * @param inverted - * invert the inserted hunk or not + * @param hunk the hunk to insert + * @param inverted invert the inserted hunk or not */ default void insert(Hunk hunk, boolean inverted) { insert(0, 0, 0, hunk, inverted); @@ -1364,21 +1298,16 @@ default void insert(Hunk hunk, boolean inverted) { * Insert a hunk into this one with an offset and possibly inverting the y of * the inserted hunk * - * @param offX - * the offset from zero for x - * @param offY - * the offset from zero for y - * @param offZ - * the offset from zero for z - * @param hunk - * the hunk to insert - * @param invertY - * should the inserted hunk be inverted + * @param offX the offset from zero for x + * @param offY the offset from zero for y + * @param offZ the offset from zero for z + * @param hunk the hunk to insert + * @param invertY should the inserted hunk be inverted */ default void insert(int offX, int offY, int offZ, Hunk hunk, boolean invertY) { - for(int i = offX; i < offX + hunk.getWidth(); i++) { - for(int j = offY; j < offY + hunk.getHeight(); j++) { - for(int k = offZ; k < offZ + hunk.getDepth(); k++) { + for (int i = offX; i < offX + hunk.getWidth(); i++) { + for (int j = offY; j < offY + hunk.getHeight(); j++) { + for (int k = offZ; k < offZ + hunk.getDepth(); k++) { setRaw(i, j, k, hunk.getRaw(i - offX, j - offY, k - offZ)); } } @@ -1390,22 +1319,17 @@ default void insert(int offX, int offY, int offZ, Hunk hunk, boolean invertY) * already used * the inserted hunk * - * @param offX - * the offset from zero for x - * @param offY - * the offset from zero for y - * @param offZ - * the offset from zero for z - * @param hunk - * the hunk to insert - * @param invertY - * should the inserted hunk be inverted + * @param offX the offset from zero for x + * @param offY the offset from zero for y + * @param offZ the offset from zero for z + * @param hunk the hunk to insert + * @param invertY should the inserted hunk be inverted */ default void insertSoftly(int offX, int offY, int offZ, Hunk hunk, boolean invertY, Predicate shouldOverwrite) { - for(int i = offX; i < offX + hunk.getWidth(); i++) { - for(int j = offY; j < offY + hunk.getHeight(); j++) { - for(int k = offZ; k < offZ + hunk.getDepth(); k++) { - if(shouldOverwrite.test(getRaw(i, j, k))) { + for (int i = offX; i < offX + hunk.getWidth(); i++) { + for (int j = offY; j < offY + hunk.getHeight(); j++) { + for (int k = offZ; k < offZ + hunk.getDepth(); k++) { + if (shouldOverwrite.test(getRaw(i, j, k))) { setRaw(i, j, k, hunk.getRaw(i - offX, j - offY, k - offZ)); } } @@ -1416,8 +1340,7 @@ default void insertSoftly(int offX, int offY, int offZ, Hunk hunk, boolean in /** * Acts like fill, however if used by a mapped hunk, will simply clear it * - * @param b - * the data to use for fill + * @param b the data to use for fill */ default void empty(T b) { fill(b); @@ -1426,24 +1349,21 @@ default void empty(T b) { /** * Take a hunk and scale it up using interpolation * - * @param scale - * the scale - * @param d - * the interpolation method - * @param interpolated - * the interpolated value converter + * @param scale the scale + * @param d the interpolation method + * @param interpolated the interpolated value converter * @return the new hunk */ default Hunk interpolate3D(double scale, InterpolationMethod3D d, Interpolated interpolated) { Hunk t = Hunk.newArrayHunk((int) (getWidth() * scale), (int) (getHeight() * scale), (int) (getDepth() * scale)); NoiseProvider3 n3 = (x, y, z) -> interpolated.toDouble( - t.get((int) (x / scale), - (int) (y / scale), - (int) (z / scale))); + t.get((int) (x / scale), + (int) (y / scale), + (int) (z / scale))); - for(int i = 0; i < t.getWidth(); i++) { - for(int j = 0; j < t.getHeight(); j++) { - for(int k = 0; k < t.getDepth(); k++) { + for (int i = 0; i < t.getWidth(); i++) { + for (int j = 0; j < t.getHeight(); j++) { + for (int k = 0; k < t.getDepth(); k++) { t.set(i, j, k, interpolated.fromDouble(IrisInterpolation.getNoise3D(d, i, j, k, scale, n3))); } } @@ -1456,23 +1376,20 @@ default Hunk interpolate3D(double scale, InterpolationMethod3D d, Interpolate * Take a hunk and scale it up using interpolation * 2D, (using only x and z) assumes the height is 1 * - * @param scale - * the scale - * @param d - * the interpolation method - * @param interpolated - * the interpolated value converter + * @param scale the scale + * @param d the interpolation method + * @param interpolated the interpolated value converter * @return the new hunk */ default Hunk interpolate2D(double scale, InterpolationMethod d, Interpolated interpolated) { Hunk t = Hunk.newArrayHunk((int) (getWidth() * scale), 1, (int) (getDepth() * scale)); NoiseProvider n2 = (x, z) -> interpolated.toDouble( - t.get((int) (x / scale), - 0, - (int) (z / scale))); + t.get((int) (x / scale), + 0, + (int) (z / scale))); - for(int i = 0; i < t.getWidth(); i++) { - for(int j = 0; j < t.getDepth(); j++) { + for (int i = 0; i < t.getWidth(); i++) { + for (int j = 0; j < t.getDepth(); j++) { t.set(i, 0, j, interpolated.fromDouble(IrisInterpolation.getNoise(d, i, j, scale, n2))); } } @@ -1512,9 +1429,9 @@ default Hunk rotate(double x, double y, double z, Supplier3R r = builder.get(maxX - minX, maxY - minY, maxZ - minZ); int[] cr = {(maxX - minX) / 2, (maxY - minY) / 2, (maxZ - minZ) / 2}; - for(i = 0; i < w; i++) { - for(j = 0; j < h; j++) { - for(k = 0; k < d; k++) { + for (i = 0; i < w; i++) { + for (j = 0; j < h; j++) { + for (k = 0; k < d; k++) { b[0] = i - c[0]; b[1] = j - c[1]; b[2] = k - c[2]; @@ -1522,7 +1439,7 @@ default Hunk rotate(double x, double y, double z, Supplier3R= 0 && y < getHeight() && y >= 0 && z < getDepth() && z >= 0; } - default int volume() - { + default int volume() { return getWidth() * getDepth() * getHeight(); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/bits/DataBits.java b/src/main/java/com/volmit/iris/util/hunk/bits/DataBits.java index 007d41cca..2afc0c3b4 100644 --- a/src/main/java/com/volmit/iris/util/hunk/bits/DataBits.java +++ b/src/main/java/com/volmit/iris/util/hunk/bits/DataBits.java @@ -29,27 +29,27 @@ import java.util.function.IntConsumer; public class DataBits { - private static final int[] MAGIC = new int[] { - -1, -1, 0, Integer.MIN_VALUE, 0, 0, 1431655765, 1431655765, 0, Integer.MIN_VALUE, - 0, 1, 858993459, 858993459, 0, 715827882, 715827882, 0, 613566756, 613566756, - 0, Integer.MIN_VALUE, 0, 2, 477218588, 477218588, 0, 429496729, 429496729, 0, - 390451572, 390451572, 0, 357913941, 357913941, 0, 330382099, 330382099, 0, 306783378, - 306783378, 0, 286331153, 286331153, 0, Integer.MIN_VALUE, 0, 3, 252645135, 252645135, - 0, 238609294, 238609294, 0, 226050910, 226050910, 0, 214748364, 214748364, 0, - 204522252, 204522252, 0, 195225786, 195225786, 0, 186737708, 186737708, 0, 178956970, - 178956970, 0, 171798691, 171798691, 0, 165191049, 165191049, 0, 159072862, 159072862, - 0, 153391689, 153391689, 0, 148102320, 148102320, 0, 143165576, 143165576, 0, - 138547332, 138547332, 0, Integer.MIN_VALUE, 0, 4, 130150524, 130150524, 0, 126322567, - 126322567, 0, 122713351, 122713351, 0, 119304647, 119304647, 0, 116080197, 116080197, - 0, 113025455, 113025455, 0, 110127366, 110127366, 0, 107374182, 107374182, 0, - 104755299, 104755299, 0, 102261126, 102261126, 0, 99882960, 99882960, 0, 97612893, - 97612893, 0, 95443717, 95443717, 0, 93368854, 93368854, 0, 91382282, 91382282, - 0, 89478485, 89478485, 0, 87652393, 87652393, 0, 85899345, 85899345, 0, - 84215045, 84215045, 0, 82595524, 82595524, 0, 81037118, 81037118, 0, 79536431, - 79536431, 0, 78090314, 78090314, 0, 76695844, 76695844, 0, 75350303, 75350303, - 0, 74051160, 74051160, 0, 72796055, 72796055, 0, 71582788, 71582788, 0, - 70409299, 70409299, 0, 69273666, 69273666, 0, 68174084, 68174084, 0, Integer.MIN_VALUE, - 0, 5}; + private static final int[] MAGIC = new int[]{ + -1, -1, 0, Integer.MIN_VALUE, 0, 0, 1431655765, 1431655765, 0, Integer.MIN_VALUE, + 0, 1, 858993459, 858993459, 0, 715827882, 715827882, 0, 613566756, 613566756, + 0, Integer.MIN_VALUE, 0, 2, 477218588, 477218588, 0, 429496729, 429496729, 0, + 390451572, 390451572, 0, 357913941, 357913941, 0, 330382099, 330382099, 0, 306783378, + 306783378, 0, 286331153, 286331153, 0, Integer.MIN_VALUE, 0, 3, 252645135, 252645135, + 0, 238609294, 238609294, 0, 226050910, 226050910, 0, 214748364, 214748364, 0, + 204522252, 204522252, 0, 195225786, 195225786, 0, 186737708, 186737708, 0, 178956970, + 178956970, 0, 171798691, 171798691, 0, 165191049, 165191049, 0, 159072862, 159072862, + 0, 153391689, 153391689, 0, 148102320, 148102320, 0, 143165576, 143165576, 0, + 138547332, 138547332, 0, Integer.MIN_VALUE, 0, 4, 130150524, 130150524, 0, 126322567, + 126322567, 0, 122713351, 122713351, 0, 119304647, 119304647, 0, 116080197, 116080197, + 0, 113025455, 113025455, 0, 110127366, 110127366, 0, 107374182, 107374182, 0, + 104755299, 104755299, 0, 102261126, 102261126, 0, 99882960, 99882960, 0, 97612893, + 97612893, 0, 95443717, 95443717, 0, 93368854, 93368854, 0, 91382282, 91382282, + 0, 89478485, 89478485, 0, 87652393, 87652393, 0, 85899345, 85899345, 0, + 84215045, 84215045, 0, 82595524, 82595524, 0, 81037118, 81037118, 0, 79536431, + 79536431, 0, 78090314, 78090314, 0, 76695844, 76695844, 0, 75350303, 75350303, + 0, 74051160, 74051160, 0, 72796055, 72796055, 0, 71582788, 71582788, 0, + 70409299, 70409299, 0, 69273666, 69273666, 0, 68174084, 68174084, 0, Integer.MIN_VALUE, + 0, 5}; private final AtomicLongArray data; private final int bits; @@ -80,8 +80,8 @@ public DataBits(int bits, int length, AtomicLongArray data) { this.divideShift = MAGIC[var3 + 2]; int var4 = (length + valuesPerLong - 1) / valuesPerLong; - if(data != null) { - if(data.length() != var4) { + if (data != null) { + if (data.length() != var4) { throw new RuntimeException("NO! Trying to load " + data.length() + " into actual size of " + var4 + " because length: " + length + " (bits: " + bits + ")"); } this.data = data; @@ -90,10 +90,6 @@ public DataBits(int bits, int length, AtomicLongArray data) { } } - public String toString() { - return "DBits: " + size + "/" + bits + "[" + data.length() + "]"; - } - private static int dataLength(int bits, int length) { return (length + ((char) (64 / bits)) - 1) / ((char) (64 / bits)); } @@ -101,26 +97,15 @@ private static int dataLength(int bits, int length) { private static AtomicLongArray longs(DataInputStream din, int longSize) throws IOException { AtomicLongArray a = new AtomicLongArray(longSize); - for(int i = 0; i < a.length(); i++) { + for (int i = 0; i < a.length(); i++) { a.set(i, Varint.readUnsignedVarLong(din)); } return a; } - public DataBits setBits(int newBits) { - if(bits != newBits) { - DataBits newData = new DataBits(newBits, size); - AtomicInteger c = new AtomicInteger(0); - - for(int i = 0; i < size; i++) { - newData.set(i, get(i)); - } - - return newData; - } - - return this; + public String toString() { + return "DBits: " + size + "/" + bits + "[" + data.length() + "]"; } private int cellIndex(int var0) { @@ -172,14 +157,29 @@ public int getBits() { return bits; } + public DataBits setBits(int newBits) { + if (bits != newBits) { + DataBits newData = new DataBits(newBits, size); + AtomicInteger c = new AtomicInteger(0); + + for (int i = 0; i < size; i++) { + newData.set(i, get(i)); + } + + return newData; + } + + return this; + } + public void getAll(IntConsumer var0) { int var1 = 0; - for(int i = 0; i < data.length(); i++) { + for (int i = 0; i < data.length(); i++) { long var5 = data.get(i); - for(int var7 = 0; var7 < valuesPerLong; var7++) { + for (int var7 = 0; var7 < valuesPerLong; var7++) { var0.accept((int) (var5 & mask)); var5 >>= bits; - if(++var1 >= size) { + if (++var1 >= size) { return; } } @@ -187,7 +187,7 @@ public void getAll(IntConsumer var0) { } public void write(DataOutputStream dos) throws IOException { - for(int i = 0; i < data.length(); i++) { + for (int i = 0; i < data.length(); i++) { Varint.writeUnsignedVarLong(data.get(i), dos); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/bits/DataContainer.java b/src/main/java/com/volmit/iris/util/hunk/bits/DataContainer.java index 2bf3915b1..44d25a1e7 100644 --- a/src/main/java/com/volmit/iris/util/hunk/bits/DataContainer.java +++ b/src/main/java/com/volmit/iris/util/hunk/bits/DataContainer.java @@ -66,7 +66,7 @@ public void writeNodeData(DataOutputStream dos, Character character) throws IOEx StringBuilder sb = new StringBuilder(); - for(int i = c.size() - 1; i >= 0; i--) { + for (int i = c.size() - 1; i >= 0; i--) { sb.setCharAt(i, c.get(i)); } @@ -86,13 +86,37 @@ public void writeNodeData(DataOutputStream dos, Character character) throws IOEx } }, s.length()); - for(int i = 0; i < s.length(); i++) { + for (int i = 0; i < s.length(); i++) { c.set(i, s.charAt(i)); } c.writeDos(dos); } + private static int[] computeBitLimits() { + int[] m = new int[16]; + + for (int i = 0; i < m.length; i++) { + m[i] = (int) Math.pow(2, i); + } + + return m; + } + + protected static int bits(int size) { + if (DataContainer.BIT[INITIAL_BITS] >= size) { + return INITIAL_BITS; + } + + for (int i = 0; i < DataContainer.BIT.length; i++) { + if (DataContainer.BIT[i] >= size) { + return i; + } + } + + return DataContainer.BIT.length - 1; + } + public DataBits getData() { return data.get(); } @@ -103,7 +127,7 @@ public Palette getPalette() { public String toString() { return "DataContainer <" + length + " x " + bits + " bits> -> Palette<" + palette.get().getClass().getSimpleName().replaceAll("\\QPalette\\E", "") + ">: " + palette.get().size() + - " " + data.get().toString() + " PalBit: " + palette.get().bits(); + " " + data.get().toString() + " PalBit: " + palette.get().bits(); } public byte[] write() throws IOException { @@ -132,7 +156,7 @@ private Palette newPalette(DataInputStream din) throws IOException { } private Palette newPalette(int bits) { - if(bits <= LINEAR_BITS_LIMIT) { + if (bits <= LINEAR_BITS_LIMIT) { return new LinearPalette<>(LINEAR_INITIAL_LENGTH); } @@ -140,16 +164,16 @@ private Palette newPalette(int bits) { } public void ensurePaletted(T t) { - if(palette.get().id(t) == -1) { + if (palette.get().id(t) == -1) { expandOne(); } } public void set(int position, T t) { - synchronized(this) { + synchronized (this) { int id = palette.get().id(t); - if(id == -1) { + if (id == -1) { expandOne(); id = palette.get().add(t); } @@ -159,16 +183,16 @@ public void set(int position, T t) { } private void expandOne() { - if(palette.get().size() + 1 >= BIT[bits.get()]) { + if (palette.get().size() + 1 >= BIT[bits.get()]) { setBits(bits.get() + 1); } } public T get(int position) { - synchronized(this) { + synchronized (this) { int id = data.get().get(position) + 1; - if(id <= 0) { + if (id <= 0) { return null; } @@ -177,8 +201,8 @@ public T get(int position) { } public void setBits(int bits) { - if(this.bits.get() != bits) { - if(this.bits.get() <= LINEAR_BITS_LIMIT != bits <= LINEAR_BITS_LIMIT) { + if (this.bits.get() != bits) { + if (this.bits.get() <= LINEAR_BITS_LIMIT != bits <= LINEAR_BITS_LIMIT) { palette.set(newPalette(bits).from(palette.get())); } @@ -187,30 +211,6 @@ public void setBits(int bits) { } } - private static int[] computeBitLimits() { - int[] m = new int[16]; - - for(int i = 0; i < m.length; i++) { - m[i] = (int) Math.pow(2, i); - } - - return m; - } - - protected static int bits(int size) { - if(DataContainer.BIT[INITIAL_BITS] >= size) { - return INITIAL_BITS; - } - - for(int i = 0; i < DataContainer.BIT.length; i++) { - if(DataContainer.BIT[i] >= size) { - return i; - } - } - - return DataContainer.BIT.length - 1; - } - public int size() { return getData().getSize(); } diff --git a/src/main/java/com/volmit/iris/util/hunk/bits/HashPalette.java b/src/main/java/com/volmit/iris/util/hunk/bits/HashPalette.java index 7c48f4c14..2afc2c696 100644 --- a/src/main/java/com/volmit/iris/util/hunk/bits/HashPalette.java +++ b/src/main/java/com/volmit/iris/util/hunk/bits/HashPalette.java @@ -38,7 +38,7 @@ public HashPalette() { @Override public T get(int id) { - if(id < 0 || id >= size.get()) { + if (id < 0 || id >= size.get()) { return null; } @@ -50,7 +50,7 @@ public int add(T t) { int index = size.getAndIncrement(); palette.put(t, index); - if(t != null) { + if (t != null) { lookup.put(index, t); } @@ -59,7 +59,7 @@ public int add(T t) { @Override public int id(T t) { - if(t == null) { + if (t == null) { return 0; } @@ -74,8 +74,8 @@ public int size() { @Override public void iterate(Consumer2 c) { - for(T i : palette.keySet()) { - if(i == null) { + for (T i : palette.keySet()) { + if (i == null) { continue; } diff --git a/src/main/java/com/volmit/iris/util/hunk/bits/LinearPalette.java b/src/main/java/com/volmit/iris/util/hunk/bits/LinearPalette.java index 2f244074c..f83183384 100644 --- a/src/main/java/com/volmit/iris/util/hunk/bits/LinearPalette.java +++ b/src/main/java/com/volmit/iris/util/hunk/bits/LinearPalette.java @@ -36,7 +36,7 @@ public LinearPalette(int initialSize) { @Override public T get(int id) { - if(id < 0 || id >= size.get()) { + if (id < 0 || id >= size.get()) { return null; } @@ -52,10 +52,10 @@ public int add(T t) { } private void grow(int newLength) { - if(newLength > palette.get().length()) { + if (newLength > palette.get().length()) { AtomicReferenceArray a = new AtomicReferenceArray<>(newLength + size.get()); - for(int i = 0; i < palette.get().length(); i++) { + for (int i = 0; i < palette.get().length(); i++) { a.set(i, palette.get().get(i)); } @@ -65,12 +65,12 @@ private void grow(int newLength) { @Override public int id(T t) { - if(t == null) { + if (t == null) { return 0; } - for(int i = 1; i < size() + 1; i++) { - if(t.equals(palette.get().get(i))) { + for (int i = 1; i < size() + 1; i++) { + if (t.equals(palette.get().get(i))) { return i; } } @@ -85,7 +85,7 @@ public int size() { @Override public void iterate(Consumer2 c) { - for(int i = 1; i < size() + 1; i++) { + for (int i = 1; i < size() + 1; i++) { c.accept(palette.get().get(i), i); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/bits/Palette.java b/src/main/java/com/volmit/iris/util/hunk/bits/Palette.java index b0e602a1c..92a190576 100644 --- a/src/main/java/com/volmit/iris/util/hunk/bits/Palette.java +++ b/src/main/java/com/volmit/iris/util/hunk/bits/Palette.java @@ -44,14 +44,14 @@ default void iterateIO(Consumer2IO c) { iterate((a, b) -> { try { c.accept(a, b); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } }); } default Palette from(int size, Writable writable, DataInputStream in) throws IOException { - for(int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) { add(writable.readNodeData(in)); } diff --git a/src/main/java/com/volmit/iris/util/hunk/storage/MappedHunk.java b/src/main/java/com/volmit/iris/util/hunk/storage/MappedHunk.java index c49cfe03d..553f8c9c6 100644 --- a/src/main/java/com/volmit/iris/util/hunk/storage/MappedHunk.java +++ b/src/main/java/com/volmit/iris/util/hunk/storage/MappedHunk.java @@ -53,7 +53,7 @@ public boolean isEmpty() { @Override public void setRaw(int x, int y, int z, T t) { - if(t == null) { + if (t == null) { data.remove(index(x, y, z)); return; } @@ -69,7 +69,7 @@ private Integer index(int x, int y, int z) { public synchronized Hunk iterateSync(Consumer4 c) { int idx, z; - for(Map.Entry g : data.entrySet()) { + for (Map.Entry g : data.entrySet()) { idx = g.getKey(); z = idx / (getWidth() * getHeight()); idx -= (z * getWidth() * getHeight()); @@ -83,7 +83,7 @@ public synchronized Hunk iterateSync(Consumer4 public synchronized Hunk iterateSyncIO(Consumer4IO c) throws IOException { int idx, z; - for(Map.Entry g : data.entrySet()) { + for (Map.Entry g : data.entrySet()) { idx = g.getKey(); z = idx / (getWidth() * getHeight()); idx -= (z * getWidth() * getHeight()); diff --git a/src/main/java/com/volmit/iris/util/hunk/storage/MappedSyncHunk.java b/src/main/java/com/volmit/iris/util/hunk/storage/MappedSyncHunk.java index 00bd79b6e..947ec77b3 100644 --- a/src/main/java/com/volmit/iris/util/hunk/storage/MappedSyncHunk.java +++ b/src/main/java/com/volmit/iris/util/hunk/storage/MappedSyncHunk.java @@ -48,15 +48,15 @@ public boolean isMapped() { } public boolean isEmpty() { - synchronized(data) { + synchronized (data) { return data.isEmpty(); } } @Override public void setRaw(int x, int y, int z, T t) { - synchronized(data) { - if(t == null) { + synchronized (data) { + if (t == null) { data.remove(index(x, y, z)); return; } @@ -71,10 +71,10 @@ private Integer index(int x, int y, int z) { @Override public synchronized Hunk iterateSync(Consumer4 c) { - synchronized(data) { + synchronized (data) { int idx, z; - for(Map.Entry g : data.entrySet()) { + for (Map.Entry g : data.entrySet()) { idx = g.getKey(); z = idx / (getWidth() * getHeight()); idx -= (z * getWidth() * getHeight()); @@ -87,10 +87,10 @@ public synchronized Hunk iterateSync(Consumer4 @Override public synchronized Hunk iterateSyncIO(Consumer4IO c) throws IOException { - synchronized(data) { + synchronized (data) { int idx, z; - for(Map.Entry g : data.entrySet()) { + for (Map.Entry g : data.entrySet()) { idx = g.getKey(); z = idx / (getWidth() * getHeight()); idx -= (z * getWidth() * getHeight()); @@ -103,14 +103,14 @@ public synchronized Hunk iterateSyncIO(Consumer4IO iterateSync(Consumer4 c) { - for(int i = 0; i < getWidth(); i++) { - for(int j = 0; j < getHeight(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getWidth(); i++) { + for (int j = 0; j < getHeight(); j++) { + for (int k = 0; k < getDepth(); k++) { T t = getRaw(i, j, k); - if(t != null) { + if (t != null) { c.accept(i, j, k, t); } } @@ -68,11 +68,11 @@ public synchronized Hunk iterateSync(Consumer4 @Override public synchronized Hunk iterateSyncIO(Consumer4IO c) throws IOException { - for(int i = 0; i < getWidth(); i++) { - for(int j = 0; j < getHeight(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getWidth(); i++) { + for (int j = 0; j < getHeight(); j++) { + for (int k = 0; k < getDepth(); k++) { T t = getRaw(i, j, k); - if(t != null) { + if (t != null) { c.accept(i, j, k, t); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/storage/PaletteOrHunk.java b/src/main/java/com/volmit/iris/util/hunk/storage/PaletteOrHunk.java index c1bb25a06..ea7c4e30e 100644 --- a/src/main/java/com/volmit/iris/util/hunk/storage/PaletteOrHunk.java +++ b/src/main/java/com/volmit/iris/util/hunk/storage/PaletteOrHunk.java @@ -39,16 +39,16 @@ public DataContainer palette() { return isPalette() ? ((PaletteHunk) hunk).getData() : null; } + public boolean isPalette() { + return hunk instanceof PaletteHunk; + } + public void setPalette(DataContainer c) { - if(isPalette()) { + if (isPalette()) { ((PaletteHunk) hunk).setPalette(c); } } - public boolean isPalette() { - return hunk instanceof PaletteHunk; - } - @Override public void setRaw(int x, int y, int z, T t) { hunk.setRaw(x, y, z, t); diff --git a/src/main/java/com/volmit/iris/util/hunk/storage/StorageHunk.java b/src/main/java/com/volmit/iris/util/hunk/storage/StorageHunk.java index 216a42be8..52764ca42 100644 --- a/src/main/java/com/volmit/iris/util/hunk/storage/StorageHunk.java +++ b/src/main/java/com/volmit/iris/util/hunk/storage/StorageHunk.java @@ -28,7 +28,7 @@ public abstract class StorageHunk implements Hunk { private final int depth; public StorageHunk(int width, int height, int depth) { - if(width <= 0 || height <= 0 || depth <= 0) { + if (width <= 0 || height <= 0 || depth <= 0) { throw new RuntimeException("Unsupported size " + width + " " + height + " " + depth); } diff --git a/src/main/java/com/volmit/iris/util/hunk/storage/SynchronizedArrayHunk.java b/src/main/java/com/volmit/iris/util/hunk/storage/SynchronizedArrayHunk.java index 7a6bdcc3b..bf0ebe3d6 100644 --- a/src/main/java/com/volmit/iris/util/hunk/storage/SynchronizedArrayHunk.java +++ b/src/main/java/com/volmit/iris/util/hunk/storage/SynchronizedArrayHunk.java @@ -38,14 +38,14 @@ public SynchronizedArrayHunk(int w, int h, int d) { @Override public void setRaw(int x, int y, int z, T t) { - synchronized(data) { + synchronized (data) { data[index(x, y, z)] = t; } } @Override public T getRaw(int x, int y, int z) { - synchronized(data) { + synchronized (data) { return data[index(x, y, z)]; } } @@ -56,7 +56,7 @@ private int index(int x, int y, int z) { @Override public void fill(T t) { - synchronized(data) { + synchronized (data) { Arrays.fill(data, t); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkHolder.java b/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkHolder.java index a7b066526..99faeeeec 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkHolder.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkHolder.java @@ -55,13 +55,12 @@ public int getHeight() { } public void apply() { - for(int i = 0; i < getHeight(); i++) { - for(int j = 0; j < getWidth(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getHeight(); i++) { + for (int j = 0; j < getWidth(); j++) { + for (int k = 0; k < getDepth(); k++) { Biome b = super.getRaw(j, i, k); - if(b != null) - { + if (b != null) { chunk.setBiome(j, i + minHeight, k, b); } } @@ -77,7 +76,7 @@ public Biome getRaw(int x, int y, int z) { } public void forceBiomeBaseInto(int x, int y, int z, Object somethingVeryDirty) { - if(chunk instanceof LinkedTerrainChunk) { + if (chunk instanceof LinkedTerrainChunk) { INMS.get().forceBiomeInto(x, y + minHeight, z, somethingVeryDirty, ((LinkedTerrainChunk) chunk).getRawBiome()); return; } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkView.java index 8ff5361dd..19007c184 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/BiomeGridHunkView.java @@ -58,8 +58,7 @@ public int getHeight() { public void setRaw(int x, int y, int z, Biome t) { chunk.setBiome(x, y + minHeight, z, t); - if(y > highest) - { + if (y > highest) { highest = y; } } @@ -70,7 +69,7 @@ public Biome getRaw(int x, int y, int z) { } public void forceBiomeBaseInto(int x, int y, int z, Object somethingVeryDirty) { - if(chunk instanceof LinkedTerrainChunk) { + if (chunk instanceof LinkedTerrainChunk) { INMS.get().forceBiomeInto(x, y + minHeight, z, somethingVeryDirty, ((LinkedTerrainChunk) chunk).getRawBiome()); return; } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/ChunkBiomeHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/ChunkBiomeHunkView.java index 677225f18..97c732eeb 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/ChunkBiomeHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/ChunkBiomeHunkView.java @@ -49,7 +49,7 @@ public int getHeight() { @Override public void setRaw(int x, int y, int z, Biome t) { - if(t == null) { + if (t == null) { return; } @@ -59,6 +59,6 @@ public void setRaw(int x, int y, int z, Biome t) { @Override public Biome getRaw(int x, int y, int z) { return Iris.service(EditSVC.class) - .getBiome(chunk.getWorld(), x + (chunk.getX() * 16), y, z + (chunk.getZ() * 16)); + .getBiome(chunk.getWorld(), x + (chunk.getX() * 16), y, z + (chunk.getZ() * 16)); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkHolder.java b/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkHolder.java index 82894a1fb..37529d0c7 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkHolder.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkHolder.java @@ -56,12 +56,12 @@ public BlockData getRaw(int x, int y, int z) { } public void apply() { - for(int i = 0; i < getHeight(); i++) { - for(int j = 0; j < getWidth(); j++) { - for(int k = 0; k < getDepth(); k++) { + for (int i = 0; i < getHeight(); i++) { + for (int j = 0; j < getWidth(); j++) { + for (int k = 0; k < getDepth(); k++) { BlockData b = super.getRaw(j, i, k); - if(b != null) { + if (b != null) { chunk.setBlock(j, i + chunk.getMinHeight(), k, b); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkView.java index c8e7ca177..a9267f3fc 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/ChunkDataHunkView.java @@ -49,7 +49,7 @@ public int getHeight() { @Override public void set(int x1, int y1, int z1, int x2, int y2, int z2, BlockData t) { - if(t == null) { + if (t == null) { return; } @@ -67,17 +67,14 @@ public void set(int x, int y, int z, BlockData t) { @Override public void setRaw(int x, int y, int z, BlockData t) { - if(t == null) { + if (t == null) { return; } try { chunk.setBlock(x, y + chunk.getMinHeight(), z, t); - } - - catch(Throwable ignored) - { + } catch (Throwable ignored) { } } @@ -87,10 +84,7 @@ public BlockData getRaw(int x, int y, int z) { try { return chunk.getBlockData(x, y + chunk.getMinHeight(), z); - } - - catch(Throwable e) - { + } catch (Throwable e) { } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/ChunkHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/ChunkHunkView.java index 4317e448e..f5d1df9f2 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/ChunkHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/ChunkHunkView.java @@ -49,7 +49,7 @@ public int getHeight() { @Override public void setRaw(int x, int y, int z, BlockData t) { - if(t == null) { + if (t == null) { return; } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/FunctionalHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/FunctionalHunkView.java index 341fc0116..86a4c281f 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/FunctionalHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/FunctionalHunkView.java @@ -35,7 +35,7 @@ public FunctionalHunkView(Hunk src, Function converter, Function @Override public void setRaw(int x, int y, int z, T t) { - if(backConverter == null) { + if (backConverter == null) { throw new UnsupportedOperationException("You cannot writeNodeData to this hunk (Read Only)"); } @@ -44,7 +44,7 @@ public void setRaw(int x, int y, int z, T t) { @Override public T getRaw(int x, int y, int z) { - if(converter == null) { + if (converter == null) { throw new UnsupportedOperationException("You cannot read this hunk (Write Only)"); } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/RotatedXHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/RotatedXHunkView.java index 623100a79..b18fa3a93 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/RotatedXHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/RotatedXHunkView.java @@ -36,9 +36,9 @@ public void setRaw(int x, int y, int z, T t) { int yc = (int) Math.round(cos * (getHeight() / 2f) - sin * (getDepth() / 2f)); int zc = (int) Math.round(sin * (getHeight() / 2f) + cos * (getDepth() / 2f)); src.setIfExists(x, - (int) Math.round(cos * (y - yc) - sin * (z - zc)) - yc, - (int) Math.round(sin * y - yc + cos * (z - zc)) - zc, - t); + (int) Math.round(cos * (y - yc) - sin * (z - zc)) - yc, + (int) Math.round(sin * y - yc + cos * (z - zc)) - zc, + t); } @Override @@ -46,8 +46,8 @@ public T getRaw(int x, int y, int z) { int yc = (int) Math.round(cos * (getHeight() / 2f) - sin * (getDepth() / 2f)); int zc = (int) Math.round(sin * (getHeight() / 2f) + cos * (getDepth() / 2f)); return src.getIfExists(x, - (int) Math.round(cos * (y - yc) - sin * (z - zc)) - yc, - (int) Math.round(sin * y - yc + cos * (z - zc)) - zc + (int) Math.round(cos * (y - yc) - sin * (z - zc)) - yc, + (int) Math.round(sin * y - yc + cos * (z - zc)) - zc ); } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/RotatedYHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/RotatedYHunkView.java index 967ac0c32..566cdc2b4 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/RotatedYHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/RotatedYHunkView.java @@ -36,9 +36,9 @@ public void setRaw(int x, int y, int z, T t) { int xc = (int) Math.round(cos * (getWidth() / 2f) + sin * (getDepth() / 2f)); int zc = (int) Math.round(-sin * (getWidth() / 2f) + cos * (getDepth() / 2f)); src.setIfExists((int) - Math.round(cos * (x - xc) + sin * (z - zc)) - xc, - y, - (int) Math.round(-sin * (x - xc) + cos * (z - zc)) - zc, t); + Math.round(cos * (x - xc) + sin * (z - zc)) - xc, + y, + (int) Math.round(-sin * (x - xc) + cos * (z - zc)) - zc, t); } @Override @@ -46,9 +46,9 @@ public T getRaw(int x, int y, int z) { int xc = (int) Math.round(cos * (getWidth() / 2f) + sin * (getDepth() / 2f)); int zc = (int) Math.round(-sin * (getWidth() / 2f) + cos * (getDepth() / 2f)); return src.getIfExists( - (int) Math.round(cos * (x - xc) + sin * (z - zc)) - xc, - y, - (int) Math.round(-sin * (x - xc) + cos * (z - zc)) - zc + (int) Math.round(cos * (x - xc) + sin * (z - zc)) - xc, + y, + (int) Math.round(-sin * (x - xc) + cos * (z - zc)) - zc ); } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/RotatedZHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/RotatedZHunkView.java index 8bf1bfb84..ff68d26cf 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/RotatedZHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/RotatedZHunkView.java @@ -43,8 +43,8 @@ public T getRaw(int x, int y, int z) { int xc = (int) Math.round(cos * (getWidth() / 2f) - sin * (getHeight() / 2f)); int yc = (int) Math.round(sin * (getWidth() / 2f) + cos * (getHeight() / 2f)); return src.getIfExists((int) Math.round(cos * (x - xc) - sin * (y - yc)) - xc, - (int) Math.round(sin * (x - xc) + cos * (y - yc)) - yc - , z); + (int) Math.round(sin * (x - xc) + cos * (y - yc)) - yc + , z); } @Override diff --git a/src/main/java/com/volmit/iris/util/hunk/view/SynchronizedHunkView.java b/src/main/java/com/volmit/iris/util/hunk/view/SynchronizedHunkView.java index 757fa1b99..5198c0c5a 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/SynchronizedHunkView.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/SynchronizedHunkView.java @@ -30,7 +30,7 @@ public SynchronizedHunkView(Hunk src) { @Override public void setRaw(int x, int y, int z, T t) { - synchronized(src) { + synchronized (src) { src.setRaw(x, y, z, t); } } diff --git a/src/main/java/com/volmit/iris/util/hunk/view/WriteTrackHunk.java b/src/main/java/com/volmit/iris/util/hunk/view/WriteTrackHunk.java index 7b9605d5d..ee7b68c33 100644 --- a/src/main/java/com/volmit/iris/util/hunk/view/WriteTrackHunk.java +++ b/src/main/java/com/volmit/iris/util/hunk/view/WriteTrackHunk.java @@ -34,7 +34,7 @@ public WriteTrackHunk(Hunk src, AtomicBoolean b) { @Override public void setRaw(int x, int y, int z, T t) { - if(!b.get()) { + if (!b.get()) { b.set(true); } diff --git a/src/main/java/com/volmit/iris/util/interpolation/CompiledStarcast.java b/src/main/java/com/volmit/iris/util/interpolation/CompiledStarcast.java index 49a4bf680..b466ffd8c 100644 --- a/src/main/java/com/volmit/iris/util/interpolation/CompiledStarcast.java +++ b/src/main/java/com/volmit/iris/util/interpolation/CompiledStarcast.java @@ -3,10032 +3,10287 @@ import com.volmit.iris.util.function.NoiseProvider; public class CompiledStarcast { -private static final float[] MAGIC = {0.0F,1.0F,1.2246469E-16F,-1.0F -,0.8660254F,-0.5F,-0.8660254F,6.123234E-17F -,-1.8369701E-16F,0.95105654F,0.309017F,0.58778524F -,-0.809017F,-0.58778524F,-0.95105654F,0.5F -,0.777146F,0.6293204F,0.9781476F,-0.20791169F -,0.4539905F,-0.8910065F,-0.40673664F,-0.9135454F -,-0.9659258F,-0.25881904F,-0.052335955F,0.9986295F -,0.70710677F,-0.70710677F,0.64278764F,0.76604444F -,0.9848077F,0.17364818F,0.34202015F,-0.9396926F -,-0.34202015F,-0.9848077F,-0.64278764F,0.809017F -,-0.309017F,0.52991927F,0.8480481F,0.89879405F -,0.43837115F,0.9945219F,-0.104528464F,0.7880108F -,-0.6156615F,-0.9781476F,-0.6946584F,-0.7193398F -,-0.9702957F,-0.2419219F,-0.1391731F,0.99026805F -,0.8910065F,0.98768836F,0.15643446F,-0.15643446F -,-0.98768836F,-0.4539905F,0.42261827F,0.9063078F -,0.9659258F,0.25881904F,-0.17364818F,0.81915206F -,-0.57357645F,0.087155744F,-0.9961947F,0.40673664F -,0.9135454F,0.7431448F,0.6691306F,0.20791169F -,-0.9945219F,-0.7431448F,0.37460658F,0.92718387F -,0.6946584F,0.7193398F,0.99939084F,0.034899496F -,0.9396926F,-0.6691306F,-0.89879405F,0.06975647F -,-0.9975641F,-0.76604444F,-0.88294756F,-0.46947157F -,-0.9612617F,0.27563736F,-0.7880108F,0.6156615F -,0.35836795F,0.9335804F,0.104528464F,0.54463905F -,-0.83867055F,-0.777146F,-0.6293204F,-0.9986295F -,0.052335955F,0.2923717F,0.9563047F,0.5591929F -,0.82903755F,0.9961947F,0.8746197F,-0.4848096F -,-0.12186934F,-0.99254614F,-0.656059F,-0.7547096F -,-0.8480481F,-0.52991927F,-0.99939084F,-0.94551855F -,0.32556817F,-0.60181504F,0.7986355F,0.9612617F -,-0.37460658F,-0.82903755F,0.2419219F,0.9702957F -,0.46947157F,0.88294756F,-0.034899496F,-0.27563736F -,-0.06975647F,0.22495106F,0.97437006F,0.9998477F -,-0.017452406F,0.60181504F,-0.7986355F,0.190809F -,-0.98162717F,-0.92050487F,-0.39073113F,-0.8746197F -,0.4848096F,0.98162717F,0.83867055F,0.57357645F -,0.8571673F,-0.5150381F,-0.9563047F,-0.2923717F -,0.7547096F,-0.32556817F,0.94551855F,0.1391731F -,-0.92718387F,0.12186934F,0.99254614F,0.656059F -,0.7313537F,-0.6819984F,-0.9063078F,-0.42261827F -,-0.190809F,-0.8571673F,0.5150381F,-0.087155744F -,-0.81915206F,0.9975641F,-0.43837115F,-0.5591929F -,-0.99026805F,-0.35836795F,-0.54463905F,-0.9335804F}; - -public static float getStarcast(float x, float z, float r, float checks, NoiseProvider n){ - if(checks >= 1 && checks <= 128){ - if(checks < 2){return sc1(x,z,r,n);} - if(checks < 3){return sc2(x,z,r,n);} - if(checks < 4){return sc3(x,z,r,n);} - if(checks < 5){return sc4(x,z,r,n);} - if(checks < 6){return sc5(x,z,r,n);} - if(checks < 7){return sc6(x,z,r,n);} - if(checks < 8){return sc7(x,z,r,n);} - if(checks < 9){return sc8(x,z,r,n);} - if(checks < 10){return sc9(x,z,r,n);} - if(checks < 11){return sc10(x,z,r,n);} - if(checks < 12){return sc11(x,z,r,n);} - if(checks < 13){return sc12(x,z,r,n);} - if(checks < 14){return sc13(x,z,r,n);} - if(checks < 15){return sc14(x,z,r,n);} - if(checks < 16){return sc15(x,z,r,n);} - if(checks < 17){return sc16(x,z,r,n);} - if(checks < 18){return sc17(x,z,r,n);} - if(checks < 19){return sc18(x,z,r,n);} - if(checks < 20){return sc19(x,z,r,n);} - if(checks < 21){return sc20(x,z,r,n);} - if(checks < 22){return sc21(x,z,r,n);} - if(checks < 23){return sc22(x,z,r,n);} - if(checks < 24){return sc23(x,z,r,n);} - if(checks < 25){return sc24(x,z,r,n);} - if(checks < 26){return sc25(x,z,r,n);} - if(checks < 27){return sc26(x,z,r,n);} - if(checks < 28){return sc27(x,z,r,n);} - if(checks < 29){return sc28(x,z,r,n);} - if(checks < 30){return sc29(x,z,r,n);} - if(checks < 31){return sc30(x,z,r,n);} - if(checks < 32){return sc31(x,z,r,n);} - if(checks < 33){return sc32(x,z,r,n);} - if(checks < 34){return sc33(x,z,r,n);} - if(checks < 35){return sc34(x,z,r,n);} - if(checks < 36){return sc35(x,z,r,n);} - if(checks < 37){return sc36(x,z,r,n);} - if(checks < 38){return sc37(x,z,r,n);} - if(checks < 39){return sc38(x,z,r,n);} - if(checks < 40){return sc39(x,z,r,n);} - if(checks < 41){return sc40(x,z,r,n);} - if(checks < 42){return sc41(x,z,r,n);} - if(checks < 43){return sc42(x,z,r,n);} - if(checks < 44){return sc43(x,z,r,n);} - if(checks < 45){return sc44(x,z,r,n);} - if(checks < 46){return sc45(x,z,r,n);} - if(checks < 47){return sc46(x,z,r,n);} - if(checks < 48){return sc47(x,z,r,n);} - if(checks < 49){return sc48(x,z,r,n);} - if(checks < 50){return sc49(x,z,r,n);} - if(checks < 51){return sc50(x,z,r,n);} - if(checks < 52){return sc51(x,z,r,n);} - if(checks < 53){return sc52(x,z,r,n);} - if(checks < 54){return sc53(x,z,r,n);} - if(checks < 55){return sc54(x,z,r,n);} - if(checks < 56){return sc55(x,z,r,n);} - if(checks < 57){return sc56(x,z,r,n);} - if(checks < 58){return sc57(x,z,r,n);} - if(checks < 59){return sc58(x,z,r,n);} - if(checks < 60){return sc59(x,z,r,n);} - if(checks < 61){return sc60(x,z,r,n);} - if(checks < 62){return sc61(x,z,r,n);} - if(checks < 63){return sc62(x,z,r,n);} - if(checks < 64){return sc63(x,z,r,n);} - if(checks < 65){return sc64(x,z,r,n);} - if(checks < 66){return sc65(x,z,r,n);} - if(checks < 67){return sc66(x,z,r,n);} - if(checks < 68){return sc67(x,z,r,n);} - if(checks < 69){return sc68(x,z,r,n);} - if(checks < 70){return sc69(x,z,r,n);} - if(checks < 71){return sc70(x,z,r,n);} - if(checks < 72){return sc71(x,z,r,n);} - if(checks < 73){return sc72(x,z,r,n);} - if(checks < 74){return sc73(x,z,r,n);} - if(checks < 75){return sc74(x,z,r,n);} - if(checks < 76){return sc75(x,z,r,n);} - if(checks < 77){return sc76(x,z,r,n);} - if(checks < 78){return sc77(x,z,r,n);} - if(checks < 79){return sc78(x,z,r,n);} - if(checks < 80){return sc79(x,z,r,n);} - if(checks < 81){return sc80(x,z,r,n);} - if(checks < 82){return sc81(x,z,r,n);} - if(checks < 83){return sc82(x,z,r,n);} - if(checks < 84){return sc83(x,z,r,n);} - if(checks < 85){return sc84(x,z,r,n);} - if(checks < 86){return sc85(x,z,r,n);} - if(checks < 87){return sc86(x,z,r,n);} - if(checks < 88){return sc87(x,z,r,n);} - if(checks < 89){return sc88(x,z,r,n);} - if(checks < 90){return sc89(x,z,r,n);} - if(checks < 91){return sc90(x,z,r,n);} - if(checks < 92){return sc91(x,z,r,n);} - if(checks < 93){return sc92(x,z,r,n);} - if(checks < 94){return sc93(x,z,r,n);} - if(checks < 95){return sc94(x,z,r,n);} - if(checks < 96){return sc95(x,z,r,n);} - if(checks < 97){return sc96(x,z,r,n);} - if(checks < 98){return sc97(x,z,r,n);} - if(checks < 99){return sc98(x,z,r,n);} - if(checks < 100){return sc99(x,z,r,n);} - if(checks < 101){return sc100(x,z,r,n);} - if(checks < 102){return sc101(x,z,r,n);} - if(checks < 103){return sc102(x,z,r,n);} - if(checks < 104){return sc103(x,z,r,n);} - if(checks < 105){return sc104(x,z,r,n);} - if(checks < 106){return sc105(x,z,r,n);} - if(checks < 107){return sc106(x,z,r,n);} - if(checks < 108){return sc107(x,z,r,n);} - if(checks < 109){return sc108(x,z,r,n);} - if(checks < 110){return sc109(x,z,r,n);} - if(checks < 111){return sc110(x,z,r,n);} - if(checks < 112){return sc111(x,z,r,n);} - if(checks < 113){return sc112(x,z,r,n);} - if(checks < 114){return sc113(x,z,r,n);} - if(checks < 115){return sc114(x,z,r,n);} - if(checks < 116){return sc115(x,z,r,n);} - if(checks < 117){return sc116(x,z,r,n);} - if(checks < 118){return sc117(x,z,r,n);} - if(checks < 119){return sc118(x,z,r,n);} - if(checks < 120){return sc119(x,z,r,n);} - if(checks < 121){return sc120(x,z,r,n);} - if(checks < 122){return sc121(x,z,r,n);} - if(checks < 123){return sc122(x,z,r,n);} - if(checks < 124){return sc123(x,z,r,n);} - if(checks < 125){return sc124(x,z,r,n);} - if(checks < 126){return sc125(x,z,r,n);} - if(checks < 127){return sc126(x,z,r,n);} - if(checks < 128){return sc127(x,z,r,n);} - return sc128(x,z,r,n); - } - -float m = 360F / checks; - float v = 0; - - for(int i = 0; i < 360; i += m) { - float sin = (float) Math.sin(Math.toRadians(i)); - float cos = (float) Math.cos(Math.toRadians(i)); - float cx = x + ((r * cos) - (r * sin)); - float cz = z + ((r * sin) + (r * cos)); - v += n.noise(cx, cz); - } - - return v / checks; -} -private static float sc1(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))))*1.0F; -} - -private static float sc2(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))))*0.5F; -} - -private static float sc3(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))))*0.33333334F; -} - -private static float sc4(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))))*0.25F; -} - -private static float sc5(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))))*0.2F; -} - -private static float sc6(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))))*0.16666667F; -} - -private static float sc7(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.14285715F; -} - -private static float sc8(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))))*0.125F; -} - -private static float sc9(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))))*0.11111111F; -} - -private static float sc10(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))))*0.1F; -} - -private static float sc11(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.09090909F; -} - -private static float sc12(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))))*0.083333336F; -} - -private static float sc13(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))))*0.07692308F; -} - -private static float sc14(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))))*0.071428575F; -} - -private static float sc15(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))))*0.06666667F; -} - -private static float sc16(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.0625F; -} - -private static float sc17(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.05882353F; -} - -private static float sc18(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))))*0.055555556F; -} - -private static float sc19(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))))*0.05263158F; -} - -private static float sc20(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))))*0.05F; -} - -private static float sc21(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[105])), z + ((r * MAGIC[105]) + (r * MAGIC[106])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[113]) - (r * MAGIC[112])), z + ((r * MAGIC[112]) + (r * MAGIC[113])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[115]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[115])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[120]) - (r * MAGIC[119])), z + ((r * MAGIC[119]) + (r * MAGIC[120])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[122]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[122])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.04761905F; -} - -private static float sc22(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.045454547F; -} - -private static float sc23(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))))*0.04347826F; -} - -private static float sc24(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))))*0.041666668F; -} - -private static float sc25(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))))*0.04F; -} - -private static float sc26(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[134]) - (r * MAGIC[133])), z + ((r * MAGIC[133]) + (r * MAGIC[134])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[140]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[140])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[115]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[115])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[142]) - (r * MAGIC[141])), z + ((r * MAGIC[141]) + (r * MAGIC[142])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[144]) - (r * MAGIC[143])), z + ((r * MAGIC[143]) + (r * MAGIC[144])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))))*0.03846154F; -} - -private static float sc27(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[134]) - (r * MAGIC[133])), z + ((r * MAGIC[133]) + (r * MAGIC[134])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[140]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[140])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[115]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[115])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[142]) - (r * MAGIC[141])), z + ((r * MAGIC[141]) + (r * MAGIC[142])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[144]) - (r * MAGIC[143])), z + ((r * MAGIC[143]) + (r * MAGIC[144])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))))*0.037037037F; -} - -private static float sc28(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))))*0.035714287F; -} - -private static float sc29(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))))*0.03448276F; -} - -private static float sc30(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))))*0.033333335F; -} - -private static float sc31(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[145]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[145])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[149]) - (r * MAGIC[148])), z + ((r * MAGIC[148]) + (r * MAGIC[149])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[113]) - (r * MAGIC[112])), z + ((r * MAGIC[112]) + (r * MAGIC[113])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[143]) - (r * MAGIC[111])), z + ((r * MAGIC[111]) + (r * MAGIC[143])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[151]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[151])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[152]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[152])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[154]) - (r * MAGIC[153])), z + ((r * MAGIC[153]) + (r * MAGIC[154])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.032258064F; -} - -private static float sc32(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[145]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[145])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[149]) - (r * MAGIC[148])), z + ((r * MAGIC[148]) + (r * MAGIC[149])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[113]) - (r * MAGIC[112])), z + ((r * MAGIC[112]) + (r * MAGIC[113])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[143]) - (r * MAGIC[111])), z + ((r * MAGIC[111]) + (r * MAGIC[143])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[151]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[151])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[152]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[152])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[154]) - (r * MAGIC[153])), z + ((r * MAGIC[153]) + (r * MAGIC[154])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.03125F; -} - -private static float sc33(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))))*0.030303031F; -} - -private static float sc34(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))))*0.029411765F; -} - -private static float sc35(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))))*0.028571429F; -} - -private static float sc36(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))))*0.027777778F; -} - -private static float sc37(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))))*0.027027028F; -} - -private static float sc38(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))))*0.02631579F; -} - -private static float sc39(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))))*0.025641026F; -} - -private static float sc40(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))))*0.025F; -} - -private static float sc41(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.024390243F; -} - -private static float sc42(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.023809524F; -} - -private static float sc43(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.023255814F; -} - -private static float sc44(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.022727273F; -} - -private static float sc45(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))))*0.022222223F; -} - -private static float sc46(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.02173913F; -} - -private static float sc47(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.021276595F; -} - -private static float sc48(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.020833334F; -} - -private static float sc49(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.020408163F; -} - -private static float sc50(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.02F; -} - -private static float sc51(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.019607844F; -} - -private static float sc52(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.01923077F; -} - -private static float sc53(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.018867925F; -} - -private static float sc54(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.018518519F; -} - -private static float sc55(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.018181818F; -} - -private static float sc56(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.017857144F; -} - -private static float sc57(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.01754386F; -} - -private static float sc58(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.01724138F; -} - -private static float sc59(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.016949153F; -} - -private static float sc60(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))))*0.016666668F; -} - -private static float sc61(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.016393442F; -} - -private static float sc62(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.016129032F; -} - -private static float sc63(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.015873017F; -} - -private static float sc64(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.015625F; -} - -private static float sc65(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.015384615F; -} - -private static float sc66(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.015151516F; -} - -private static float sc67(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.014925373F; -} - -private static float sc68(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.014705882F; -} - -private static float sc69(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.014492754F; -} - -private static float sc70(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.014285714F; -} - -private static float sc71(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.014084507F; -} - -private static float sc72(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109])))))*0.013888889F; -} - -private static float sc73(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.01369863F; -} - -private static float sc74(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.013513514F; -} - -private static float sc75(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.013333334F; -} - -private static float sc76(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.013157895F; -} - -private static float sc77(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.012987013F; -} - -private static float sc78(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.012820513F; -} - -private static float sc79(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.012658228F; -} - -private static float sc80(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.0125F; -} - -private static float sc81(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.012345679F; -} - -private static float sc82(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.0121951215F; -} - -private static float sc83(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.012048192F; -} - -private static float sc84(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.011904762F; -} - -private static float sc85(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.011764706F; -} - -private static float sc86(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.011627907F; -} - -private static float sc87(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.011494253F; -} - -private static float sc88(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.011363637F; -} - -private static float sc89(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.011235955F; -} - -private static float sc90(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))))*0.011111111F; -} - -private static float sc91(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010989011F; -} - -private static float sc92(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010869565F; -} - -private static float sc93(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010752688F; -} - -private static float sc94(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010638298F; -} - -private static float sc95(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010526316F; -} - -private static float sc96(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010416667F; -} - -private static float sc97(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010309278F; -} - -private static float sc98(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.010204081F; -} - -private static float sc99(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.01010101F; -} - -private static float sc100(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.01F; -} - -private static float sc101(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.00990099F; -} - -private static float sc102(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009803922F; -} - -private static float sc103(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009708738F; -} - -private static float sc104(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009615385F; -} - -private static float sc105(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.00952381F; -} - -private static float sc106(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009433962F; -} - -private static float sc107(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009345794F; -} - -private static float sc108(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009259259F; -} - -private static float sc109(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.0091743115F; -} - -private static float sc110(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009090909F; -} - -private static float sc111(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.009009009F; -} - -private static float sc112(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.008928572F; -} - -private static float sc113(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.0088495575F; -} - -private static float sc114(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.00877193F; -} - -private static float sc115(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.008695652F; -} - -private static float sc116(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.00862069F; -} - -private static float sc117(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.008547009F; -} - -private static float sc118(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.008474576F; -} - -private static float sc119(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.008403362F; -} - -private static float sc120(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.008333334F; -} - -private static float sc121(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.008264462F; -} - -private static float sc122(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.008196721F; -} - -private static float sc123(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.008130081F; -} - -private static float sc124(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.008064516F; -} - -private static float sc125(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.008F; -} - -private static float sc126(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.007936508F; -} - -private static float sc127(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.007874016F; -} - -private static float sc128(float x, float z, float r, NoiseProvider n) { - return (((float)n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) - +((float)n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) - +((float)n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) - +((float)n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) - +((float)n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) - +((float)n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) - +((float)n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) - +((float)n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) - +((float)n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) - +((float)n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) - +((float)n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) - +((float)n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) - +((float)n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) - +((float)n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) - +((float)n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) - +((float)n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) - +((float)n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) - +((float)n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) - +((float)n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) - +((float)n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) - +((float)n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) - +((float)n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) - +((float)n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) - +((float)n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) - +((float)n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) - +((float)n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) - +((float)n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) - +((float)n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) - +((float)n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) - +((float)n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) - +((float)n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) - +((float)n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) - +((float)n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) - +((float)n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) - +((float)n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) - +((float)n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) - +((float)n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) - +((float)n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) - +((float)n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) - +((float)n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) - +((float)n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) - +((float)n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) - +((float)n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) - +((float)n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) - +((float)n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) - +((float)n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) - +((float)n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) - +((float)n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) - +((float)n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) - +((float)n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) - +((float)n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) - +((float)n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) - +((float)n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) - +((float)n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) - +((float)n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) - +((float)n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) - +((float)n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) - +((float)n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) - +((float)n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) - +((float)n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) - +((float)n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) - +((float)n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) - +((float)n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) - +((float)n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) - +((float)n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) - +((float)n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) - +((float)n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) - +((float)n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) - +((float)n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) - +((float)n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) - +((float)n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) - +((float)n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) - +((float)n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) - +((float)n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) - +((float)n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) - +((float)n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) - +((float)n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) - +((float)n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) - +((float)n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) - +((float)n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) - +((float)n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) - +((float)n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) - +((float)n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) - +((float)n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) - +((float)n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) - +((float)n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) - +((float)n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) - +((float)n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) - +((float)n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) - +((float)n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82])))))*0.0078125F; -} + private static final float[] MAGIC = {0.0F, 1.0F, 1.2246469E-16F, -1.0F + , 0.8660254F, -0.5F, -0.8660254F, 6.123234E-17F + , -1.8369701E-16F, 0.95105654F, 0.309017F, 0.58778524F + , -0.809017F, -0.58778524F, -0.95105654F, 0.5F + , 0.777146F, 0.6293204F, 0.9781476F, -0.20791169F + , 0.4539905F, -0.8910065F, -0.40673664F, -0.9135454F + , -0.9659258F, -0.25881904F, -0.052335955F, 0.9986295F + , 0.70710677F, -0.70710677F, 0.64278764F, 0.76604444F + , 0.9848077F, 0.17364818F, 0.34202015F, -0.9396926F + , -0.34202015F, -0.9848077F, -0.64278764F, 0.809017F + , -0.309017F, 0.52991927F, 0.8480481F, 0.89879405F + , 0.43837115F, 0.9945219F, -0.104528464F, 0.7880108F + , -0.6156615F, -0.9781476F, -0.6946584F, -0.7193398F + , -0.9702957F, -0.2419219F, -0.1391731F, 0.99026805F + , 0.8910065F, 0.98768836F, 0.15643446F, -0.15643446F + , -0.98768836F, -0.4539905F, 0.42261827F, 0.9063078F + , 0.9659258F, 0.25881904F, -0.17364818F, 0.81915206F + , -0.57357645F, 0.087155744F, -0.9961947F, 0.40673664F + , 0.9135454F, 0.7431448F, 0.6691306F, 0.20791169F + , -0.9945219F, -0.7431448F, 0.37460658F, 0.92718387F + , 0.6946584F, 0.7193398F, 0.99939084F, 0.034899496F + , 0.9396926F, -0.6691306F, -0.89879405F, 0.06975647F + , -0.9975641F, -0.76604444F, -0.88294756F, -0.46947157F + , -0.9612617F, 0.27563736F, -0.7880108F, 0.6156615F + , 0.35836795F, 0.9335804F, 0.104528464F, 0.54463905F + , -0.83867055F, -0.777146F, -0.6293204F, -0.9986295F + , 0.052335955F, 0.2923717F, 0.9563047F, 0.5591929F + , 0.82903755F, 0.9961947F, 0.8746197F, -0.4848096F + , -0.12186934F, -0.99254614F, -0.656059F, -0.7547096F + , -0.8480481F, -0.52991927F, -0.99939084F, -0.94551855F + , 0.32556817F, -0.60181504F, 0.7986355F, 0.9612617F + , -0.37460658F, -0.82903755F, 0.2419219F, 0.9702957F + , 0.46947157F, 0.88294756F, -0.034899496F, -0.27563736F + , -0.06975647F, 0.22495106F, 0.97437006F, 0.9998477F + , -0.017452406F, 0.60181504F, -0.7986355F, 0.190809F + , -0.98162717F, -0.92050487F, -0.39073113F, -0.8746197F + , 0.4848096F, 0.98162717F, 0.83867055F, 0.57357645F + , 0.8571673F, -0.5150381F, -0.9563047F, -0.2923717F + , 0.7547096F, -0.32556817F, 0.94551855F, 0.1391731F + , -0.92718387F, 0.12186934F, 0.99254614F, 0.656059F + , 0.7313537F, -0.6819984F, -0.9063078F, -0.42261827F + , -0.190809F, -0.8571673F, 0.5150381F, -0.087155744F + , -0.81915206F, 0.9975641F, -0.43837115F, -0.5591929F + , -0.99026805F, -0.35836795F, -0.54463905F, -0.9335804F}; + + public static float getStarcast(float x, float z, float r, float checks, NoiseProvider n) { + if (checks >= 1 && checks <= 128) { + if (checks < 2) { + return sc1(x, z, r, n); + } + if (checks < 3) { + return sc2(x, z, r, n); + } + if (checks < 4) { + return sc3(x, z, r, n); + } + if (checks < 5) { + return sc4(x, z, r, n); + } + if (checks < 6) { + return sc5(x, z, r, n); + } + if (checks < 7) { + return sc6(x, z, r, n); + } + if (checks < 8) { + return sc7(x, z, r, n); + } + if (checks < 9) { + return sc8(x, z, r, n); + } + if (checks < 10) { + return sc9(x, z, r, n); + } + if (checks < 11) { + return sc10(x, z, r, n); + } + if (checks < 12) { + return sc11(x, z, r, n); + } + if (checks < 13) { + return sc12(x, z, r, n); + } + if (checks < 14) { + return sc13(x, z, r, n); + } + if (checks < 15) { + return sc14(x, z, r, n); + } + if (checks < 16) { + return sc15(x, z, r, n); + } + if (checks < 17) { + return sc16(x, z, r, n); + } + if (checks < 18) { + return sc17(x, z, r, n); + } + if (checks < 19) { + return sc18(x, z, r, n); + } + if (checks < 20) { + return sc19(x, z, r, n); + } + if (checks < 21) { + return sc20(x, z, r, n); + } + if (checks < 22) { + return sc21(x, z, r, n); + } + if (checks < 23) { + return sc22(x, z, r, n); + } + if (checks < 24) { + return sc23(x, z, r, n); + } + if (checks < 25) { + return sc24(x, z, r, n); + } + if (checks < 26) { + return sc25(x, z, r, n); + } + if (checks < 27) { + return sc26(x, z, r, n); + } + if (checks < 28) { + return sc27(x, z, r, n); + } + if (checks < 29) { + return sc28(x, z, r, n); + } + if (checks < 30) { + return sc29(x, z, r, n); + } + if (checks < 31) { + return sc30(x, z, r, n); + } + if (checks < 32) { + return sc31(x, z, r, n); + } + if (checks < 33) { + return sc32(x, z, r, n); + } + if (checks < 34) { + return sc33(x, z, r, n); + } + if (checks < 35) { + return sc34(x, z, r, n); + } + if (checks < 36) { + return sc35(x, z, r, n); + } + if (checks < 37) { + return sc36(x, z, r, n); + } + if (checks < 38) { + return sc37(x, z, r, n); + } + if (checks < 39) { + return sc38(x, z, r, n); + } + if (checks < 40) { + return sc39(x, z, r, n); + } + if (checks < 41) { + return sc40(x, z, r, n); + } + if (checks < 42) { + return sc41(x, z, r, n); + } + if (checks < 43) { + return sc42(x, z, r, n); + } + if (checks < 44) { + return sc43(x, z, r, n); + } + if (checks < 45) { + return sc44(x, z, r, n); + } + if (checks < 46) { + return sc45(x, z, r, n); + } + if (checks < 47) { + return sc46(x, z, r, n); + } + if (checks < 48) { + return sc47(x, z, r, n); + } + if (checks < 49) { + return sc48(x, z, r, n); + } + if (checks < 50) { + return sc49(x, z, r, n); + } + if (checks < 51) { + return sc50(x, z, r, n); + } + if (checks < 52) { + return sc51(x, z, r, n); + } + if (checks < 53) { + return sc52(x, z, r, n); + } + if (checks < 54) { + return sc53(x, z, r, n); + } + if (checks < 55) { + return sc54(x, z, r, n); + } + if (checks < 56) { + return sc55(x, z, r, n); + } + if (checks < 57) { + return sc56(x, z, r, n); + } + if (checks < 58) { + return sc57(x, z, r, n); + } + if (checks < 59) { + return sc58(x, z, r, n); + } + if (checks < 60) { + return sc59(x, z, r, n); + } + if (checks < 61) { + return sc60(x, z, r, n); + } + if (checks < 62) { + return sc61(x, z, r, n); + } + if (checks < 63) { + return sc62(x, z, r, n); + } + if (checks < 64) { + return sc63(x, z, r, n); + } + if (checks < 65) { + return sc64(x, z, r, n); + } + if (checks < 66) { + return sc65(x, z, r, n); + } + if (checks < 67) { + return sc66(x, z, r, n); + } + if (checks < 68) { + return sc67(x, z, r, n); + } + if (checks < 69) { + return sc68(x, z, r, n); + } + if (checks < 70) { + return sc69(x, z, r, n); + } + if (checks < 71) { + return sc70(x, z, r, n); + } + if (checks < 72) { + return sc71(x, z, r, n); + } + if (checks < 73) { + return sc72(x, z, r, n); + } + if (checks < 74) { + return sc73(x, z, r, n); + } + if (checks < 75) { + return sc74(x, z, r, n); + } + if (checks < 76) { + return sc75(x, z, r, n); + } + if (checks < 77) { + return sc76(x, z, r, n); + } + if (checks < 78) { + return sc77(x, z, r, n); + } + if (checks < 79) { + return sc78(x, z, r, n); + } + if (checks < 80) { + return sc79(x, z, r, n); + } + if (checks < 81) { + return sc80(x, z, r, n); + } + if (checks < 82) { + return sc81(x, z, r, n); + } + if (checks < 83) { + return sc82(x, z, r, n); + } + if (checks < 84) { + return sc83(x, z, r, n); + } + if (checks < 85) { + return sc84(x, z, r, n); + } + if (checks < 86) { + return sc85(x, z, r, n); + } + if (checks < 87) { + return sc86(x, z, r, n); + } + if (checks < 88) { + return sc87(x, z, r, n); + } + if (checks < 89) { + return sc88(x, z, r, n); + } + if (checks < 90) { + return sc89(x, z, r, n); + } + if (checks < 91) { + return sc90(x, z, r, n); + } + if (checks < 92) { + return sc91(x, z, r, n); + } + if (checks < 93) { + return sc92(x, z, r, n); + } + if (checks < 94) { + return sc93(x, z, r, n); + } + if (checks < 95) { + return sc94(x, z, r, n); + } + if (checks < 96) { + return sc95(x, z, r, n); + } + if (checks < 97) { + return sc96(x, z, r, n); + } + if (checks < 98) { + return sc97(x, z, r, n); + } + if (checks < 99) { + return sc98(x, z, r, n); + } + if (checks < 100) { + return sc99(x, z, r, n); + } + if (checks < 101) { + return sc100(x, z, r, n); + } + if (checks < 102) { + return sc101(x, z, r, n); + } + if (checks < 103) { + return sc102(x, z, r, n); + } + if (checks < 104) { + return sc103(x, z, r, n); + } + if (checks < 105) { + return sc104(x, z, r, n); + } + if (checks < 106) { + return sc105(x, z, r, n); + } + if (checks < 107) { + return sc106(x, z, r, n); + } + if (checks < 108) { + return sc107(x, z, r, n); + } + if (checks < 109) { + return sc108(x, z, r, n); + } + if (checks < 110) { + return sc109(x, z, r, n); + } + if (checks < 111) { + return sc110(x, z, r, n); + } + if (checks < 112) { + return sc111(x, z, r, n); + } + if (checks < 113) { + return sc112(x, z, r, n); + } + if (checks < 114) { + return sc113(x, z, r, n); + } + if (checks < 115) { + return sc114(x, z, r, n); + } + if (checks < 116) { + return sc115(x, z, r, n); + } + if (checks < 117) { + return sc116(x, z, r, n); + } + if (checks < 118) { + return sc117(x, z, r, n); + } + if (checks < 119) { + return sc118(x, z, r, n); + } + if (checks < 120) { + return sc119(x, z, r, n); + } + if (checks < 121) { + return sc120(x, z, r, n); + } + if (checks < 122) { + return sc121(x, z, r, n); + } + if (checks < 123) { + return sc122(x, z, r, n); + } + if (checks < 124) { + return sc123(x, z, r, n); + } + if (checks < 125) { + return sc124(x, z, r, n); + } + if (checks < 126) { + return sc125(x, z, r, n); + } + if (checks < 127) { + return sc126(x, z, r, n); + } + if (checks < 128) { + return sc127(x, z, r, n); + } + return sc128(x, z, r, n); + } + + float m = 360F / checks; + float v = 0; + + for (int i = 0; i < 360; i += m) { + float sin = (float) Math.sin(Math.toRadians(i)); + float cos = (float) Math.cos(Math.toRadians(i)); + float cx = x + ((r * cos) - (r * sin)); + float cz = z + ((r * sin) + (r * cos)); + v += n.noise(cx, cz); + } + + return v / checks; + } + + private static float sc1(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1]))))) * 1.0F; + } + + private static float sc2(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3]))))) * 0.5F; + } + + private static float sc3(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5]))))) * 0.33333334F; + } + + private static float sc4(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8]))))) * 0.25F; + } + + private static float sc5(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10]))))) * 0.2F; + } + + private static float sc6(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15]))))) * 0.16666667F; + } + + private static float sc7(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.14285715F; + } + + private static float sc8(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28]))))) * 0.125F; + } + + private static float sc9(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31]))))) * 0.11111111F; + } + + private static float sc10(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39]))))) * 0.1F; + } + + private static float sc11(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.09090909F; + } + + private static float sc12(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4]))))) * 0.083333336F; + } + + private static float sc13(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57]))))) * 0.07692308F; + } + + private static float sc14(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32]))))) * 0.071428575F; + } + + private static float sc15(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72]))))) * 0.06666667F; + } + + private static float sc16(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.0625F; + } + + private static float sc17(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.05882353F; + } + + private static float sc18(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84]))))) * 0.055555556F; + } + + private static float sc19(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9]))))) * 0.05263158F; + } + + private static float sc20(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9]))))) * 0.05F; + } + + private static float sc21(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[105])), z + ((r * MAGIC[105]) + (r * MAGIC[106])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[113]) - (r * MAGIC[112])), z + ((r * MAGIC[112]) + (r * MAGIC[113])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[115]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[115])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[120]) - (r * MAGIC[119])), z + ((r * MAGIC[119]) + (r * MAGIC[120])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[122]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[122])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.04761905F; + } + + private static float sc22(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.045454547F; + } + + private static float sc23(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64]))))) * 0.04347826F; + } + + private static float sc24(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64]))))) * 0.041666668F; + } + + private static float sc25(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32]))))) * 0.04F; + } + + private static float sc26(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[134]) - (r * MAGIC[133])), z + ((r * MAGIC[133]) + (r * MAGIC[134])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[140]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[140])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[115]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[115])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[142]) - (r * MAGIC[141])), z + ((r * MAGIC[141]) + (r * MAGIC[142])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[144]) - (r * MAGIC[143])), z + ((r * MAGIC[143]) + (r * MAGIC[144])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57]))))) * 0.03846154F; + } + + private static float sc27(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[134]) - (r * MAGIC[133])), z + ((r * MAGIC[133]) + (r * MAGIC[134])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[140]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[140])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[115]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[115])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[142]) - (r * MAGIC[141])), z + ((r * MAGIC[141]) + (r * MAGIC[142])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[144]) - (r * MAGIC[143])), z + ((r * MAGIC[143]) + (r * MAGIC[144])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57]))))) * 0.037037037F; + } + + private static float sc28(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18]))))) * 0.035714287F; + } + + private static float sc29(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18]))))) * 0.03448276F; + } + + private static float sc30(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18]))))) * 0.033333335F; + } + + private static float sc31(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[145]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[145])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[149]) - (r * MAGIC[148])), z + ((r * MAGIC[148]) + (r * MAGIC[149])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[113]) - (r * MAGIC[112])), z + ((r * MAGIC[112]) + (r * MAGIC[113])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[143]) - (r * MAGIC[111])), z + ((r * MAGIC[111]) + (r * MAGIC[143])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[151]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[151])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[152]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[152])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[154]) - (r * MAGIC[153])), z + ((r * MAGIC[153]) + (r * MAGIC[154])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.032258064F; + } + + private static float sc32(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[145]) - (r * MAGIC[139])), z + ((r * MAGIC[139]) + (r * MAGIC[145])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[149]) - (r * MAGIC[148])), z + ((r * MAGIC[148]) + (r * MAGIC[149])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[137])), z + ((r * MAGIC[137]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[113]) - (r * MAGIC[112])), z + ((r * MAGIC[112]) + (r * MAGIC[113])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[143]) - (r * MAGIC[111])), z + ((r * MAGIC[111]) + (r * MAGIC[143])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[151]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[151])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[152]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[152])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[154]) - (r * MAGIC[153])), z + ((r * MAGIC[153]) + (r * MAGIC[154])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.03125F; + } + + private static float sc33(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32]))))) * 0.030303031F; + } + + private static float sc34(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32]))))) * 0.029411765F; + } + + private static float sc35(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32]))))) * 0.028571429F; + } + + private static float sc36(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32]))))) * 0.027777778F; + } + + private static float sc37(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57]))))) * 0.027027028F; + } + + private static float sc38(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57]))))) * 0.02631579F; + } + + private static float sc39(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57]))))) * 0.025641026F; + } + + private static float sc40(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57]))))) * 0.025F; + } + + private static float sc41(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.024390243F; + } + + private static float sc42(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.023809524F; + } + + private static float sc43(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.023255814F; + } + + private static float sc44(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.022727273F; + } + + private static float sc45(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55]))))) * 0.022222223F; + } + + private static float sc46(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.02173913F; + } + + private static float sc47(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.021276595F; + } + + private static float sc48(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.020833334F; + } + + private static float sc49(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.020408163F; + } + + private static float sc50(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.02F; + } + + private static float sc51(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.019607844F; + } + + private static float sc52(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.01923077F; + } + + private static float sc53(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.018867925F; + } + + private static float sc54(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.018518519F; + } + + private static float sc55(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.018181818F; + } + + private static float sc56(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.017857144F; + } + + private static float sc57(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.01754386F; + } + + private static float sc58(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.01724138F; + } + + private static float sc59(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.016949153F; + } + + private static float sc60(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45]))))) * 0.016666668F; + } + + private static float sc61(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.016393442F; + } + + private static float sc62(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.016129032F; + } + + private static float sc63(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.015873017F; + } + + private static float sc64(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.015625F; + } + + private static float sc65(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.015384615F; + } + + private static float sc66(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.015151516F; + } + + private static float sc67(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.014925373F; + } + + private static float sc68(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.014705882F; + } + + private static float sc69(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.014492754F; + } + + private static float sc70(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.014285714F; + } + + private static float sc71(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.014084507F; + } + + private static float sc72(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[109])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[63])), z + ((r * MAGIC[63]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[67])), z + ((r * MAGIC[67]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[62])), z + ((r * MAGIC[62]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[70]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[70])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[162]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[162])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[168]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[168])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[68]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[68])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[167]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[167])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[69]) - (r * MAGIC[70])), z + ((r * MAGIC[70]) + (r * MAGIC[69])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[62]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[62])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[147]) - (r * MAGIC[168])), z + ((r * MAGIC[168]) + (r * MAGIC[147])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[67]) - (r * MAGIC[68])), z + ((r * MAGIC[68]) + (r * MAGIC[67])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[63]) - (r * MAGIC[163])), z + ((r * MAGIC[163]) + (r * MAGIC[63])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[109]) - (r * MAGIC[167])), z + ((r * MAGIC[167]) + (r * MAGIC[109]))))) * 0.013888889F; + } + + private static float sc73(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.01369863F; + } + + private static float sc74(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.013513514F; + } + + private static float sc75(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.013333334F; + } + + private static float sc76(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.013157895F; + } + + private static float sc77(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.012987013F; + } + + private static float sc78(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.012820513F; + } + + private static float sc79(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.012658228F; + } + + private static float sc80(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.0125F; + } + + private static float sc81(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.012345679F; + } + + private static float sc82(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.0121951215F; + } + + private static float sc83(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.012048192F; + } + + private static float sc84(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.011904762F; + } + + private static float sc85(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.011764706F; + } + + private static float sc86(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.011627907F; + } + + private static float sc87(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.011494253F; + } + + private static float sc88(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.011363637F; + } + + private static float sc89(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.011235955F; + } + + private static float sc90(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169]))))) * 0.011111111F; + } + + private static float sc91(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010989011F; + } + + private static float sc92(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010869565F; + } + + private static float sc93(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010752688F; + } + + private static float sc94(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010638298F; + } + + private static float sc95(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010526316F; + } + + private static float sc96(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010416667F; + } + + private static float sc97(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010309278F; + } + + private static float sc98(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.010204081F; + } + + private static float sc99(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.01010101F; + } + + private static float sc100(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.01F; + } + + private static float sc101(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.00990099F; + } + + private static float sc102(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009803922F; + } + + private static float sc103(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009708738F; + } + + private static float sc104(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009615385F; + } + + private static float sc105(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.00952381F; + } + + private static float sc106(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009433962F; + } + + private static float sc107(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009345794F; + } + + private static float sc108(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009259259F; + } + + private static float sc109(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.0091743115F; + } + + private static float sc110(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009090909F; + } + + private static float sc111(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.009009009F; + } + + private static float sc112(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.008928572F; + } + + private static float sc113(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.0088495575F; + } + + private static float sc114(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.00877193F; + } + + private static float sc115(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.008695652F; + } + + private static float sc116(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.00862069F; + } + + private static float sc117(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.008547009F; + } + + private static float sc118(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.008474576F; + } + + private static float sc119(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.008403362F; + } + + private static float sc120(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[27])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[27])), z + ((r * MAGIC[27]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[57])), z + ((r * MAGIC[57]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[97])), z + ((r * MAGIC[97]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[146])), z + ((r * MAGIC[146]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[28])), z + ((r * MAGIC[28]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[17])), z + ((r * MAGIC[17]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[65])), z + ((r * MAGIC[65]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[58])), z + ((r * MAGIC[58]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[104])), z + ((r * MAGIC[104]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[103]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[103])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[24]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[24])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[175]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[175])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[21]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[21])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[100]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[100])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[101]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[101])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[29]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[29])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[174]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[174])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[61]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[61])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[173]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[173])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[59]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[59])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[26]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[26])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[58]) - (r * MAGIC[60])), z + ((r * MAGIC[60]) + (r * MAGIC[58])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[65]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[65])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[96]) - (r * MAGIC[175])), z + ((r * MAGIC[175]) + (r * MAGIC[96])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[20]) - (r * MAGIC[21])), z + ((r * MAGIC[21]) + (r * MAGIC[20])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[99]) - (r * MAGIC[100])), z + ((r * MAGIC[100]) + (r * MAGIC[99])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[17]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[17])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[16]) - (r * MAGIC[102])), z + ((r * MAGIC[102]) + (r * MAGIC[16])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[146]) - (r * MAGIC[174])), z + ((r * MAGIC[174]) + (r * MAGIC[146])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[56]) - (r * MAGIC[61])), z + ((r * MAGIC[61]) + (r * MAGIC[56])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[97]) - (r * MAGIC[173])), z + ((r * MAGIC[173]) + (r * MAGIC[97])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[64]) - (r * MAGIC[25])), z + ((r * MAGIC[25]) + (r * MAGIC[64])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[57]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[57])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27]))))) * 0.008333334F; + } + + private static float sc121(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.008264462F; + } + + private static float sc122(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.008196721F; + } + + private static float sc123(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.008130081F; + } + + private static float sc124(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.008064516F; + } + + private static float sc125(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.008F; + } + + private static float sc126(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.007936508F; + } + + private static float sc127(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.007874016F; + } + + private static float sc128(float x, float z, float r, NoiseProvider n) { + return (((float) n.noise(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[82])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[82])), z + ((r * MAGIC[82]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[169])), z + ((r * MAGIC[169]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[32])), z + ((r * MAGIC[32]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[127])), z + ((r * MAGIC[127]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[123])), z + ((r * MAGIC[123]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[9])), z + ((r * MAGIC[9]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[72])), z + ((r * MAGIC[72]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[43])), z + ((r * MAGIC[43]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[129])), z + ((r * MAGIC[129]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[4])), z + ((r * MAGIC[4]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[42])), z + ((r * MAGIC[42]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[47])), z + ((r * MAGIC[47]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[31])), z + ((r * MAGIC[31]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[73])), z + ((r * MAGIC[73]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[81])), z + ((r * MAGIC[81]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[95])), z + ((r * MAGIC[95]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[11])), z + ((r * MAGIC[11]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[41])), z + ((r * MAGIC[41]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[15])), z + ((r * MAGIC[15]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[71])), z + ((r * MAGIC[71]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[78])), z + ((r * MAGIC[78]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[34])), z + ((r * MAGIC[34]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[10])), z + ((r * MAGIC[10]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[93])), z + ((r * MAGIC[93]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[155])), z + ((r * MAGIC[155]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[98])), z + ((r * MAGIC[98]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[87])), z + ((r * MAGIC[87]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[83])), z + ((r * MAGIC[83]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3])))) + + ((float) n.noise(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118])))) + + ((float) n.noise(x + ((r * MAGIC[88]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[88])))) + + ((float) n.noise(x + ((r * MAGIC[76]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[76])))) + + ((float) n.noise(x + ((r * MAGIC[172]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[172])))) + + ((float) n.noise(x + ((r * MAGIC[37]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[37])))) + + ((float) n.noise(x + ((r * MAGIC[49]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[49])))) + + ((float) n.noise(x + ((r * MAGIC[52]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[52])))) + + ((float) n.noise(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92])))) + + ((float) n.noise(x + ((r * MAGIC[14]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[14])))) + + ((float) n.noise(x + ((r * MAGIC[35]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[35])))) + + ((float) n.noise(x + ((r * MAGIC[156]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[156])))) + + ((float) n.noise(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23])))) + + ((float) n.noise(x + ((r * MAGIC[86]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[86])))) + + ((float) n.noise(x + ((r * MAGIC[90]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[90])))) + + ((float) n.noise(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6])))) + + ((float) n.noise(x + ((r * MAGIC[116]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[116])))) + + ((float) n.noise(x + ((r * MAGIC[125]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[125])))) + + ((float) n.noise(x + ((r * MAGIC[12]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[12])))) + + ((float) n.noise(x + ((r * MAGIC[94]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[94])))) + + ((float) n.noise(x + ((r * MAGIC[89]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[89])))) + + ((float) n.noise(x + ((r * MAGIC[77]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[77])))) + + ((float) n.noise(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51])))) + + ((float) n.noise(x + ((r * MAGIC[50]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[50])))) + + ((float) n.noise(x + ((r * MAGIC[85]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[85])))) + + ((float) n.noise(x + ((r * MAGIC[38]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[38])))) + + ((float) n.noise(x + ((r * MAGIC[48]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[48])))) + + ((float) n.noise(x + ((r * MAGIC[13]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[13])))) + + ((float) n.noise(x + ((r * MAGIC[171]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[171])))) + + ((float) n.noise(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117])))) + + ((float) n.noise(x + ((r * MAGIC[5]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[5])))) + + ((float) n.noise(x + ((r * MAGIC[91]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[91])))) + + ((float) n.noise(x + ((r * MAGIC[170]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[170])))) + + ((float) n.noise(x + ((r * MAGIC[22]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[22])))) + + ((float) n.noise(x + ((r * MAGIC[124]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[124])))) + + ((float) n.noise(x + ((r * MAGIC[36]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[36])))) + + ((float) n.noise(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40])))) + + ((float) n.noise(x + ((r * MAGIC[131]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[131])))) + + ((float) n.noise(x + ((r * MAGIC[53]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[53])))) + + ((float) n.noise(x + ((r * MAGIC[19]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[19])))) + + ((float) n.noise(x + ((r * MAGIC[66]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[66])))) + + ((float) n.noise(x + ((r * MAGIC[54]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[54])))) + + ((float) n.noise(x + ((r * MAGIC[46]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[46])))) + + ((float) n.noise(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132])))) + + ((float) n.noise(x + ((r * MAGIC[130]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[130])))) + + ((float) n.noise(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))) + + ((float) n.noise(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83])))) + + ((float) n.noise(x + ((r * MAGIC[87]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[87])))) + + ((float) n.noise(x + ((r * MAGIC[98]) - (r * MAGIC[76])), z + ((r * MAGIC[76]) + (r * MAGIC[98])))) + + ((float) n.noise(x + ((r * MAGIC[155]) - (r * MAGIC[172])), z + ((r * MAGIC[172]) + (r * MAGIC[155])))) + + ((float) n.noise(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33])))) + + ((float) n.noise(x + ((r * MAGIC[75]) - (r * MAGIC[49])), z + ((r * MAGIC[49]) + (r * MAGIC[75])))) + + ((float) n.noise(x + ((r * MAGIC[126]) - (r * MAGIC[52])), z + ((r * MAGIC[52]) + (r * MAGIC[126])))) + + ((float) n.noise(x + ((r * MAGIC[93]) - (r * MAGIC[92])), z + ((r * MAGIC[92]) + (r * MAGIC[93])))) + + ((float) n.noise(x + ((r * MAGIC[10]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[10])))) + + ((float) n.noise(x + ((r * MAGIC[34]) - (r * MAGIC[35])), z + ((r * MAGIC[35]) + (r * MAGIC[34])))) + + ((float) n.noise(x + ((r * MAGIC[78]) - (r * MAGIC[156])), z + ((r * MAGIC[156]) + (r * MAGIC[78])))) + + ((float) n.noise(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71])))) + + ((float) n.noise(x + ((r * MAGIC[44]) - (r * MAGIC[86])), z + ((r * MAGIC[86]) + (r * MAGIC[44])))) + + ((float) n.noise(x + ((r * MAGIC[128]) - (r * MAGIC[90])), z + ((r * MAGIC[90]) + (r * MAGIC[128])))) + + ((float) n.noise(x + ((r * MAGIC[15]) - (r * MAGIC[6])), z + ((r * MAGIC[6]) + (r * MAGIC[15])))) + + ((float) n.noise(x + ((r * MAGIC[41]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[41])))) + + ((float) n.noise(x + ((r * MAGIC[107]) - (r * MAGIC[125])), z + ((r * MAGIC[125]) + (r * MAGIC[107])))) + + ((float) n.noise(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11])))) + + ((float) n.noise(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95])))) + + ((float) n.noise(x + ((r * MAGIC[30]) - (r * MAGIC[89])), z + ((r * MAGIC[89]) + (r * MAGIC[30])))) + + ((float) n.noise(x + ((r * MAGIC[74]) - (r * MAGIC[77])), z + ((r * MAGIC[77]) + (r * MAGIC[74])))) + + ((float) n.noise(x + ((r * MAGIC[80]) - (r * MAGIC[51])), z + ((r * MAGIC[51]) + (r * MAGIC[80])))) + + ((float) n.noise(x + ((r * MAGIC[81]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[81])))) + + ((float) n.noise(x + ((r * MAGIC[73]) - (r * MAGIC[85])), z + ((r * MAGIC[85]) + (r * MAGIC[73])))) + + ((float) n.noise(x + ((r * MAGIC[31]) - (r * MAGIC[38])), z + ((r * MAGIC[38]) + (r * MAGIC[31])))) + + ((float) n.noise(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47])))) + + ((float) n.noise(x + ((r * MAGIC[39]) - (r * MAGIC[13])), z + ((r * MAGIC[13]) + (r * MAGIC[39])))) + + ((float) n.noise(x + ((r * MAGIC[108]) - (r * MAGIC[171])), z + ((r * MAGIC[171]) + (r * MAGIC[108])))) + + ((float) n.noise(x + ((r * MAGIC[42]) - (r * MAGIC[117])), z + ((r * MAGIC[117]) + (r * MAGIC[42])))) + + ((float) n.noise(x + ((r * MAGIC[4]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[4])))) + + ((float) n.noise(x + ((r * MAGIC[129]) - (r * MAGIC[91])), z + ((r * MAGIC[91]) + (r * MAGIC[129])))) + + ((float) n.noise(x + ((r * MAGIC[43]) - (r * MAGIC[170])), z + ((r * MAGIC[170]) + (r * MAGIC[43])))) + + ((float) n.noise(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72])))) + + ((float) n.noise(x + ((r * MAGIC[79]) - (r * MAGIC[124])), z + ((r * MAGIC[124]) + (r * MAGIC[79])))) + + ((float) n.noise(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84])))) + + ((float) n.noise(x + ((r * MAGIC[9]) - (r * MAGIC[40])), z + ((r * MAGIC[40]) + (r * MAGIC[9])))) + + ((float) n.noise(x + ((r * MAGIC[123]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[123])))) + + ((float) n.noise(x + ((r * MAGIC[127]) - (r * MAGIC[53])), z + ((r * MAGIC[53]) + (r * MAGIC[127])))) + + ((float) n.noise(x + ((r * MAGIC[18]) - (r * MAGIC[19])), z + ((r * MAGIC[19]) + (r * MAGIC[18])))) + + ((float) n.noise(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32])))) + + ((float) n.noise(x + ((r * MAGIC[55]) - (r * MAGIC[54])), z + ((r * MAGIC[54]) + (r * MAGIC[55])))) + + ((float) n.noise(x + ((r * MAGIC[45]) - (r * MAGIC[46])), z + ((r * MAGIC[46]) + (r * MAGIC[45])))) + + ((float) n.noise(x + ((r * MAGIC[169]) - (r * MAGIC[132])), z + ((r * MAGIC[132]) + (r * MAGIC[169])))) + + ((float) n.noise(x + ((r * MAGIC[82]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[82]))))) * 0.0078125F; + } } \ No newline at end of file diff --git a/src/main/java/com/volmit/iris/util/interpolation/IrisInterpolation.java b/src/main/java/com/volmit/iris/util/interpolation/IrisInterpolation.java index 167467228..41b34a0ea 100644 --- a/src/main/java/com/volmit/iris/util/interpolation/IrisInterpolation.java +++ b/src/main/java/com/volmit/iris/util/interpolation/IrisInterpolation.java @@ -69,19 +69,19 @@ public static double lerpParametric(double a, double b, double f, double v) { } public static double blerp(double a, double b, double c, double d, double tx, double ty, InterpolationType type) { - if(type.equals(InterpolationType.LINEAR)) { + if (type.equals(InterpolationType.LINEAR)) { return blerp(a, b, c, d, tx, ty); } - if(type.equals(InterpolationType.BEZIER)) { + if (type.equals(InterpolationType.BEZIER)) { return blerpBezier(a, b, c, d, tx, ty); } - if(type.equals(InterpolationType.PARAMETRIC_2)) { + if (type.equals(InterpolationType.PARAMETRIC_2)) { return blerpParametric(a, b, c, d, tx, ty, 2); } - if(type.equals(InterpolationType.PARAMETRIC_4)) { + if (type.equals(InterpolationType.PARAMETRIC_4)) { return blerpParametric(a, b, c, d, tx, ty, 4); } @@ -111,22 +111,22 @@ public static double hermiteParametric(double p0, double p1, double p2, double p public static double bihermiteBezier(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias) { //@builder return hermiteBezier( - hermiteBezier(p00, p01, p02, p03, muy, tension, bias), - hermiteBezier(p10, p11, p12, p13, muy, tension, bias), - hermiteBezier(p20, p21, p22, p23, muy, tension, bias), - hermiteBezier(p30, p31, p32, p33, muy, tension, bias), - mux, tension, bias); + hermiteBezier(p00, p01, p02, p03, muy, tension, bias), + hermiteBezier(p10, p11, p12, p13, muy, tension, bias), + hermiteBezier(p20, p21, p22, p23, muy, tension, bias), + hermiteBezier(p30, p31, p32, p33, muy, tension, bias), + mux, tension, bias); //@done } public static double bihermiteParametric(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias, double a) { //@builder return hermiteParametric( - hermiteParametric(p00, p01, p02, p03, muy, tension, bias, a), - hermiteParametric(p10, p11, p12, p13, muy, tension, bias, a), - hermiteParametric(p20, p21, p22, p23, muy, tension, bias, a), - hermiteParametric(p30, p31, p32, p33, muy, tension, bias, a), - mux, tension, bias, a); + hermiteParametric(p00, p01, p02, p03, muy, tension, bias, a), + hermiteParametric(p10, p11, p12, p13, muy, tension, bias, a), + hermiteParametric(p20, p21, p22, p23, muy, tension, bias, a), + hermiteParametric(p30, p31, p32, p33, muy, tension, bias, a), + mux, tension, bias, a); //@done } @@ -171,49 +171,49 @@ public static double cubic(double p0, double p1, double p2, double p3, double mu public static double bicubic(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy) { //@builder return cubic( - cubic(p00, p01, p02, p03, muy), - cubic(p10, p11, p12, p13, muy), - cubic(p20, p21, p22, p23, muy), - cubic(p30, p31, p32, p33, muy), - mux); + cubic(p00, p01, p02, p03, muy), + cubic(p10, p11, p12, p13, muy), + cubic(p20, p21, p22, p23, muy), + cubic(p30, p31, p32, p33, muy), + mux); //@done } public static double bihermite(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias) { //@builder return hermite( - hermite(p00, p01, p02, p03, muy, tension, bias), - hermite(p10, p11, p12, p13, muy, tension, bias), - hermite(p20, p21, p22, p23, muy, tension, bias), - hermite(p30, p31, p32, p33, muy, tension, bias), - mux, tension, bias); + hermite(p00, p01, p02, p03, muy, tension, bias), + hermite(p10, p11, p12, p13, muy, tension, bias), + hermite(p20, p21, p22, p23, muy, tension, bias), + hermite(p30, p31, p32, p33, muy, tension, bias), + mux, tension, bias); //@done } public static double trihermite(double p000, double p001, double p002, double p003, double p010, double p011, double p012, double p013, double p020, double p021, double p022, double p023, double p030, double p031, double p032, double p033, double p100, double p101, double p102, double p103, double p110, double p111, double p112, double p113, double p120, double p121, double p122, double p123, double p130, double p131, double p132, double p133, double p200, double p201, double p202, double p203, double p210, double p211, double p212, double p213, double p220, double p221, double p222, double p223, double p230, double p231, double p232, double p233, double p300, double p301, double p302, double p303, double p310, double p311, double p312, double p313, double p320, double p321, double p322, double p323, double p330, double p331, double p332, double p333, double mux, double muy, double muz, double tension, double bias) { //@builder return hermite( - bihermite(p000, p001, p002, p003, - p010, p011, p012, p013, - p020, p021, p022, p023, - p030, p031, p032, p033, - mux, muy, tension, bias), - bihermite(p100, p101, p102, p103, - p110, p111, p112, p113, - p120, p121, p122, p123, - p130, p131, p132, p133, - mux, muy, tension, bias), - bihermite(p200, p201, p202, p203, - p210, p211, p212, p213, - p220, p221, p222, p223, - p230, p231, p232, p233, - mux, muy, tension, bias), - bihermite(p300, p301, p302, p303, - p310, p311, p312, p313, - p320, p321, p322, p323, - p330, p331, p332, p333, - mux, muy, tension, bias), - muz, tension, bias); + bihermite(p000, p001, p002, p003, + p010, p011, p012, p013, + p020, p021, p022, p023, + p030, p031, p032, p033, + mux, muy, tension, bias), + bihermite(p100, p101, p102, p103, + p110, p111, p112, p113, + p120, p121, p122, p123, + p130, p131, p132, p133, + mux, muy, tension, bias), + bihermite(p200, p201, p202, p203, + p210, p211, p212, p213, + p220, p221, p222, p223, + p230, p231, p232, p233, + mux, muy, tension, bias), + bihermite(p300, p301, p302, p303, + p310, p311, p312, p313, + p320, p321, p322, p323, + p330, p331, p332, p333, + mux, muy, tension, bias), + muz, tension, bias); //@done } @@ -226,27 +226,27 @@ public static double tricubic(double p000, double p012, double p013, double p020, double p021, double p022, double p023, double p030, double p031, double p032, double p033, double p100, double p101, double p102, double p103, double p110, double p111, double p112, double p113, double p120, double p121, double p122, double p123, double p130, double p131, double p132, double p133, double p200, double p201, double p202, double p203, double p210, double p211, double p212, double p213, double p220, double p221, double p222, double p223, double p230, double p231, double p232, double p233, double p300, double p301, double p302, double p303, double p310, double p311, double p312, double p313, double p320, double p321, double p322, double p323, double p330, double p331, double p332, double p333, double mux, double muy, double muz) { //@builder return cubic( - bicubic(p000, p001, p002, p003, - p010, p011, p012, p013, - p020, p021, p022, p023, - p030, p031, p032, p033, - mux, muy), - bicubic(p100, p101, p102, p103, - p110, p111, p112, p113, - p120, p121, p122, p123, - p130, p131, p132, p133, - mux, muy), - bicubic(p200, p201, p202, p203, - p210, p211, p212, p213, - p220, p221, p222, p223, - p230, p231, p232, p233, - mux, muy), - bicubic(p300, p301, p302, p303, - p310, p311, p312, p313, - p320, p321, p322, p323, - p330, p331, p332, p333, - mux, muy), - muz); + bicubic(p000, p001, p002, p003, + p010, p011, p012, p013, + p020, p021, p022, p023, + p030, p031, p032, p033, + mux, muy), + bicubic(p100, p101, p102, p103, + p110, p111, p112, p113, + p120, p121, p122, p123, + p130, p131, p132, p133, + mux, muy), + bicubic(p200, p201, p202, p203, + p210, p211, p212, p213, + p220, p221, p222, p223, + p230, p231, p232, p233, + mux, muy), + bicubic(p300, p301, p302, p303, + p310, p311, p312, p313, + p320, p321, p322, p323, + p330, p331, p332, p333, + mux, muy), + muz); //@done } @@ -265,37 +265,56 @@ public static double trilerp(double v1, double v2, double v3, double v4, double public static double bicubicBezier(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy) { //@builder return cubicBezier( - cubicBezier(p00, p01, p02, p03, muy), - cubicBezier(p10, p11, p12, p13, muy), - cubicBezier(p20, p21, p22, p23, muy), - cubicBezier(p30, p31, p32, p33, muy), - mux); + cubicBezier(p00, p01, p02, p03, muy), + cubicBezier(p10, p11, p12, p13, muy), + cubicBezier(p20, p21, p22, p23, muy), + cubicBezier(p30, p31, p32, p33, muy), + mux); //@done } public static double bicubicParametric(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double a) { //@builder return cubicParametric( - cubicParametric(p00, p01, p02, p03, muy, a), - cubicParametric(p10, p11, p12, p13, muy, a), - cubicParametric(p20, p21, p22, p23, muy, a), - cubicParametric(p30, p31, p32, p33, muy, a), - mux, a); + cubicParametric(p00, p01, p02, p03, muy, a), + cubicParametric(p10, p11, p12, p13, muy, a), + cubicParametric(p20, p21, p22, p23, muy, a), + cubicParametric(p30, p31, p32, p33, muy, a), + mux, a); //@done } - public static int getRadiusFactor(int coord, double radius) - { - if(radius == 2) {return coord >> 1;} - if(radius == 4) {return coord >> 2;} - if(radius == 8) {return coord >> 3;} - if(radius == 16) {return coord >> 4;} - if(radius == 32) {return coord >> 5;} - if(radius == 64) {return coord >> 6;} - if(radius == 128) {return coord >> 7;} - if(radius == 256) {return coord >> 8;} - if(radius == 512) {return coord >> 9;} - if(radius == 1024) {return coord >> 10;} + public static int getRadiusFactor(int coord, double radius) { + if (radius == 2) { + return coord >> 1; + } + if (radius == 4) { + return coord >> 2; + } + if (radius == 8) { + return coord >> 3; + } + if (radius == 16) { + return coord >> 4; + } + if (radius == 32) { + return coord >> 5; + } + if (radius == 64) { + return coord >> 6; + } + if (radius == 128) { + return coord >> 7; + } + if (radius == 256) { + return coord >> 8; + } + if (radius == 512) { + return coord >> 9; + } + if (radius == 1024) { + return coord >> 10; + } return (int) Math.floor(coord / radius); } @@ -311,18 +330,18 @@ public static double getBilinearNoise(int x, int z, double rad, NoiseProvider n) double pz = rangeScale(0, 1, z1, z2, z); //@builder return blerp( - n.noise(x1, z1), - n.noise(x2, z1), - n.noise(x1, z2), - n.noise(x2, z2), - px, pz); + n.noise(x1, z1), + n.noise(x2, z1), + n.noise(x1, z2), + n.noise(x2, z2), + px, pz); //@done } public static void test(String m, Consumer2 f) { PrecisionStopwatch p = PrecisionStopwatch.start(); - for(int i = 0; i < 8192; i++) { + for (int i = 0; i < 8192; i++) { f.accept(i, -i * 234); } @@ -351,12 +370,12 @@ public static String generateOptimizedStarcast(double checks, boolean array) { StringBuilder fb = new StringBuilder(); StringBuilder sb = new StringBuilder(); - if(array) { + if (array) { fb.append("private static final double[] F").append((int) checks).append("A = {"); } sb.append("private static double sc").append((int) checks).append("(int x, int z, double r, NoiseProvider n) {\n return ("); - for(int i = 0; i < 360; i += m) { + for (int i = 0; i < 360; i += m) { double sin = Math.sin(Math.toRadians(i)); double cos = Math.cos(Math.toRadians(i)); String cof = new BigDecimal(cos).toPlainString(); @@ -364,7 +383,7 @@ public static String generateOptimizedStarcast(double checks, boolean array) { String cc = array ? "F" + (int) checks + "A[" + (igx++) + "]" : "F" + (int) checks + "C" + ig; String ss = array ? "F" + (int) checks + "A[" + (igx++) + "]" : "F" + (int) checks + "S" + ig; - if(array) { + if (array) { fb.append(ig > 0 ? (ig % 6 == 0 ? ",\n" : ",") : "").append(cof).append(",").append(sif); } else { fb.append("private static final double ").append(cc).append(" = ").append(cof).append(";\n"); @@ -375,7 +394,7 @@ public static String generateOptimizedStarcast(double checks, boolean array) { ig++; } - if(array) { + if (array) { fb.append("};"); } @@ -385,8 +404,8 @@ public static String generateOptimizedStarcast(double checks, boolean array) { public static double getStarcast3D(int x, int y, int z, double rad, double checks, NoiseProvider3 n) { return (Starcast.starcast(x, z, rad, checks, (xx, zz) -> n.noise(xx, y, zz)) - + Starcast.starcast(x, y, rad, checks, (xx, yy) -> n.noise(xx, yy, z)) - + Starcast.starcast(y, z, rad, checks, (yy, zz) -> n.noise(x, yy, zz))) / 3D; + + Starcast.starcast(x, y, rad, checks, (xx, yy) -> n.noise(xx, yy, z)) + + Starcast.starcast(y, z, rad, checks, (yy, zz) -> n.noise(x, yy, zz))) / 3D; } public static double getBilinearBezierNoise(int x, int z, double rad, NoiseProvider n) { @@ -400,11 +419,11 @@ public static double getBilinearBezierNoise(int x, int z, double rad, NoiseProvi double pz = rangeScale(0, 1, z1, z2, z); //@builder return blerpBezier( - n.noise(x1, z1), - n.noise(x2, z1), - n.noise(x1, z2), - n.noise(x2, z2), - px, pz); + n.noise(x1, z1), + n.noise(x2, z1), + n.noise(x1, z2), + n.noise(x2, z2), + px, pz); //@done } @@ -419,11 +438,11 @@ public static double getBilinearParametricNoise(int x, int z, double rad, NoiseP double pz = rangeScale(0, 1, z1, z2, z); //@builder return blerpParametric( - n.noise(x1, z1), - n.noise(x2, z1), - n.noise(x1, z2), - n.noise(x2, z2), - px, pz, a); + n.noise(x1, z1), + n.noise(x2, z1), + n.noise(x1, z2), + n.noise(x2, z2), + px, pz, a); //@done } @@ -446,15 +465,15 @@ public static double getTrilinear(int x, int y, int z, double radx, double rady, double pz = rangeScale(0, 1, z1, z2, z); //@builder return trilerp( - n.noise(x1, y1, z1), - n.noise(x2, y1, z1), - n.noise(x1, y2, z1), - n.noise(x2, y2, z1), - n.noise(x1, y1, z2), - n.noise(x2, y1, z2), - n.noise(x1, y2, z2), - n.noise(x2, y2, z2), - px, py, pz); + n.noise(x1, y1, z1), + n.noise(x2, y1, z1), + n.noise(x1, y2, z1), + n.noise(x2, y2, z1), + n.noise(x1, y1, z2), + n.noise(x2, y1, z2), + n.noise(x1, y2, z2), + n.noise(x2, y2, z2), + px, py, pz); //@done } @@ -485,71 +504,71 @@ public static double getTricubic(int x, int y, int z, double radx, double rady, //!!!!!!!!!!!!!!!!!! 2 1 3 return tricubic( - n.noise(x0, y0, z0), - n.noise(x0, y1, z0), - n.noise(x0, y2, z0), - n.noise(x0, y3, z0), - n.noise(x1, y0, z0), - n.noise(x1, y1, z0), - n.noise(x1, y2, z0), - n.noise(x1, y3, z0), - n.noise(x2, y0, z0), - n.noise(x2, y1, z0), - n.noise(x2, y2, z0), - n.noise(x2, y3, z0), - n.noise(x3, y0, z0), - n.noise(x3, y1, z0), - n.noise(x3, y2, z0), - n.noise(x3, y3, z0), - n.noise(x0, y0, z1), - n.noise(x0, y1, z1), - n.noise(x0, y2, z1), - n.noise(x0, y3, z1), - n.noise(x1, y0, z1), - n.noise(x1, y1, z1), - n.noise(x1, y2, z1), - n.noise(x1, y3, z1), - n.noise(x2, y0, z1), - n.noise(x2, y1, z1), - n.noise(x2, y2, z1), - n.noise(x2, y3, z1), - n.noise(x3, y0, z1), - n.noise(x3, y1, z1), - n.noise(x3, y2, z1), - n.noise(x3, y3, z1), - n.noise(x0, y0, z2), - n.noise(x0, y1, z2), - n.noise(x0, y2, z2), - n.noise(x0, y3, z2), - n.noise(x1, y0, z2), - n.noise(x1, y1, z2), - n.noise(x1, y2, z2), - n.noise(x1, y3, z2), - n.noise(x2, y0, z2), - n.noise(x2, y1, z2), - n.noise(x2, y2, z2), - n.noise(x2, y3, z2), - n.noise(x3, y0, z2), - n.noise(x3, y1, z2), - n.noise(x3, y2, z2), - n.noise(x3, y3, z2), - n.noise(x0, y0, z3), - n.noise(x0, y1, z3), - n.noise(x0, y2, z3), - n.noise(x0, y3, z3), - n.noise(x1, y0, z3), - n.noise(x1, y1, z3), - n.noise(x1, y2, z3), - n.noise(x1, y3, z3), - n.noise(x2, y0, z3), - n.noise(x2, y1, z3), - n.noise(x2, y2, z3), - n.noise(x2, y3, z3), - n.noise(x3, y0, z3), - n.noise(x3, y1, z3), - n.noise(x3, y2, z3), - n.noise(x3, y3, z3), - px, py, pz); + n.noise(x0, y0, z0), + n.noise(x0, y1, z0), + n.noise(x0, y2, z0), + n.noise(x0, y3, z0), + n.noise(x1, y0, z0), + n.noise(x1, y1, z0), + n.noise(x1, y2, z0), + n.noise(x1, y3, z0), + n.noise(x2, y0, z0), + n.noise(x2, y1, z0), + n.noise(x2, y2, z0), + n.noise(x2, y3, z0), + n.noise(x3, y0, z0), + n.noise(x3, y1, z0), + n.noise(x3, y2, z0), + n.noise(x3, y3, z0), + n.noise(x0, y0, z1), + n.noise(x0, y1, z1), + n.noise(x0, y2, z1), + n.noise(x0, y3, z1), + n.noise(x1, y0, z1), + n.noise(x1, y1, z1), + n.noise(x1, y2, z1), + n.noise(x1, y3, z1), + n.noise(x2, y0, z1), + n.noise(x2, y1, z1), + n.noise(x2, y2, z1), + n.noise(x2, y3, z1), + n.noise(x3, y0, z1), + n.noise(x3, y1, z1), + n.noise(x3, y2, z1), + n.noise(x3, y3, z1), + n.noise(x0, y0, z2), + n.noise(x0, y1, z2), + n.noise(x0, y2, z2), + n.noise(x0, y3, z2), + n.noise(x1, y0, z2), + n.noise(x1, y1, z2), + n.noise(x1, y2, z2), + n.noise(x1, y3, z2), + n.noise(x2, y0, z2), + n.noise(x2, y1, z2), + n.noise(x2, y2, z2), + n.noise(x2, y3, z2), + n.noise(x3, y0, z2), + n.noise(x3, y1, z2), + n.noise(x3, y2, z2), + n.noise(x3, y3, z2), + n.noise(x0, y0, z3), + n.noise(x0, y1, z3), + n.noise(x0, y2, z3), + n.noise(x0, y3, z3), + n.noise(x1, y0, z3), + n.noise(x1, y1, z3), + n.noise(x1, y2, z3), + n.noise(x1, y3, z3), + n.noise(x2, y0, z3), + n.noise(x2, y1, z3), + n.noise(x2, y2, z3), + n.noise(x2, y3, z3), + n.noise(x3, y0, z3), + n.noise(x3, y1, z3), + n.noise(x3, y2, z3), + n.noise(x3, y3, z3), + px, py, pz); //@done } @@ -588,71 +607,71 @@ public static double getTrihermite(int x, int y, int z, double radx, double rady //!!!!!!!!!!!!!!!!!! 2 1 3 return trihermite( - n.noise(x0, y0, z0), - n.noise(x0, y1, z0), - n.noise(x0, y2, z0), - n.noise(x0, y3, z0), - n.noise(x1, y0, z0), - n.noise(x1, y1, z0), - n.noise(x1, y2, z0), - n.noise(x1, y3, z0), - n.noise(x2, y0, z0), - n.noise(x2, y1, z0), - n.noise(x2, y2, z0), - n.noise(x2, y3, z0), - n.noise(x3, y0, z0), - n.noise(x3, y1, z0), - n.noise(x3, y2, z0), - n.noise(x3, y3, z0), - n.noise(x0, y0, z1), - n.noise(x0, y1, z1), - n.noise(x0, y2, z1), - n.noise(x0, y3, z1), - n.noise(x1, y0, z1), - n.noise(x1, y1, z1), - n.noise(x1, y2, z1), - n.noise(x1, y3, z1), - n.noise(x2, y0, z1), - n.noise(x2, y1, z1), - n.noise(x2, y2, z1), - n.noise(x2, y3, z1), - n.noise(x3, y0, z1), - n.noise(x3, y1, z1), - n.noise(x3, y2, z1), - n.noise(x3, y3, z1), - n.noise(x0, y0, z2), - n.noise(x0, y1, z2), - n.noise(x0, y2, z2), - n.noise(x0, y3, z2), - n.noise(x1, y0, z2), - n.noise(x1, y1, z2), - n.noise(x1, y2, z2), - n.noise(x1, y3, z2), - n.noise(x2, y0, z2), - n.noise(x2, y1, z2), - n.noise(x2, y2, z2), - n.noise(x2, y3, z2), - n.noise(x3, y0, z2), - n.noise(x3, y1, z2), - n.noise(x3, y2, z2), - n.noise(x3, y3, z2), - n.noise(x0, y0, z3), - n.noise(x0, y1, z3), - n.noise(x0, y2, z3), - n.noise(x0, y3, z3), - n.noise(x1, y0, z3), - n.noise(x1, y1, z3), - n.noise(x1, y2, z3), - n.noise(x1, y3, z3), - n.noise(x2, y0, z3), - n.noise(x2, y1, z3), - n.noise(x2, y2, z3), - n.noise(x2, y3, z3), - n.noise(x3, y0, z3), - n.noise(x3, y1, z3), - n.noise(x3, y2, z3), - n.noise(x3, y3, z3), - px, py, pz, tension, bias); + n.noise(x0, y0, z0), + n.noise(x0, y1, z0), + n.noise(x0, y2, z0), + n.noise(x0, y3, z0), + n.noise(x1, y0, z0), + n.noise(x1, y1, z0), + n.noise(x1, y2, z0), + n.noise(x1, y3, z0), + n.noise(x2, y0, z0), + n.noise(x2, y1, z0), + n.noise(x2, y2, z0), + n.noise(x2, y3, z0), + n.noise(x3, y0, z0), + n.noise(x3, y1, z0), + n.noise(x3, y2, z0), + n.noise(x3, y3, z0), + n.noise(x0, y0, z1), + n.noise(x0, y1, z1), + n.noise(x0, y2, z1), + n.noise(x0, y3, z1), + n.noise(x1, y0, z1), + n.noise(x1, y1, z1), + n.noise(x1, y2, z1), + n.noise(x1, y3, z1), + n.noise(x2, y0, z1), + n.noise(x2, y1, z1), + n.noise(x2, y2, z1), + n.noise(x2, y3, z1), + n.noise(x3, y0, z1), + n.noise(x3, y1, z1), + n.noise(x3, y2, z1), + n.noise(x3, y3, z1), + n.noise(x0, y0, z2), + n.noise(x0, y1, z2), + n.noise(x0, y2, z2), + n.noise(x0, y3, z2), + n.noise(x1, y0, z2), + n.noise(x1, y1, z2), + n.noise(x1, y2, z2), + n.noise(x1, y3, z2), + n.noise(x2, y0, z2), + n.noise(x2, y1, z2), + n.noise(x2, y2, z2), + n.noise(x2, y3, z2), + n.noise(x3, y0, z2), + n.noise(x3, y1, z2), + n.noise(x3, y2, z2), + n.noise(x3, y3, z2), + n.noise(x0, y0, z3), + n.noise(x0, y1, z3), + n.noise(x0, y2, z3), + n.noise(x0, y3, z3), + n.noise(x1, y0, z3), + n.noise(x1, y1, z3), + n.noise(x1, y2, z3), + n.noise(x1, y3, z3), + n.noise(x2, y0, z3), + n.noise(x2, y1, z3), + n.noise(x2, y2, z3), + n.noise(x2, y3, z3), + n.noise(x3, y0, z3), + n.noise(x3, y1, z3), + n.noise(x3, y2, z3), + n.noise(x3, y3, z3), + px, py, pz, tension, bias); //@done } @@ -667,11 +686,11 @@ public static double getBilinearCenterSineNoise(int x, int z, double rad, NoiseP double pz = rangeScale(0, 1, z1, z2, z); //@builder return blerpSinCenter( - n.noise(x1, z1), - n.noise(x2, z1), - n.noise(x1, z2), - n.noise(x2, z2), - px, pz); + n.noise(x1, z1), + n.noise(x2, z1), + n.noise(x1, z2), + n.noise(x2, z2), + px, pz); //@done } @@ -690,23 +709,23 @@ public static double getBicubicNoise(int x, int z, double rad, NoiseProvider n) double pz = rangeScale(0, 1, z1, z2, z); //@builder return bicubic( - n.noise(x0, z0), - n.noise(x0, z1), - n.noise(x0, z2), - n.noise(x0, z3), - n.noise(x1, z0), - n.noise(x1, z1), - n.noise(x1, z2), - n.noise(x1, z3), - n.noise(x2, z0), - n.noise(x2, z1), - n.noise(x2, z2), - n.noise(x2, z3), - n.noise(x3, z0), - n.noise(x3, z1), - n.noise(x3, z2), - n.noise(x3, z3), - px, pz); + n.noise(x0, z0), + n.noise(x0, z1), + n.noise(x0, z2), + n.noise(x0, z3), + n.noise(x1, z0), + n.noise(x1, z1), + n.noise(x1, z2), + n.noise(x1, z3), + n.noise(x2, z0), + n.noise(x2, z1), + n.noise(x2, z2), + n.noise(x2, z3), + n.noise(x3, z0), + n.noise(x3, z1), + n.noise(x3, z2), + n.noise(x3, z3), + px, pz); //@done } @@ -725,23 +744,23 @@ public static double getBicubicBezierNoise(int x, int z, double rad, NoiseProvid double pz = rangeScale(0, 1, z1, z2, z); //@builder return bicubicBezier( - n.noise(x0, z0), - n.noise(x0, z1), - n.noise(x0, z2), - n.noise(x0, z3), - n.noise(x1, z0), - n.noise(x1, z1), - n.noise(x1, z2), - n.noise(x1, z3), - n.noise(x2, z0), - n.noise(x2, z1), - n.noise(x2, z2), - n.noise(x2, z3), - n.noise(x3, z0), - n.noise(x3, z1), - n.noise(x3, z2), - n.noise(x3, z3), - px, pz); + n.noise(x0, z0), + n.noise(x0, z1), + n.noise(x0, z2), + n.noise(x0, z3), + n.noise(x1, z0), + n.noise(x1, z1), + n.noise(x1, z2), + n.noise(x1, z3), + n.noise(x2, z0), + n.noise(x2, z1), + n.noise(x2, z2), + n.noise(x2, z3), + n.noise(x3, z0), + n.noise(x3, z1), + n.noise(x3, z2), + n.noise(x3, z3), + px, pz); //@done } @@ -760,23 +779,23 @@ public static double getBicubicParametricNoise(int x, int z, double rad, NoisePr double pz = rangeScale(0, 1, z1, z2, z); //@builder return bicubicParametric( - n.noise(x0, z0), - n.noise(x0, z1), - n.noise(x0, z2), - n.noise(x0, z3), - n.noise(x1, z0), - n.noise(x1, z1), - n.noise(x1, z2), - n.noise(x1, z3), - n.noise(x2, z0), - n.noise(x2, z1), - n.noise(x2, z2), - n.noise(x2, z3), - n.noise(x3, z0), - n.noise(x3, z1), - n.noise(x3, z2), - n.noise(x3, z3), - px, pz, a); + n.noise(x0, z0), + n.noise(x0, z1), + n.noise(x0, z2), + n.noise(x0, z3), + n.noise(x1, z0), + n.noise(x1, z1), + n.noise(x1, z2), + n.noise(x1, z3), + n.noise(x2, z0), + n.noise(x2, z1), + n.noise(x2, z2), + n.noise(x2, z3), + n.noise(x3, z0), + n.noise(x3, z1), + n.noise(x3, z2), + n.noise(x3, z3), + px, pz, a); //@done } @@ -807,23 +826,23 @@ public static double getHermiteNoise(int x, int z, double rad, NoiseProvider n, double pz = rangeScale(0, 1, z1, z2, z); //@builder return bihermite( - n.noise(x0, z0), - n.noise(x0, z1), - n.noise(x0, z2), - n.noise(x0, z3), - n.noise(x1, z0), - n.noise(x1, z1), - n.noise(x1, z2), - n.noise(x1, z3), - n.noise(x2, z0), - n.noise(x2, z1), - n.noise(x2, z2), - n.noise(x2, z3), - n.noise(x3, z0), - n.noise(x3, z1), - n.noise(x3, z2), - n.noise(x3, z3), - px, pz, t, b); + n.noise(x0, z0), + n.noise(x0, z1), + n.noise(x0, z2), + n.noise(x0, z3), + n.noise(x1, z0), + n.noise(x1, z1), + n.noise(x1, z2), + n.noise(x1, z3), + n.noise(x2, z0), + n.noise(x2, z1), + n.noise(x2, z2), + n.noise(x2, z3), + n.noise(x3, z0), + n.noise(x3, z1), + n.noise(x3, z2), + n.noise(x3, z3), + px, pz, t, b); //@done } @@ -842,23 +861,23 @@ public static double getHermiteBezierNoise(int x, int z, double rad, NoiseProvid double pz = rangeScale(0, 1, z1, z2, z); //@builder return bihermiteBezier( - n.noise(x0, z0), - n.noise(x0, z1), - n.noise(x0, z2), - n.noise(x0, z3), - n.noise(x1, z0), - n.noise(x1, z1), - n.noise(x1, z2), - n.noise(x1, z3), - n.noise(x2, z0), - n.noise(x2, z1), - n.noise(x2, z2), - n.noise(x2, z3), - n.noise(x3, z0), - n.noise(x3, z1), - n.noise(x3, z2), - n.noise(x3, z3), - px, pz, t, b); + n.noise(x0, z0), + n.noise(x0, z1), + n.noise(x0, z2), + n.noise(x0, z3), + n.noise(x1, z0), + n.noise(x1, z1), + n.noise(x1, z2), + n.noise(x1, z3), + n.noise(x2, z0), + n.noise(x2, z1), + n.noise(x2, z2), + n.noise(x2, z3), + n.noise(x3, z0), + n.noise(x3, z1), + n.noise(x3, z2), + n.noise(x3, z3), + px, pz, t, b); //@done } @@ -877,23 +896,23 @@ public static double getHermiteParametricNoise(int x, int z, double rad, NoisePr double pz = rangeScale(0, 1, z1, z2, z); //@builder return bihermiteParametric( - n.noise(x0, z0), - n.noise(x0, z1), - n.noise(x0, z2), - n.noise(x0, z3), - n.noise(x1, z0), - n.noise(x1, z1), - n.noise(x1, z2), - n.noise(x1, z3), - n.noise(x2, z0), - n.noise(x2, z1), - n.noise(x2, z2), - n.noise(x2, z3), - n.noise(x3, z0), - n.noise(x3, z1), - n.noise(x3, z2), - n.noise(x3, z3), - px, pz, t, b, a); + n.noise(x0, z0), + n.noise(x0, z1), + n.noise(x0, z2), + n.noise(x0, z3), + n.noise(x1, z0), + n.noise(x1, z1), + n.noise(x1, z2), + n.noise(x1, z3), + n.noise(x2, z0), + n.noise(x2, z1), + n.noise(x2, z2), + n.noise(x2, z3), + n.noise(x3, z0), + n.noise(x3, z1), + n.noise(x3, z2), + n.noise(x3, z3), + px, pz, t, b, a); //@done } @@ -903,7 +922,7 @@ public static double getRealRadius(InterpolationMethod method, double h) { AtomicDouble accessZ = new AtomicDouble(); NoiseProvider np = (x1, z1) -> { double d = Math.max(Math.abs(x1), Math.abs(z1)); - if(d > rad.get()) { + if (d > rad.get()) { rad.set(d); } return 0; @@ -913,7 +932,7 @@ public static double getRealRadius(InterpolationMethod method, double h) { } public static double getNoise3D(InterpolationMethod3D method, int x, int y, int z, double radx, double rady, double radz, NoiseProvider3 n) { - return switch(method) { + return switch (method) { case TRILINEAR -> getTrilinear(x, y, z, radx, rady, radz, n); case TRICUBIC -> getTricubic(x, y, z, radx, rady, radz, n); case TRIHERMITE -> getTrihermite(x, y, z, radx, rady, radz, n); @@ -921,10 +940,14 @@ public static double getNoise3D(InterpolationMethod3D method, int x, int y, int case TRISTARCAST_6 -> getStarcast3D(x, y, z, radx, 6D, n); case TRISTARCAST_9 -> getStarcast3D(x, y, z, radx, 9D, n); case TRISTARCAST_12 -> getStarcast3D(x, y, z, radx, 12D, n); - case TRILINEAR_TRISTARCAST_3 -> getStarcast3D(x, y, z, radx, 3D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); - case TRILINEAR_TRISTARCAST_6 -> getStarcast3D(x, y, z, radx, 6D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); - case TRILINEAR_TRISTARCAST_9 -> getStarcast3D(x, y, z, radx, 9D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); - case TRILINEAR_TRISTARCAST_12 -> getStarcast3D(x, y, z, radx, 12D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); + case TRILINEAR_TRISTARCAST_3 -> + getStarcast3D(x, y, z, radx, 3D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); + case TRILINEAR_TRISTARCAST_6 -> + getStarcast3D(x, y, z, radx, 6D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); + case TRILINEAR_TRISTARCAST_9 -> + getStarcast3D(x, y, z, radx, 9D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); + case TRILINEAR_TRISTARCAST_12 -> + getStarcast3D(x, y, z, radx, 12D, (xx, yy, zz) -> getTrilinear((int) xx, (int) yy, (int) zz, radx, rady, radz, n)); case NONE -> n.noise(x, y, z); }; } @@ -936,28 +959,17 @@ public static Hunk getNoise3D(InterpolationMethod3D method, int xo, int /** * Get the interpolated 3D noise within a given cuboid size with offsets * - * @param method - * the interpolation method to use - * @param xo - * the x offset for noise - * @param yo - * the y offset for noise - * @param zo - * the z offset for noise - * @param w - * the width of the result - * @param h - * the height of the result - * @param d - * the depth of the result - * @param radX - * the interpolation radius for the x axis - * @param radY - * the interpolation radius for the y axis - * @param radZ - * the interpolation radius for the z axis - * @param n - * the noise provider + * @param method the interpolation method to use + * @param xo the x offset for noise + * @param yo the y offset for noise + * @param zo the z offset for noise + * @param w the width of the result + * @param h the height of the result + * @param d the depth of the result + * @param radX the interpolation radius for the x axis + * @param radY the interpolation radius for the y axis + * @param radZ the interpolation radius for the z axis + * @param n the noise provider * @return the resulting hunk of noise */ public static Hunk getNoise3D(InterpolationMethod3D method, int xo, int yo, int zo, int w, int h, int d, double radX, double radY, double radZ, NoiseProvider3 n) { @@ -965,15 +977,15 @@ public static Hunk getNoise3D(InterpolationMethod3D method, int xo, int HashMap cache = new HashMap<>(); int i, j, k; - for(i = 0; i < w; i++) { + for (i = 0; i < w; i++) { int fi = i; - for(j = 0; j < h; j++) { + for (j = 0; j < h; j++) { int fj = j; - for(k = 0; k < d; k++) { + for (k = 0; k < d; k++) { int fk = k; hunk.set(i, j, k, cache.computeIfAbsent((k * w * h) + (j * w) + i, (p) - -> getNoise3D(method, fi + xo, fj + yo, fk + zo, - radX, radY, radZ, n))); + -> getNoise3D(method, fi + xo, fj + yo, fk + zo, + radX, radY, radZ, n))); } } } @@ -986,62 +998,63 @@ public static double getNoise3D(InterpolationMethod3D method, int x, int y, int } public static double getNoise(InterpolationMethod method, int x, int z, double h, NoiseProvider n) { - if(method.equals(InterpolationMethod.BILINEAR)) { + if (method.equals(InterpolationMethod.BILINEAR)) { return getBilinearNoise(x, z, h, n); - } else if(method.equals(InterpolationMethod.STARCAST_3)) { + } else if (method.equals(InterpolationMethod.STARCAST_3)) { return Starcast.starcast(x, z, h, 3D, n); - } else if(method.equals(InterpolationMethod.STARCAST_6)) { + } else if (method.equals(InterpolationMethod.STARCAST_6)) { return Starcast.starcast(x, z, h, 6D, n); - } else if(method.equals(InterpolationMethod.STARCAST_9)) { + } else if (method.equals(InterpolationMethod.STARCAST_9)) { return Starcast.starcast(x, z, h, 9D, n); - } else if(method.equals(InterpolationMethod.STARCAST_12)) { + } else if (method.equals(InterpolationMethod.STARCAST_12)) { return Starcast.starcast(x, z, h, 12D, n); - } else if(method.equals(InterpolationMethod.BILINEAR_STARCAST_3)) { + } else if (method.equals(InterpolationMethod.BILINEAR_STARCAST_3)) { return Starcast.starcast(x, z, h, 3D, (xx, zz) -> getBilinearNoise((int) xx, (int) zz, h, n)); - } else if(method.equals(InterpolationMethod.BILINEAR_STARCAST_6)) { + } else if (method.equals(InterpolationMethod.BILINEAR_STARCAST_6)) { return Starcast.starcast(x, z, h, 6D, (xx, zz) -> getBilinearNoise((int) xx, (int) zz, h, n)); - } else if(method.equals(InterpolationMethod.BILINEAR_STARCAST_9)) { + } else if (method.equals(InterpolationMethod.BILINEAR_STARCAST_9)) { return Starcast.starcast(x, z, h, 9D, (xx, zz) -> getBilinearNoise((int) xx, (int) zz, h, n)); - } else if(method.equals(InterpolationMethod.BILINEAR_STARCAST_12)) { + } else if (method.equals(InterpolationMethod.BILINEAR_STARCAST_12)) { return Starcast.starcast(x, z, h, 12D, (xx, zz) -> getBilinearNoise((int) xx, (int) zz, h, n)); - } else if(method.equals(InterpolationMethod.HERMITE_STARCAST_3)) { + } else if (method.equals(InterpolationMethod.HERMITE_STARCAST_3)) { return Starcast.starcast(x, z, h, 3D, (xx, zz) -> getHermiteNoise((int) xx, (int) zz, h, n, 0D, 0D)); - } else if(method.equals(InterpolationMethod.HERMITE_STARCAST_6)) { + } else if (method.equals(InterpolationMethod.HERMITE_STARCAST_6)) { return Starcast.starcast(x, z, h, 6D, (xx, zz) -> getHermiteNoise((int) xx, (int) zz, h, n, 0D, 0D)); - } else if(method.equals(InterpolationMethod.HERMITE_STARCAST_9)) { + } else if (method.equals(InterpolationMethod.HERMITE_STARCAST_9)) { return Starcast.starcast(x, z, h, 9D, (xx, zz) -> getHermiteNoise((int) xx, (int) zz, h, n, 0D, 0D)); - } else if(method.equals(InterpolationMethod.HERMITE_STARCAST_12)) { + } else if (method.equals(InterpolationMethod.HERMITE_STARCAST_12)) { return Starcast.starcast(x, z, h, 12D, (xx, zz) -> getHermiteNoise((int) xx, (int) zz, h, n, 0D, 0D)); - } else if(method.equals(InterpolationMethod.BILINEAR_BEZIER)) { + } else if (method.equals(InterpolationMethod.BILINEAR_BEZIER)) { return getBilinearBezierNoise(x, z, h, n); - } else if(method.equals(InterpolationMethod.BILINEAR_PARAMETRIC_2)) { + } else if (method.equals(InterpolationMethod.BILINEAR_PARAMETRIC_2)) { return getBilinearParametricNoise(x, z, h, n, 2); - } else if(method.equals(InterpolationMethod.BILINEAR_PARAMETRIC_4)) { + } else if (method.equals(InterpolationMethod.BILINEAR_PARAMETRIC_4)) { return getBilinearParametricNoise(x, z, h, n, 4); - } else if(method.equals(InterpolationMethod.BILINEAR_PARAMETRIC_1_5)) { + } else if (method.equals(InterpolationMethod.BILINEAR_PARAMETRIC_1_5)) { return getBilinearParametricNoise(x, z, h, n, 1.5); - } else if(method.equals(InterpolationMethod.BICUBIC)) { + } else if (method.equals(InterpolationMethod.BICUBIC)) { return getBilinearNoise(x, z, h, n); - } else if(method.equals(InterpolationMethod.HERMITE)) { + } else if (method.equals(InterpolationMethod.HERMITE)) { return getHermiteNoise(x, z, h, n); - } else if(method.equals(InterpolationMethod.HERMITE_TENSE)) { + } else if (method.equals(InterpolationMethod.HERMITE_TENSE)) { return getHermiteNoise(x, z, h, n, 0.8D, 0D); - } else if(method.equals(InterpolationMethod.CATMULL_ROM_SPLINE)) { + } else if (method.equals(InterpolationMethod.CATMULL_ROM_SPLINE)) { return getHermiteNoise(x, z, h, n, 1D, 0D); - } else if(method.equals(InterpolationMethod.HERMITE_LOOSE)) { + } else if (method.equals(InterpolationMethod.HERMITE_LOOSE)) { return getHermiteNoise(x, z, h, n, 0D, 0D); - } else if(method.equals(InterpolationMethod.HERMITE_LOOSE_HALF_NEGATIVE_BIAS)) { + } else if (method.equals(InterpolationMethod.HERMITE_LOOSE_HALF_NEGATIVE_BIAS)) { return getHermiteNoise(x, z, h, n, 0D, -0.5D); - } else if(method.equals(InterpolationMethod.HERMITE_LOOSE_HALF_POSITIVE_BIAS)) { + } else if (method.equals(InterpolationMethod.HERMITE_LOOSE_HALF_POSITIVE_BIAS)) { return getHermiteNoise(x, z, h, n, 0D, 0.5D); - } else if(method.equals(InterpolationMethod.HERMITE_LOOSE_FULL_NEGATIVE_BIAS)) { + } else if (method.equals(InterpolationMethod.HERMITE_LOOSE_FULL_NEGATIVE_BIAS)) { return getHermiteNoise(x, z, h, n, 0D, -1D); - } else if(method.equals(InterpolationMethod.HERMITE_LOOSE_FULL_POSITIVE_BIAS)) { + } else if (method.equals(InterpolationMethod.HERMITE_LOOSE_FULL_POSITIVE_BIAS)) { return getHermiteNoise(x, z, h, n, 0D, 1D); } return n.noise(x, z); } + public static double rangeScale(double amin, double amax, double bmin, double bmax, double b) { return amin + ((amax - amin) * ((b - bmin) / (bmax - bmin))); } diff --git a/src/main/java/com/volmit/iris/util/interpolation/Starcast.java b/src/main/java/com/volmit/iris/util/interpolation/Starcast.java index f263a7232..e3061d939 100644 --- a/src/main/java/com/volmit/iris/util/interpolation/Starcast.java +++ b/src/main/java/com/volmit/iris/util/interpolation/Starcast.java @@ -21,27 +21,12 @@ import com.volmit.iris.util.function.NoiseProvider; public class Starcast { - public static double starcast(int x, int z, double r, double checks, boolean optimized, NoiseProvider n) { - return CompiledStarcast.getStarcast((float)x, (float)z, (float)r, (float)checks, n); - } - - public static double starcast(int x, int z, double r, double checks, NoiseProvider n) { - return starcast(x, z, r, checks, true, n); - } - private static final double F3C0 = 1; private static final double F3S0 = 0; private static final double F3C1 = -0.4999999999999997779553950749686919152736663818359375; private static final double F3S1 = 0.86602540378443870761060452423407696187496185302734375; private static final double F3C2 = -0.500000000000000444089209850062616169452667236328125; private static final double F3S2 = -0.86602540378443837454369713668711483478546142578125; - - private static double sc3(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F3C0) - (r * F3S0)), z + ((r * F3S0) + (r * F3C0))) - + n.noise(x + ((r * F3C1) - (r * F3S1)), z + ((r * F3S1) + (r * F3C1))) - + n.noise(x + ((r * F3C2) - (r * F3S2)), z + ((r * F3S2) + (r * F3C2)))) / 3.0D; - } - private static final double F5C0 = 1; private static final double F5S0 = 0; private static final double F5C1 = 0.30901699437494745126286943559534847736358642578125; @@ -52,15 +37,6 @@ private static double sc3(int x, int z, double r, NoiseProvider n) { private static final double F5S3 = -0.58778525229247302608115433031343854963779449462890625; private static final double F5C4 = 0.3090169943749472292182645105640403926372528076171875; private static final double F5S4 = -0.951056516295153642204240895807743072509765625; - - private static double sc5(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F5C0) - (r * F5S0)), z + ((r * F5S0) + (r * F5C0))) - + n.noise(x + ((r * F5C1) - (r * F5S1)), z + ((r * F5S1) + (r * F5C1))) - + n.noise(x + ((r * F5C2) - (r * F5S2)), z + ((r * F5S2) + (r * F5C2))) - + n.noise(x + ((r * F5C3) - (r * F5S3)), z + ((r * F5S3) + (r * F5C3))) - + n.noise(x + ((r * F5C4) - (r * F5S4)), z + ((r * F5S4) + (r * F5C4)))) / 5.0D; - } - private static final double F6C0 = 1; private static final double F6S0 = 0; private static final double F6C1 = 0.50000000000000011102230246251565404236316680908203125; @@ -73,16 +49,6 @@ private static double sc5(int x, int z, double r, NoiseProvider n) { private static final double F6S4 = -0.86602540378443837454369713668711483478546142578125; private static final double F6C5 = 0.50000000000000011102230246251565404236316680908203125; private static final double F6S5 = -0.8660254037844385965883020617184229195117950439453125; - - private static double sc6(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F6C0) - (r * F6S0)), z + ((r * F6S0) + (r * F6C0))) - + n.noise(x + ((r * F6C1) - (r * F6S1)), z + ((r * F6S1) + (r * F6C1))) - + n.noise(x + ((r * F6C2) - (r * F6S2)), z + ((r * F6S2) + (r * F6C2))) - + n.noise(x + ((r * F6C3) - (r * F6S3)), z + ((r * F6S3) + (r * F6C3))) - + n.noise(x + ((r * F6C4) - (r * F6S4)), z + ((r * F6S4) + (r * F6C4))) - + n.noise(x + ((r * F6C5) - (r * F6S5)), z + ((r * F6S5) + (r * F6C5)))) / 6.0D; - } - private static final double F7C0 = 1; private static final double F7S0 = 0; private static final double F7C1 = 0.6293203910498375019955119569203816354274749755859375; @@ -99,18 +65,6 @@ private static double sc6(int x, int z, double r, NoiseProvider n) { private static final double F7S6 = -0.80901699437494756228517189811100251972675323486328125; private static final double F7C7 = 0.99862953475457383323288240717374719679355621337890625; private static final double F7S7 = -0.052335956242944368932423770957029773853719234466552734375; - - private static double sc7(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F7C0) - (r * F7S0)), z + ((r * F7S0) + (r * F7C0))) - + n.noise(x + ((r * F7C1) - (r * F7S1)), z + ((r * F7S1) + (r * F7C1))) - + n.noise(x + ((r * F7C2) - (r * F7S2)), z + ((r * F7S2) + (r * F7C2))) - + n.noise(x + ((r * F7C3) - (r * F7S3)), z + ((r * F7S3) + (r * F7C3))) - + n.noise(x + ((r * F7C4) - (r * F7S4)), z + ((r * F7S4) + (r * F7C4))) - + n.noise(x + ((r * F7C5) - (r * F7S5)), z + ((r * F7S5) + (r * F7C5))) - + n.noise(x + ((r * F7C6) - (r * F7S6)), z + ((r * F7S6) + (r * F7C6))) - + n.noise(x + ((r * F7C7) - (r * F7S7)), z + ((r * F7S7) + (r * F7C7)))) / 7.0D; - } - private static final double F9C0 = 1; private static final double F9S0 = 0; private static final double F9C1 = 0.76604444311897801345168090847437269985675811767578125; @@ -129,19 +83,6 @@ private static double sc7(int x, int z, double r, NoiseProvider n) { private static final double F9S7 = -0.98480775301220813133795672911219298839569091796875; private static final double F9C8 = 0.76604444311897779140707598344306461513042449951171875; private static final double F9S8 = -0.64278760968653958496332734284806065261363983154296875; - - private static double sc9(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F9C0) - (r * F9S0)), z + ((r * F9S0) + (r * F9C0))) - + n.noise(x + ((r * F9C1) - (r * F9S1)), z + ((r * F9S1) + (r * F9C1))) - + n.noise(x + ((r * F9C2) - (r * F9S2)), z + ((r * F9S2) + (r * F9C2))) - + n.noise(x + ((r * F9C3) - (r * F9S3)), z + ((r * F9S3) + (r * F9C3))) - + n.noise(x + ((r * F9C4) - (r * F9S4)), z + ((r * F9S4) + (r * F9C4))) - + n.noise(x + ((r * F9C5) - (r * F9S5)), z + ((r * F9S5) + (r * F9C5))) - + n.noise(x + ((r * F9C6) - (r * F9S6)), z + ((r * F9S6) + (r * F9C6))) - + n.noise(x + ((r * F9C7) - (r * F9S7)), z + ((r * F9S7) + (r * F9C7))) - + n.noise(x + ((r * F9C8) - (r * F9S8)), z + ((r * F9S8) + (r * F9C8)))) / 9.0D; - } - private static final double F12C0 = 1; private static final double F12S0 = 0; private static final double F12C1 = 0.86602540378443870761060452423407696187496185302734375; @@ -166,22 +107,6 @@ private static double sc9(int x, int z, double r, NoiseProvider n) { private static final double F12S10 = -0.8660254037844385965883020617184229195117950439453125; private static final double F12C11 = 0.86602540378443837454369713668711483478546142578125; private static final double F12S11 = -0.500000000000000444089209850062616169452667236328125; - - private static double sc12(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F12C0) - (r * F12S0)), z + ((r * F12S0) + (r * F12C0))) - + n.noise(x + ((r * F12C1) - (r * F12S1)), z + ((r * F12S1) + (r * F12C1))) - + n.noise(x + ((r * F12C2) - (r * F12S2)), z + ((r * F12S2) + (r * F12C2))) - + n.noise(x + ((r * F12C3) - (r * F12S3)), z + ((r * F12S3) + (r * F12C3))) - + n.noise(x + ((r * F12C4) - (r * F12S4)), z + ((r * F12S4) + (r * F12C4))) - + n.noise(x + ((r * F12C5) - (r * F12S5)), z + ((r * F12S5) + (r * F12C5))) - + n.noise(x + ((r * F12C6) - (r * F12S6)), z + ((r * F12S6) + (r * F12C6))) - + n.noise(x + ((r * F12C7) - (r * F12S7)), z + ((r * F12S7) + (r * F12C7))) - + n.noise(x + ((r * F12C8) - (r * F12S8)), z + ((r * F12S8) + (r * F12C8))) - + n.noise(x + ((r * F12C9) - (r * F12S9)), z + ((r * F12S9) + (r * F12C9))) - + n.noise(x + ((r * F12C10) - (r * F12S10)), z + ((r * F12S10) + (r * F12C10))) - + n.noise(x + ((r * F12C11) - (r * F12S11)), z + ((r * F12S11) + (r * F12C11)))) / 12.0D; - } - private static final double F24C0 = 1; private static final double F24S0 = 0; private static final double F24C1 = 0.96592582628906831221371476203785277903079986572265625; @@ -230,34 +155,6 @@ private static double sc12(int x, int z, double r, NoiseProvider n) { private static final double F24S22 = -0.500000000000000444089209850062616169452667236328125; private static final double F24C23 = 0.96592582628906831221371476203785277903079986572265625; private static final double F24S23 = -0.258819045102520683965252601410611532628536224365234375; - - private static double sc24(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F24C0) - (r * F24S0)), z + ((r * F24S0) + (r * F24C0))) - + n.noise(x + ((r * F24C1) - (r * F24S1)), z + ((r * F24S1) + (r * F24C1))) - + n.noise(x + ((r * F24C2) - (r * F24S2)), z + ((r * F24S2) + (r * F24C2))) - + n.noise(x + ((r * F24C3) - (r * F24S3)), z + ((r * F24S3) + (r * F24C3))) - + n.noise(x + ((r * F24C4) - (r * F24S4)), z + ((r * F24S4) + (r * F24C4))) - + n.noise(x + ((r * F24C5) - (r * F24S5)), z + ((r * F24S5) + (r * F24C5))) - + n.noise(x + ((r * F24C6) - (r * F24S6)), z + ((r * F24S6) + (r * F24C6))) - + n.noise(x + ((r * F24C7) - (r * F24S7)), z + ((r * F24S7) + (r * F24C7))) - + n.noise(x + ((r * F24C8) - (r * F24S8)), z + ((r * F24S8) + (r * F24C8))) - + n.noise(x + ((r * F24C9) - (r * F24S9)), z + ((r * F24S9) + (r * F24C9))) - + n.noise(x + ((r * F24C10) - (r * F24S10)), z + ((r * F24S10) + (r * F24C10))) - + n.noise(x + ((r * F24C11) - (r * F24S11)), z + ((r * F24S11) + (r * F24C11))) - + n.noise(x + ((r * F24C12) - (r * F24S12)), z + ((r * F24S12) + (r * F24C12))) - + n.noise(x + ((r * F24C13) - (r * F24S13)), z + ((r * F24S13) + (r * F24C13))) - + n.noise(x + ((r * F24C14) - (r * F24S14)), z + ((r * F24S14) + (r * F24C14))) - + n.noise(x + ((r * F24C15) - (r * F24S15)), z + ((r * F24S15) + (r * F24C15))) - + n.noise(x + ((r * F24C16) - (r * F24S16)), z + ((r * F24S16) + (r * F24C16))) - + n.noise(x + ((r * F24C17) - (r * F24S17)), z + ((r * F24S17) + (r * F24C17))) - + n.noise(x + ((r * F24C18) - (r * F24S18)), z + ((r * F24S18) + (r * F24C18))) - + n.noise(x + ((r * F24C19) - (r * F24S19)), z + ((r * F24S19) + (r * F24C19))) - + n.noise(x + ((r * F24C20) - (r * F24S20)), z + ((r * F24S20) + (r * F24C20))) - + n.noise(x + ((r * F24C21) - (r * F24S21)), z + ((r * F24S21) + (r * F24C21))) - + n.noise(x + ((r * F24C22) - (r * F24S22)), z + ((r * F24S22) + (r * F24C22))) - + n.noise(x + ((r * F24C23) - (r * F24S23)), z + ((r * F24S23) + (r * F24C23)))) / 24.0D; - } - private static final double F32C0 = 1; private static final double F32S0 = 0; private static final double F32C1 = 0.9816271834476639757127713892259635031223297119140625; @@ -324,43 +221,6 @@ private static double sc24(int x, int z, double r, NoiseProvider n) { private static final double F32S31 = -0.3255681544571566998769185374840162694454193115234375; private static final double F32C32 = 0.99026806874157025095684048210387118160724639892578125; private static final double F32S32 = -0.1391731009600658819369556340461713261902332305908203125; - - private static double sc32(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F32C0) - (r * F32S0)), z + ((r * F32S0) + (r * F32C0))) - + n.noise(x + ((r * F32C1) - (r * F32S1)), z + ((r * F32S1) + (r * F32C1))) - + n.noise(x + ((r * F32C2) - (r * F32S2)), z + ((r * F32S2) + (r * F32C2))) - + n.noise(x + ((r * F32C3) - (r * F32S3)), z + ((r * F32S3) + (r * F32C3))) - + n.noise(x + ((r * F32C4) - (r * F32S4)), z + ((r * F32S4) + (r * F32C4))) - + n.noise(x + ((r * F32C5) - (r * F32S5)), z + ((r * F32S5) + (r * F32C5))) - + n.noise(x + ((r * F32C6) - (r * F32S6)), z + ((r * F32S6) + (r * F32C6))) - + n.noise(x + ((r * F32C7) - (r * F32S7)), z + ((r * F32S7) + (r * F32C7))) - + n.noise(x + ((r * F32C8) - (r * F32S8)), z + ((r * F32S8) + (r * F32C8))) - + n.noise(x + ((r * F32C9) - (r * F32S9)), z + ((r * F32S9) + (r * F32C9))) - + n.noise(x + ((r * F32C10) - (r * F32S10)), z + ((r * F32S10) + (r * F32C10))) - + n.noise(x + ((r * F32C11) - (r * F32S11)), z + ((r * F32S11) + (r * F32C11))) - + n.noise(x + ((r * F32C12) - (r * F32S12)), z + ((r * F32S12) + (r * F32C12))) - + n.noise(x + ((r * F32C13) - (r * F32S13)), z + ((r * F32S13) + (r * F32C13))) - + n.noise(x + ((r * F32C14) - (r * F32S14)), z + ((r * F32S14) + (r * F32C14))) - + n.noise(x + ((r * F32C15) - (r * F32S15)), z + ((r * F32S15) + (r * F32C15))) - + n.noise(x + ((r * F32C16) - (r * F32S16)), z + ((r * F32S16) + (r * F32C16))) - + n.noise(x + ((r * F32C17) - (r * F32S17)), z + ((r * F32S17) + (r * F32C17))) - + n.noise(x + ((r * F32C18) - (r * F32S18)), z + ((r * F32S18) + (r * F32C18))) - + n.noise(x + ((r * F32C19) - (r * F32S19)), z + ((r * F32S19) + (r * F32C19))) - + n.noise(x + ((r * F32C20) - (r * F32S20)), z + ((r * F32S20) + (r * F32C20))) - + n.noise(x + ((r * F32C21) - (r * F32S21)), z + ((r * F32S21) + (r * F32C21))) - + n.noise(x + ((r * F32C22) - (r * F32S22)), z + ((r * F32S22) + (r * F32C22))) - + n.noise(x + ((r * F32C23) - (r * F32S23)), z + ((r * F32S23) + (r * F32C23))) - + n.noise(x + ((r * F32C24) - (r * F32S24)), z + ((r * F32S24) + (r * F32C24))) - + n.noise(x + ((r * F32C25) - (r * F32S25)), z + ((r * F32S25) + (r * F32C25))) - + n.noise(x + ((r * F32C26) - (r * F32S26)), z + ((r * F32S26) + (r * F32C26))) - + n.noise(x + ((r * F32C27) - (r * F32S27)), z + ((r * F32S27) + (r * F32C27))) - + n.noise(x + ((r * F32C28) - (r * F32S28)), z + ((r * F32S28) + (r * F32C28))) - + n.noise(x + ((r * F32C29) - (r * F32S29)), z + ((r * F32S29) + (r * F32C29))) - + n.noise(x + ((r * F32C30) - (r * F32S30)), z + ((r * F32S30) + (r * F32C30))) - + n.noise(x + ((r * F32C31) - (r * F32S31)), z + ((r * F32S31) + (r * F32C31))) - + n.noise(x + ((r * F32C32) - (r * F32S32)), z + ((r * F32S32) + (r * F32C32)))) / 32.0D; - } - private static final double F48C0 = 1; private static final double F48S0 = 0; private static final double F48C1 = 0.99254615164132198312785249072476290166378021240234375; @@ -465,62 +325,6 @@ private static double sc32(int x, int z, double r, NoiseProvider n) { private static final double F48S50 = -0.1736481776669303866977855932418606244027614593505859375; private static final double F48C51 = 0.99862953475457383323288240717374719679355621337890625; private static final double F48S51 = -0.052335956242944368932423770957029773853719234466552734375; - - private static double sc48(int x, int z, double r, NoiseProvider n) { - return (n.noise(x + ((r * F48C0) - (r * F48S0)), z + ((r * F48S0) + (r * F48C0))) - + n.noise(x + ((r * F48C1) - (r * F48S1)), z + ((r * F48S1) + (r * F48C1))) - + n.noise(x + ((r * F48C2) - (r * F48S2)), z + ((r * F48S2) + (r * F48C2))) - + n.noise(x + ((r * F48C3) - (r * F48S3)), z + ((r * F48S3) + (r * F48C3))) - + n.noise(x + ((r * F48C4) - (r * F48S4)), z + ((r * F48S4) + (r * F48C4))) - + n.noise(x + ((r * F48C5) - (r * F48S5)), z + ((r * F48S5) + (r * F48C5))) - + n.noise(x + ((r * F48C6) - (r * F48S6)), z + ((r * F48S6) + (r * F48C6))) - + n.noise(x + ((r * F48C7) - (r * F48S7)), z + ((r * F48S7) + (r * F48C7))) - + n.noise(x + ((r * F48C8) - (r * F48S8)), z + ((r * F48S8) + (r * F48C8))) - + n.noise(x + ((r * F48C9) - (r * F48S9)), z + ((r * F48S9) + (r * F48C9))) - + n.noise(x + ((r * F48C10) - (r * F48S10)), z + ((r * F48S10) + (r * F48C10))) - + n.noise(x + ((r * F48C11) - (r * F48S11)), z + ((r * F48S11) + (r * F48C11))) - + n.noise(x + ((r * F48C12) - (r * F48S12)), z + ((r * F48S12) + (r * F48C12))) - + n.noise(x + ((r * F48C13) - (r * F48S13)), z + ((r * F48S13) + (r * F48C13))) - + n.noise(x + ((r * F48C14) - (r * F48S14)), z + ((r * F48S14) + (r * F48C14))) - + n.noise(x + ((r * F48C15) - (r * F48S15)), z + ((r * F48S15) + (r * F48C15))) - + n.noise(x + ((r * F48C16) - (r * F48S16)), z + ((r * F48S16) + (r * F48C16))) - + n.noise(x + ((r * F48C17) - (r * F48S17)), z + ((r * F48S17) + (r * F48C17))) - + n.noise(x + ((r * F48C18) - (r * F48S18)), z + ((r * F48S18) + (r * F48C18))) - + n.noise(x + ((r * F48C19) - (r * F48S19)), z + ((r * F48S19) + (r * F48C19))) - + n.noise(x + ((r * F48C20) - (r * F48S20)), z + ((r * F48S20) + (r * F48C20))) - + n.noise(x + ((r * F48C21) - (r * F48S21)), z + ((r * F48S21) + (r * F48C21))) - + n.noise(x + ((r * F48C22) - (r * F48S22)), z + ((r * F48S22) + (r * F48C22))) - + n.noise(x + ((r * F48C23) - (r * F48S23)), z + ((r * F48S23) + (r * F48C23))) - + n.noise(x + ((r * F48C24) - (r * F48S24)), z + ((r * F48S24) + (r * F48C24))) - + n.noise(x + ((r * F48C25) - (r * F48S25)), z + ((r * F48S25) + (r * F48C25))) - + n.noise(x + ((r * F48C26) - (r * F48S26)), z + ((r * F48S26) + (r * F48C26))) - + n.noise(x + ((r * F48C27) - (r * F48S27)), z + ((r * F48S27) + (r * F48C27))) - + n.noise(x + ((r * F48C28) - (r * F48S28)), z + ((r * F48S28) + (r * F48C28))) - + n.noise(x + ((r * F48C29) - (r * F48S29)), z + ((r * F48S29) + (r * F48C29))) - + n.noise(x + ((r * F48C30) - (r * F48S30)), z + ((r * F48S30) + (r * F48C30))) - + n.noise(x + ((r * F48C31) - (r * F48S31)), z + ((r * F48S31) + (r * F48C31))) - + n.noise(x + ((r * F48C32) - (r * F48S32)), z + ((r * F48S32) + (r * F48C32))) - + n.noise(x + ((r * F48C33) - (r * F48S33)), z + ((r * F48S33) + (r * F48C33))) - + n.noise(x + ((r * F48C34) - (r * F48S34)), z + ((r * F48S34) + (r * F48C34))) - + n.noise(x + ((r * F48C35) - (r * F48S35)), z + ((r * F48S35) + (r * F48C35))) - + n.noise(x + ((r * F48C36) - (r * F48S36)), z + ((r * F48S36) + (r * F48C36))) - + n.noise(x + ((r * F48C37) - (r * F48S37)), z + ((r * F48S37) + (r * F48C37))) - + n.noise(x + ((r * F48C38) - (r * F48S38)), z + ((r * F48S38) + (r * F48C38))) - + n.noise(x + ((r * F48C39) - (r * F48S39)), z + ((r * F48S39) + (r * F48C39))) - + n.noise(x + ((r * F48C40) - (r * F48S40)), z + ((r * F48S40) + (r * F48C40))) - + n.noise(x + ((r * F48C41) - (r * F48S41)), z + ((r * F48S41) + (r * F48C41))) - + n.noise(x + ((r * F48C42) - (r * F48S42)), z + ((r * F48S42) + (r * F48C42))) - + n.noise(x + ((r * F48C43) - (r * F48S43)), z + ((r * F48S43) + (r * F48C43))) - + n.noise(x + ((r * F48C44) - (r * F48S44)), z + ((r * F48S44) + (r * F48C44))) - + n.noise(x + ((r * F48C45) - (r * F48S45)), z + ((r * F48S45) + (r * F48C45))) - + n.noise(x + ((r * F48C46) - (r * F48S46)), z + ((r * F48S46) + (r * F48C46))) - + n.noise(x + ((r * F48C47) - (r * F48S47)), z + ((r * F48S47) + (r * F48C47))) - + n.noise(x + ((r * F48C48) - (r * F48S48)), z + ((r * F48S48) + (r * F48C48))) - + n.noise(x + ((r * F48C49) - (r * F48S49)), z + ((r * F48S49) + (r * F48C49))) - + n.noise(x + ((r * F48C50) - (r * F48S50)), z + ((r * F48S50) + (r * F48C50))) - + n.noise(x + ((r * F48C51) - (r * F48S51)), z + ((r * F48S51) + (r * F48C51)))) / 48.0D; - } - private static final double F64C0 = 1; private static final double F64S0 = 0; private static final double F64C1 = 0.9961946980917455451987052583717741072177886962890625; @@ -666,78 +470,265 @@ private static double sc48(int x, int z, double r, NoiseProvider n) { private static final double F64C71 = 0.9961946980917455451987052583717741072177886962890625; private static final double F64S71 = -0.08715574274765831852551656311334227211773395538330078125; + public static double starcast(int x, int z, double r, double checks, boolean optimized, NoiseProvider n) { + return CompiledStarcast.getStarcast((float) x, (float) z, (float) r, (float) checks, n); + } + + public static double starcast(int x, int z, double r, double checks, NoiseProvider n) { + return starcast(x, z, r, checks, true, n); + } + + private static double sc3(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F3C0) - (r * F3S0)), z + ((r * F3S0) + (r * F3C0))) + + n.noise(x + ((r * F3C1) - (r * F3S1)), z + ((r * F3S1) + (r * F3C1))) + + n.noise(x + ((r * F3C2) - (r * F3S2)), z + ((r * F3S2) + (r * F3C2)))) / 3.0D; + } + + private static double sc5(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F5C0) - (r * F5S0)), z + ((r * F5S0) + (r * F5C0))) + + n.noise(x + ((r * F5C1) - (r * F5S1)), z + ((r * F5S1) + (r * F5C1))) + + n.noise(x + ((r * F5C2) - (r * F5S2)), z + ((r * F5S2) + (r * F5C2))) + + n.noise(x + ((r * F5C3) - (r * F5S3)), z + ((r * F5S3) + (r * F5C3))) + + n.noise(x + ((r * F5C4) - (r * F5S4)), z + ((r * F5S4) + (r * F5C4)))) / 5.0D; + } + + private static double sc6(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F6C0) - (r * F6S0)), z + ((r * F6S0) + (r * F6C0))) + + n.noise(x + ((r * F6C1) - (r * F6S1)), z + ((r * F6S1) + (r * F6C1))) + + n.noise(x + ((r * F6C2) - (r * F6S2)), z + ((r * F6S2) + (r * F6C2))) + + n.noise(x + ((r * F6C3) - (r * F6S3)), z + ((r * F6S3) + (r * F6C3))) + + n.noise(x + ((r * F6C4) - (r * F6S4)), z + ((r * F6S4) + (r * F6C4))) + + n.noise(x + ((r * F6C5) - (r * F6S5)), z + ((r * F6S5) + (r * F6C5)))) / 6.0D; + } + + private static double sc7(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F7C0) - (r * F7S0)), z + ((r * F7S0) + (r * F7C0))) + + n.noise(x + ((r * F7C1) - (r * F7S1)), z + ((r * F7S1) + (r * F7C1))) + + n.noise(x + ((r * F7C2) - (r * F7S2)), z + ((r * F7S2) + (r * F7C2))) + + n.noise(x + ((r * F7C3) - (r * F7S3)), z + ((r * F7S3) + (r * F7C3))) + + n.noise(x + ((r * F7C4) - (r * F7S4)), z + ((r * F7S4) + (r * F7C4))) + + n.noise(x + ((r * F7C5) - (r * F7S5)), z + ((r * F7S5) + (r * F7C5))) + + n.noise(x + ((r * F7C6) - (r * F7S6)), z + ((r * F7S6) + (r * F7C6))) + + n.noise(x + ((r * F7C7) - (r * F7S7)), z + ((r * F7S7) + (r * F7C7)))) / 7.0D; + } + + private static double sc9(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F9C0) - (r * F9S0)), z + ((r * F9S0) + (r * F9C0))) + + n.noise(x + ((r * F9C1) - (r * F9S1)), z + ((r * F9S1) + (r * F9C1))) + + n.noise(x + ((r * F9C2) - (r * F9S2)), z + ((r * F9S2) + (r * F9C2))) + + n.noise(x + ((r * F9C3) - (r * F9S3)), z + ((r * F9S3) + (r * F9C3))) + + n.noise(x + ((r * F9C4) - (r * F9S4)), z + ((r * F9S4) + (r * F9C4))) + + n.noise(x + ((r * F9C5) - (r * F9S5)), z + ((r * F9S5) + (r * F9C5))) + + n.noise(x + ((r * F9C6) - (r * F9S6)), z + ((r * F9S6) + (r * F9C6))) + + n.noise(x + ((r * F9C7) - (r * F9S7)), z + ((r * F9S7) + (r * F9C7))) + + n.noise(x + ((r * F9C8) - (r * F9S8)), z + ((r * F9S8) + (r * F9C8)))) / 9.0D; + } + + private static double sc12(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F12C0) - (r * F12S0)), z + ((r * F12S0) + (r * F12C0))) + + n.noise(x + ((r * F12C1) - (r * F12S1)), z + ((r * F12S1) + (r * F12C1))) + + n.noise(x + ((r * F12C2) - (r * F12S2)), z + ((r * F12S2) + (r * F12C2))) + + n.noise(x + ((r * F12C3) - (r * F12S3)), z + ((r * F12S3) + (r * F12C3))) + + n.noise(x + ((r * F12C4) - (r * F12S4)), z + ((r * F12S4) + (r * F12C4))) + + n.noise(x + ((r * F12C5) - (r * F12S5)), z + ((r * F12S5) + (r * F12C5))) + + n.noise(x + ((r * F12C6) - (r * F12S6)), z + ((r * F12S6) + (r * F12C6))) + + n.noise(x + ((r * F12C7) - (r * F12S7)), z + ((r * F12S7) + (r * F12C7))) + + n.noise(x + ((r * F12C8) - (r * F12S8)), z + ((r * F12S8) + (r * F12C8))) + + n.noise(x + ((r * F12C9) - (r * F12S9)), z + ((r * F12S9) + (r * F12C9))) + + n.noise(x + ((r * F12C10) - (r * F12S10)), z + ((r * F12S10) + (r * F12C10))) + + n.noise(x + ((r * F12C11) - (r * F12S11)), z + ((r * F12S11) + (r * F12C11)))) / 12.0D; + } + + private static double sc24(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F24C0) - (r * F24S0)), z + ((r * F24S0) + (r * F24C0))) + + n.noise(x + ((r * F24C1) - (r * F24S1)), z + ((r * F24S1) + (r * F24C1))) + + n.noise(x + ((r * F24C2) - (r * F24S2)), z + ((r * F24S2) + (r * F24C2))) + + n.noise(x + ((r * F24C3) - (r * F24S3)), z + ((r * F24S3) + (r * F24C3))) + + n.noise(x + ((r * F24C4) - (r * F24S4)), z + ((r * F24S4) + (r * F24C4))) + + n.noise(x + ((r * F24C5) - (r * F24S5)), z + ((r * F24S5) + (r * F24C5))) + + n.noise(x + ((r * F24C6) - (r * F24S6)), z + ((r * F24S6) + (r * F24C6))) + + n.noise(x + ((r * F24C7) - (r * F24S7)), z + ((r * F24S7) + (r * F24C7))) + + n.noise(x + ((r * F24C8) - (r * F24S8)), z + ((r * F24S8) + (r * F24C8))) + + n.noise(x + ((r * F24C9) - (r * F24S9)), z + ((r * F24S9) + (r * F24C9))) + + n.noise(x + ((r * F24C10) - (r * F24S10)), z + ((r * F24S10) + (r * F24C10))) + + n.noise(x + ((r * F24C11) - (r * F24S11)), z + ((r * F24S11) + (r * F24C11))) + + n.noise(x + ((r * F24C12) - (r * F24S12)), z + ((r * F24S12) + (r * F24C12))) + + n.noise(x + ((r * F24C13) - (r * F24S13)), z + ((r * F24S13) + (r * F24C13))) + + n.noise(x + ((r * F24C14) - (r * F24S14)), z + ((r * F24S14) + (r * F24C14))) + + n.noise(x + ((r * F24C15) - (r * F24S15)), z + ((r * F24S15) + (r * F24C15))) + + n.noise(x + ((r * F24C16) - (r * F24S16)), z + ((r * F24S16) + (r * F24C16))) + + n.noise(x + ((r * F24C17) - (r * F24S17)), z + ((r * F24S17) + (r * F24C17))) + + n.noise(x + ((r * F24C18) - (r * F24S18)), z + ((r * F24S18) + (r * F24C18))) + + n.noise(x + ((r * F24C19) - (r * F24S19)), z + ((r * F24S19) + (r * F24C19))) + + n.noise(x + ((r * F24C20) - (r * F24S20)), z + ((r * F24S20) + (r * F24C20))) + + n.noise(x + ((r * F24C21) - (r * F24S21)), z + ((r * F24S21) + (r * F24C21))) + + n.noise(x + ((r * F24C22) - (r * F24S22)), z + ((r * F24S22) + (r * F24C22))) + + n.noise(x + ((r * F24C23) - (r * F24S23)), z + ((r * F24S23) + (r * F24C23)))) / 24.0D; + } + + private static double sc32(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F32C0) - (r * F32S0)), z + ((r * F32S0) + (r * F32C0))) + + n.noise(x + ((r * F32C1) - (r * F32S1)), z + ((r * F32S1) + (r * F32C1))) + + n.noise(x + ((r * F32C2) - (r * F32S2)), z + ((r * F32S2) + (r * F32C2))) + + n.noise(x + ((r * F32C3) - (r * F32S3)), z + ((r * F32S3) + (r * F32C3))) + + n.noise(x + ((r * F32C4) - (r * F32S4)), z + ((r * F32S4) + (r * F32C4))) + + n.noise(x + ((r * F32C5) - (r * F32S5)), z + ((r * F32S5) + (r * F32C5))) + + n.noise(x + ((r * F32C6) - (r * F32S6)), z + ((r * F32S6) + (r * F32C6))) + + n.noise(x + ((r * F32C7) - (r * F32S7)), z + ((r * F32S7) + (r * F32C7))) + + n.noise(x + ((r * F32C8) - (r * F32S8)), z + ((r * F32S8) + (r * F32C8))) + + n.noise(x + ((r * F32C9) - (r * F32S9)), z + ((r * F32S9) + (r * F32C9))) + + n.noise(x + ((r * F32C10) - (r * F32S10)), z + ((r * F32S10) + (r * F32C10))) + + n.noise(x + ((r * F32C11) - (r * F32S11)), z + ((r * F32S11) + (r * F32C11))) + + n.noise(x + ((r * F32C12) - (r * F32S12)), z + ((r * F32S12) + (r * F32C12))) + + n.noise(x + ((r * F32C13) - (r * F32S13)), z + ((r * F32S13) + (r * F32C13))) + + n.noise(x + ((r * F32C14) - (r * F32S14)), z + ((r * F32S14) + (r * F32C14))) + + n.noise(x + ((r * F32C15) - (r * F32S15)), z + ((r * F32S15) + (r * F32C15))) + + n.noise(x + ((r * F32C16) - (r * F32S16)), z + ((r * F32S16) + (r * F32C16))) + + n.noise(x + ((r * F32C17) - (r * F32S17)), z + ((r * F32S17) + (r * F32C17))) + + n.noise(x + ((r * F32C18) - (r * F32S18)), z + ((r * F32S18) + (r * F32C18))) + + n.noise(x + ((r * F32C19) - (r * F32S19)), z + ((r * F32S19) + (r * F32C19))) + + n.noise(x + ((r * F32C20) - (r * F32S20)), z + ((r * F32S20) + (r * F32C20))) + + n.noise(x + ((r * F32C21) - (r * F32S21)), z + ((r * F32S21) + (r * F32C21))) + + n.noise(x + ((r * F32C22) - (r * F32S22)), z + ((r * F32S22) + (r * F32C22))) + + n.noise(x + ((r * F32C23) - (r * F32S23)), z + ((r * F32S23) + (r * F32C23))) + + n.noise(x + ((r * F32C24) - (r * F32S24)), z + ((r * F32S24) + (r * F32C24))) + + n.noise(x + ((r * F32C25) - (r * F32S25)), z + ((r * F32S25) + (r * F32C25))) + + n.noise(x + ((r * F32C26) - (r * F32S26)), z + ((r * F32S26) + (r * F32C26))) + + n.noise(x + ((r * F32C27) - (r * F32S27)), z + ((r * F32S27) + (r * F32C27))) + + n.noise(x + ((r * F32C28) - (r * F32S28)), z + ((r * F32S28) + (r * F32C28))) + + n.noise(x + ((r * F32C29) - (r * F32S29)), z + ((r * F32S29) + (r * F32C29))) + + n.noise(x + ((r * F32C30) - (r * F32S30)), z + ((r * F32S30) + (r * F32C30))) + + n.noise(x + ((r * F32C31) - (r * F32S31)), z + ((r * F32S31) + (r * F32C31))) + + n.noise(x + ((r * F32C32) - (r * F32S32)), z + ((r * F32S32) + (r * F32C32)))) / 32.0D; + } + + private static double sc48(int x, int z, double r, NoiseProvider n) { + return (n.noise(x + ((r * F48C0) - (r * F48S0)), z + ((r * F48S0) + (r * F48C0))) + + n.noise(x + ((r * F48C1) - (r * F48S1)), z + ((r * F48S1) + (r * F48C1))) + + n.noise(x + ((r * F48C2) - (r * F48S2)), z + ((r * F48S2) + (r * F48C2))) + + n.noise(x + ((r * F48C3) - (r * F48S3)), z + ((r * F48S3) + (r * F48C3))) + + n.noise(x + ((r * F48C4) - (r * F48S4)), z + ((r * F48S4) + (r * F48C4))) + + n.noise(x + ((r * F48C5) - (r * F48S5)), z + ((r * F48S5) + (r * F48C5))) + + n.noise(x + ((r * F48C6) - (r * F48S6)), z + ((r * F48S6) + (r * F48C6))) + + n.noise(x + ((r * F48C7) - (r * F48S7)), z + ((r * F48S7) + (r * F48C7))) + + n.noise(x + ((r * F48C8) - (r * F48S8)), z + ((r * F48S8) + (r * F48C8))) + + n.noise(x + ((r * F48C9) - (r * F48S9)), z + ((r * F48S9) + (r * F48C9))) + + n.noise(x + ((r * F48C10) - (r * F48S10)), z + ((r * F48S10) + (r * F48C10))) + + n.noise(x + ((r * F48C11) - (r * F48S11)), z + ((r * F48S11) + (r * F48C11))) + + n.noise(x + ((r * F48C12) - (r * F48S12)), z + ((r * F48S12) + (r * F48C12))) + + n.noise(x + ((r * F48C13) - (r * F48S13)), z + ((r * F48S13) + (r * F48C13))) + + n.noise(x + ((r * F48C14) - (r * F48S14)), z + ((r * F48S14) + (r * F48C14))) + + n.noise(x + ((r * F48C15) - (r * F48S15)), z + ((r * F48S15) + (r * F48C15))) + + n.noise(x + ((r * F48C16) - (r * F48S16)), z + ((r * F48S16) + (r * F48C16))) + + n.noise(x + ((r * F48C17) - (r * F48S17)), z + ((r * F48S17) + (r * F48C17))) + + n.noise(x + ((r * F48C18) - (r * F48S18)), z + ((r * F48S18) + (r * F48C18))) + + n.noise(x + ((r * F48C19) - (r * F48S19)), z + ((r * F48S19) + (r * F48C19))) + + n.noise(x + ((r * F48C20) - (r * F48S20)), z + ((r * F48S20) + (r * F48C20))) + + n.noise(x + ((r * F48C21) - (r * F48S21)), z + ((r * F48S21) + (r * F48C21))) + + n.noise(x + ((r * F48C22) - (r * F48S22)), z + ((r * F48S22) + (r * F48C22))) + + n.noise(x + ((r * F48C23) - (r * F48S23)), z + ((r * F48S23) + (r * F48C23))) + + n.noise(x + ((r * F48C24) - (r * F48S24)), z + ((r * F48S24) + (r * F48C24))) + + n.noise(x + ((r * F48C25) - (r * F48S25)), z + ((r * F48S25) + (r * F48C25))) + + n.noise(x + ((r * F48C26) - (r * F48S26)), z + ((r * F48S26) + (r * F48C26))) + + n.noise(x + ((r * F48C27) - (r * F48S27)), z + ((r * F48S27) + (r * F48C27))) + + n.noise(x + ((r * F48C28) - (r * F48S28)), z + ((r * F48S28) + (r * F48C28))) + + n.noise(x + ((r * F48C29) - (r * F48S29)), z + ((r * F48S29) + (r * F48C29))) + + n.noise(x + ((r * F48C30) - (r * F48S30)), z + ((r * F48S30) + (r * F48C30))) + + n.noise(x + ((r * F48C31) - (r * F48S31)), z + ((r * F48S31) + (r * F48C31))) + + n.noise(x + ((r * F48C32) - (r * F48S32)), z + ((r * F48S32) + (r * F48C32))) + + n.noise(x + ((r * F48C33) - (r * F48S33)), z + ((r * F48S33) + (r * F48C33))) + + n.noise(x + ((r * F48C34) - (r * F48S34)), z + ((r * F48S34) + (r * F48C34))) + + n.noise(x + ((r * F48C35) - (r * F48S35)), z + ((r * F48S35) + (r * F48C35))) + + n.noise(x + ((r * F48C36) - (r * F48S36)), z + ((r * F48S36) + (r * F48C36))) + + n.noise(x + ((r * F48C37) - (r * F48S37)), z + ((r * F48S37) + (r * F48C37))) + + n.noise(x + ((r * F48C38) - (r * F48S38)), z + ((r * F48S38) + (r * F48C38))) + + n.noise(x + ((r * F48C39) - (r * F48S39)), z + ((r * F48S39) + (r * F48C39))) + + n.noise(x + ((r * F48C40) - (r * F48S40)), z + ((r * F48S40) + (r * F48C40))) + + n.noise(x + ((r * F48C41) - (r * F48S41)), z + ((r * F48S41) + (r * F48C41))) + + n.noise(x + ((r * F48C42) - (r * F48S42)), z + ((r * F48S42) + (r * F48C42))) + + n.noise(x + ((r * F48C43) - (r * F48S43)), z + ((r * F48S43) + (r * F48C43))) + + n.noise(x + ((r * F48C44) - (r * F48S44)), z + ((r * F48S44) + (r * F48C44))) + + n.noise(x + ((r * F48C45) - (r * F48S45)), z + ((r * F48S45) + (r * F48C45))) + + n.noise(x + ((r * F48C46) - (r * F48S46)), z + ((r * F48S46) + (r * F48C46))) + + n.noise(x + ((r * F48C47) - (r * F48S47)), z + ((r * F48S47) + (r * F48C47))) + + n.noise(x + ((r * F48C48) - (r * F48S48)), z + ((r * F48S48) + (r * F48C48))) + + n.noise(x + ((r * F48C49) - (r * F48S49)), z + ((r * F48S49) + (r * F48C49))) + + n.noise(x + ((r * F48C50) - (r * F48S50)), z + ((r * F48S50) + (r * F48C50))) + + n.noise(x + ((r * F48C51) - (r * F48S51)), z + ((r * F48S51) + (r * F48C51)))) / 48.0D; + } + private static double sc64(int x, int z, double r, NoiseProvider n) { return (n.noise(x + ((r * F64C0) - (r * F64S0)), z + ((r * F64S0) + (r * F64C0))) - + n.noise(x + ((r * F64C1) - (r * F64S1)), z + ((r * F64S1) + (r * F64C1))) - + n.noise(x + ((r * F64C2) - (r * F64S2)), z + ((r * F64S2) + (r * F64C2))) - + n.noise(x + ((r * F64C3) - (r * F64S3)), z + ((r * F64S3) + (r * F64C3))) - + n.noise(x + ((r * F64C4) - (r * F64S4)), z + ((r * F64S4) + (r * F64C4))) - + n.noise(x + ((r * F64C5) - (r * F64S5)), z + ((r * F64S5) + (r * F64C5))) - + n.noise(x + ((r * F64C6) - (r * F64S6)), z + ((r * F64S6) + (r * F64C6))) - + n.noise(x + ((r * F64C7) - (r * F64S7)), z + ((r * F64S7) + (r * F64C7))) - + n.noise(x + ((r * F64C8) - (r * F64S8)), z + ((r * F64S8) + (r * F64C8))) - + n.noise(x + ((r * F64C9) - (r * F64S9)), z + ((r * F64S9) + (r * F64C9))) - + n.noise(x + ((r * F64C10) - (r * F64S10)), z + ((r * F64S10) + (r * F64C10))) - + n.noise(x + ((r * F64C11) - (r * F64S11)), z + ((r * F64S11) + (r * F64C11))) - + n.noise(x + ((r * F64C12) - (r * F64S12)), z + ((r * F64S12) + (r * F64C12))) - + n.noise(x + ((r * F64C13) - (r * F64S13)), z + ((r * F64S13) + (r * F64C13))) - + n.noise(x + ((r * F64C14) - (r * F64S14)), z + ((r * F64S14) + (r * F64C14))) - + n.noise(x + ((r * F64C15) - (r * F64S15)), z + ((r * F64S15) + (r * F64C15))) - + n.noise(x + ((r * F64C16) - (r * F64S16)), z + ((r * F64S16) + (r * F64C16))) - + n.noise(x + ((r * F64C17) - (r * F64S17)), z + ((r * F64S17) + (r * F64C17))) - + n.noise(x + ((r * F64C18) - (r * F64S18)), z + ((r * F64S18) + (r * F64C18))) - + n.noise(x + ((r * F64C19) - (r * F64S19)), z + ((r * F64S19) + (r * F64C19))) - + n.noise(x + ((r * F64C20) - (r * F64S20)), z + ((r * F64S20) + (r * F64C20))) - + n.noise(x + ((r * F64C21) - (r * F64S21)), z + ((r * F64S21) + (r * F64C21))) - + n.noise(x + ((r * F64C22) - (r * F64S22)), z + ((r * F64S22) + (r * F64C22))) - + n.noise(x + ((r * F64C23) - (r * F64S23)), z + ((r * F64S23) + (r * F64C23))) - + n.noise(x + ((r * F64C24) - (r * F64S24)), z + ((r * F64S24) + (r * F64C24))) - + n.noise(x + ((r * F64C25) - (r * F64S25)), z + ((r * F64S25) + (r * F64C25))) - + n.noise(x + ((r * F64C26) - (r * F64S26)), z + ((r * F64S26) + (r * F64C26))) - + n.noise(x + ((r * F64C27) - (r * F64S27)), z + ((r * F64S27) + (r * F64C27))) - + n.noise(x + ((r * F64C28) - (r * F64S28)), z + ((r * F64S28) + (r * F64C28))) - + n.noise(x + ((r * F64C29) - (r * F64S29)), z + ((r * F64S29) + (r * F64C29))) - + n.noise(x + ((r * F64C30) - (r * F64S30)), z + ((r * F64S30) + (r * F64C30))) - + n.noise(x + ((r * F64C31) - (r * F64S31)), z + ((r * F64S31) + (r * F64C31))) - + n.noise(x + ((r * F64C32) - (r * F64S32)), z + ((r * F64S32) + (r * F64C32))) - + n.noise(x + ((r * F64C33) - (r * F64S33)), z + ((r * F64S33) + (r * F64C33))) - + n.noise(x + ((r * F64C34) - (r * F64S34)), z + ((r * F64S34) + (r * F64C34))) - + n.noise(x + ((r * F64C35) - (r * F64S35)), z + ((r * F64S35) + (r * F64C35))) - + n.noise(x + ((r * F64C36) - (r * F64S36)), z + ((r * F64S36) + (r * F64C36))) - + n.noise(x + ((r * F64C37) - (r * F64S37)), z + ((r * F64S37) + (r * F64C37))) - + n.noise(x + ((r * F64C38) - (r * F64S38)), z + ((r * F64S38) + (r * F64C38))) - + n.noise(x + ((r * F64C39) - (r * F64S39)), z + ((r * F64S39) + (r * F64C39))) - + n.noise(x + ((r * F64C40) - (r * F64S40)), z + ((r * F64S40) + (r * F64C40))) - + n.noise(x + ((r * F64C41) - (r * F64S41)), z + ((r * F64S41) + (r * F64C41))) - + n.noise(x + ((r * F64C42) - (r * F64S42)), z + ((r * F64S42) + (r * F64C42))) - + n.noise(x + ((r * F64C43) - (r * F64S43)), z + ((r * F64S43) + (r * F64C43))) - + n.noise(x + ((r * F64C44) - (r * F64S44)), z + ((r * F64S44) + (r * F64C44))) - + n.noise(x + ((r * F64C45) - (r * F64S45)), z + ((r * F64S45) + (r * F64C45))) - + n.noise(x + ((r * F64C46) - (r * F64S46)), z + ((r * F64S46) + (r * F64C46))) - + n.noise(x + ((r * F64C47) - (r * F64S47)), z + ((r * F64S47) + (r * F64C47))) - + n.noise(x + ((r * F64C48) - (r * F64S48)), z + ((r * F64S48) + (r * F64C48))) - + n.noise(x + ((r * F64C49) - (r * F64S49)), z + ((r * F64S49) + (r * F64C49))) - + n.noise(x + ((r * F64C50) - (r * F64S50)), z + ((r * F64S50) + (r * F64C50))) - + n.noise(x + ((r * F64C51) - (r * F64S51)), z + ((r * F64S51) + (r * F64C51))) - + n.noise(x + ((r * F64C52) - (r * F64S52)), z + ((r * F64S52) + (r * F64C52))) - + n.noise(x + ((r * F64C53) - (r * F64S53)), z + ((r * F64S53) + (r * F64C53))) - + n.noise(x + ((r * F64C54) - (r * F64S54)), z + ((r * F64S54) + (r * F64C54))) - + n.noise(x + ((r * F64C55) - (r * F64S55)), z + ((r * F64S55) + (r * F64C55))) - + n.noise(x + ((r * F64C56) - (r * F64S56)), z + ((r * F64S56) + (r * F64C56))) - + n.noise(x + ((r * F64C57) - (r * F64S57)), z + ((r * F64S57) + (r * F64C57))) - + n.noise(x + ((r * F64C58) - (r * F64S58)), z + ((r * F64S58) + (r * F64C58))) - + n.noise(x + ((r * F64C59) - (r * F64S59)), z + ((r * F64S59) + (r * F64C59))) - + n.noise(x + ((r * F64C60) - (r * F64S60)), z + ((r * F64S60) + (r * F64C60))) - + n.noise(x + ((r * F64C61) - (r * F64S61)), z + ((r * F64S61) + (r * F64C61))) - + n.noise(x + ((r * F64C62) - (r * F64S62)), z + ((r * F64S62) + (r * F64C62))) - + n.noise(x + ((r * F64C63) - (r * F64S63)), z + ((r * F64S63) + (r * F64C63))) - + n.noise(x + ((r * F64C64) - (r * F64S64)), z + ((r * F64S64) + (r * F64C64))) - + n.noise(x + ((r * F64C65) - (r * F64S65)), z + ((r * F64S65) + (r * F64C65))) - + n.noise(x + ((r * F64C66) - (r * F64S66)), z + ((r * F64S66) + (r * F64C66))) - + n.noise(x + ((r * F64C67) - (r * F64S67)), z + ((r * F64S67) + (r * F64C67))) - + n.noise(x + ((r * F64C68) - (r * F64S68)), z + ((r * F64S68) + (r * F64C68))) - + n.noise(x + ((r * F64C69) - (r * F64S69)), z + ((r * F64S69) + (r * F64C69))) - + n.noise(x + ((r * F64C70) - (r * F64S70)), z + ((r * F64S70) + (r * F64C70))) - + n.noise(x + ((r * F64C71) - (r * F64S71)), z + ((r * F64S71) + (r * F64C71)))) / 64.0D; + + n.noise(x + ((r * F64C1) - (r * F64S1)), z + ((r * F64S1) + (r * F64C1))) + + n.noise(x + ((r * F64C2) - (r * F64S2)), z + ((r * F64S2) + (r * F64C2))) + + n.noise(x + ((r * F64C3) - (r * F64S3)), z + ((r * F64S3) + (r * F64C3))) + + n.noise(x + ((r * F64C4) - (r * F64S4)), z + ((r * F64S4) + (r * F64C4))) + + n.noise(x + ((r * F64C5) - (r * F64S5)), z + ((r * F64S5) + (r * F64C5))) + + n.noise(x + ((r * F64C6) - (r * F64S6)), z + ((r * F64S6) + (r * F64C6))) + + n.noise(x + ((r * F64C7) - (r * F64S7)), z + ((r * F64S7) + (r * F64C7))) + + n.noise(x + ((r * F64C8) - (r * F64S8)), z + ((r * F64S8) + (r * F64C8))) + + n.noise(x + ((r * F64C9) - (r * F64S9)), z + ((r * F64S9) + (r * F64C9))) + + n.noise(x + ((r * F64C10) - (r * F64S10)), z + ((r * F64S10) + (r * F64C10))) + + n.noise(x + ((r * F64C11) - (r * F64S11)), z + ((r * F64S11) + (r * F64C11))) + + n.noise(x + ((r * F64C12) - (r * F64S12)), z + ((r * F64S12) + (r * F64C12))) + + n.noise(x + ((r * F64C13) - (r * F64S13)), z + ((r * F64S13) + (r * F64C13))) + + n.noise(x + ((r * F64C14) - (r * F64S14)), z + ((r * F64S14) + (r * F64C14))) + + n.noise(x + ((r * F64C15) - (r * F64S15)), z + ((r * F64S15) + (r * F64C15))) + + n.noise(x + ((r * F64C16) - (r * F64S16)), z + ((r * F64S16) + (r * F64C16))) + + n.noise(x + ((r * F64C17) - (r * F64S17)), z + ((r * F64S17) + (r * F64C17))) + + n.noise(x + ((r * F64C18) - (r * F64S18)), z + ((r * F64S18) + (r * F64C18))) + + n.noise(x + ((r * F64C19) - (r * F64S19)), z + ((r * F64S19) + (r * F64C19))) + + n.noise(x + ((r * F64C20) - (r * F64S20)), z + ((r * F64S20) + (r * F64C20))) + + n.noise(x + ((r * F64C21) - (r * F64S21)), z + ((r * F64S21) + (r * F64C21))) + + n.noise(x + ((r * F64C22) - (r * F64S22)), z + ((r * F64S22) + (r * F64C22))) + + n.noise(x + ((r * F64C23) - (r * F64S23)), z + ((r * F64S23) + (r * F64C23))) + + n.noise(x + ((r * F64C24) - (r * F64S24)), z + ((r * F64S24) + (r * F64C24))) + + n.noise(x + ((r * F64C25) - (r * F64S25)), z + ((r * F64S25) + (r * F64C25))) + + n.noise(x + ((r * F64C26) - (r * F64S26)), z + ((r * F64S26) + (r * F64C26))) + + n.noise(x + ((r * F64C27) - (r * F64S27)), z + ((r * F64S27) + (r * F64C27))) + + n.noise(x + ((r * F64C28) - (r * F64S28)), z + ((r * F64S28) + (r * F64C28))) + + n.noise(x + ((r * F64C29) - (r * F64S29)), z + ((r * F64S29) + (r * F64C29))) + + n.noise(x + ((r * F64C30) - (r * F64S30)), z + ((r * F64S30) + (r * F64C30))) + + n.noise(x + ((r * F64C31) - (r * F64S31)), z + ((r * F64S31) + (r * F64C31))) + + n.noise(x + ((r * F64C32) - (r * F64S32)), z + ((r * F64S32) + (r * F64C32))) + + n.noise(x + ((r * F64C33) - (r * F64S33)), z + ((r * F64S33) + (r * F64C33))) + + n.noise(x + ((r * F64C34) - (r * F64S34)), z + ((r * F64S34) + (r * F64C34))) + + n.noise(x + ((r * F64C35) - (r * F64S35)), z + ((r * F64S35) + (r * F64C35))) + + n.noise(x + ((r * F64C36) - (r * F64S36)), z + ((r * F64S36) + (r * F64C36))) + + n.noise(x + ((r * F64C37) - (r * F64S37)), z + ((r * F64S37) + (r * F64C37))) + + n.noise(x + ((r * F64C38) - (r * F64S38)), z + ((r * F64S38) + (r * F64C38))) + + n.noise(x + ((r * F64C39) - (r * F64S39)), z + ((r * F64S39) + (r * F64C39))) + + n.noise(x + ((r * F64C40) - (r * F64S40)), z + ((r * F64S40) + (r * F64C40))) + + n.noise(x + ((r * F64C41) - (r * F64S41)), z + ((r * F64S41) + (r * F64C41))) + + n.noise(x + ((r * F64C42) - (r * F64S42)), z + ((r * F64S42) + (r * F64C42))) + + n.noise(x + ((r * F64C43) - (r * F64S43)), z + ((r * F64S43) + (r * F64C43))) + + n.noise(x + ((r * F64C44) - (r * F64S44)), z + ((r * F64S44) + (r * F64C44))) + + n.noise(x + ((r * F64C45) - (r * F64S45)), z + ((r * F64S45) + (r * F64C45))) + + n.noise(x + ((r * F64C46) - (r * F64S46)), z + ((r * F64S46) + (r * F64C46))) + + n.noise(x + ((r * F64C47) - (r * F64S47)), z + ((r * F64S47) + (r * F64C47))) + + n.noise(x + ((r * F64C48) - (r * F64S48)), z + ((r * F64S48) + (r * F64C48))) + + n.noise(x + ((r * F64C49) - (r * F64S49)), z + ((r * F64S49) + (r * F64C49))) + + n.noise(x + ((r * F64C50) - (r * F64S50)), z + ((r * F64S50) + (r * F64C50))) + + n.noise(x + ((r * F64C51) - (r * F64S51)), z + ((r * F64S51) + (r * F64C51))) + + n.noise(x + ((r * F64C52) - (r * F64S52)), z + ((r * F64S52) + (r * F64C52))) + + n.noise(x + ((r * F64C53) - (r * F64S53)), z + ((r * F64S53) + (r * F64C53))) + + n.noise(x + ((r * F64C54) - (r * F64S54)), z + ((r * F64S54) + (r * F64C54))) + + n.noise(x + ((r * F64C55) - (r * F64S55)), z + ((r * F64S55) + (r * F64C55))) + + n.noise(x + ((r * F64C56) - (r * F64S56)), z + ((r * F64S56) + (r * F64C56))) + + n.noise(x + ((r * F64C57) - (r * F64S57)), z + ((r * F64S57) + (r * F64C57))) + + n.noise(x + ((r * F64C58) - (r * F64S58)), z + ((r * F64S58) + (r * F64C58))) + + n.noise(x + ((r * F64C59) - (r * F64S59)), z + ((r * F64S59) + (r * F64C59))) + + n.noise(x + ((r * F64C60) - (r * F64S60)), z + ((r * F64S60) + (r * F64C60))) + + n.noise(x + ((r * F64C61) - (r * F64S61)), z + ((r * F64S61) + (r * F64C61))) + + n.noise(x + ((r * F64C62) - (r * F64S62)), z + ((r * F64S62) + (r * F64C62))) + + n.noise(x + ((r * F64C63) - (r * F64S63)), z + ((r * F64S63) + (r * F64C63))) + + n.noise(x + ((r * F64C64) - (r * F64S64)), z + ((r * F64S64) + (r * F64C64))) + + n.noise(x + ((r * F64C65) - (r * F64S65)), z + ((r * F64S65) + (r * F64C65))) + + n.noise(x + ((r * F64C66) - (r * F64S66)), z + ((r * F64S66) + (r * F64C66))) + + n.noise(x + ((r * F64C67) - (r * F64S67)), z + ((r * F64S67) + (r * F64C67))) + + n.noise(x + ((r * F64C68) - (r * F64S68)), z + ((r * F64S68) + (r * F64C68))) + + n.noise(x + ((r * F64C69) - (r * F64S69)), z + ((r * F64S69) + (r * F64C69))) + + n.noise(x + ((r * F64C70) - (r * F64S70)), z + ((r * F64S70) + (r * F64C70))) + + n.noise(x + ((r * F64C71) - (r * F64S71)), z + ((r * F64S71) + (r * F64C71)))) / 64.0D; } } diff --git a/src/main/java/com/volmit/iris/util/inventorygui/RandomColor.java b/src/main/java/com/volmit/iris/util/inventorygui/RandomColor.java index ac32bf375..a143a0aab 100644 --- a/src/main/java/com/volmit/iris/util/inventorygui/RandomColor.java +++ b/src/main/java/com/volmit/iris/util/inventorygui/RandomColor.java @@ -74,12 +74,12 @@ public int randomColor(Color color, SaturationType saturationType, Luminosity lu } public int[] randomColor(int count) { - if(count <= 0) { + if (count <= 0) { throw new IllegalArgumentException("count must be greater than 0"); } int[] colors = new int[count]; - for(int i = 0; i < count; i++) { + for (int i = 0; i < count; i++) { colors[i] = randomColor(); } @@ -96,12 +96,12 @@ public int randomColor(Color color) { } public int[] random(Color color, int count) { - if(count <= 0) { + if (count <= 0) { throw new IllegalArgumentException("count must be greater than 0"); } int[] colors = new int[count]; - for(int i = 0; i < count; i++) { + for (int i = 0; i < count; i++) { colors[i] = randomColor(color); } @@ -118,7 +118,7 @@ private int doPickHue(Range hueRange) { // Instead of storing red as two seperate ranges, // we group them, using negative numbers - if(hue < 0) { + if (hue < 0) { hue = 360 + hue; } @@ -131,7 +131,7 @@ private int pickHue(String name) { } private Range getHueRange(int number) { - if(number < 360 && number > 0) { + if (number < 360 && number > 0) { return new Range(number, number); } @@ -139,7 +139,7 @@ private Range getHueRange(int number) { } private Range getHueRange(String name) { - if(colors.containsKey(name)) { + if (colors.containsKey(name)) { return colors.get(name).getHueRange(); } @@ -156,8 +156,8 @@ private int pickSaturation(Color color, SaturationType saturationType, Luminosit } private int pickSaturation(ColorInfo colorInfo, SaturationType saturationType, Luminosity luminosity) { - if(saturationType != null) { - switch(saturationType) { + if (saturationType != null) { + switch (saturationType) { case RANDOM: return randomWithin(new Range(0, 100)); case MONOCHROME: @@ -171,7 +171,7 @@ private int pickSaturation(ColorInfo colorInfo, SaturationType saturationType, L } } - if(colorInfo == null) { + if (colorInfo == null) { return 0; } @@ -180,8 +180,8 @@ private int pickSaturation(ColorInfo colorInfo, SaturationType saturationType, L int min = saturationRange.start; int max = saturationRange.end; - if(luminosity != null) { - switch(luminosity) { + if (luminosity != null) { + switch (luminosity) { case LIGHT: min = 55; break; @@ -211,10 +211,10 @@ private int pickBrightness(Color color, int saturation, Luminosity luminosity) { private int pickBrightness(ColorInfo colorInfo, int saturation, Luminosity luminosity) { int min = getMinimumBrightness(colorInfo, saturation), - max = 100; + max = 100; - if(luminosity != null) { - switch(luminosity) { + if (luminosity != null) { + switch (luminosity) { case DARK: max = min + 20; @@ -235,26 +235,26 @@ private int pickBrightness(ColorInfo colorInfo, int saturation, Luminosity lumin } private int getMinimumBrightness(ColorInfo colorInfo, int saturation) { - if(colorInfo == null) { + if (colorInfo == null) { return 0; } List lowerBounds = colorInfo.getLowerBounds(); - for(int i = 0; i < lowerBounds.size() - 1; i++) { + for (int i = 0; i < lowerBounds.size() - 1; i++) { int s1 = lowerBounds.get(i).start, - v1 = lowerBounds.get(i).end; + v1 = lowerBounds.get(i).end; - if(i == lowerBounds.size() - 1) { + if (i == lowerBounds.size() - 1) { break; } int s2 = lowerBounds.get(i + 1).start, - v2 = lowerBounds.get(i + 1).end; + v2 = lowerBounds.get(i + 1).end; - if(saturation >= s1 && saturation <= s2) { + if (saturation >= s1 && saturation <= s2) { float m = (v2 - v1) / (float) (s2 - s1), - b = v1 - m * s1; + b = v1 - m * s1; return (int) (m * saturation + b); } @@ -266,13 +266,13 @@ private int getMinimumBrightness(ColorInfo colorInfo, int saturation) { private ColorInfo getColorInfo(int hue) { // Maps red colors to make picking hue easier - if(hue >= 334 && hue <= 360) { + if (hue >= 334 && hue <= 360) { hue -= 360; } - for(String key : colors.keySet()) { + for (String key : colors.keySet()) { ColorInfo colorInfo = colors.get(key); - if(colorInfo.getHueRange() != null && colorInfo.getHueRange().contain(hue)) { + if (colorInfo.getHueRange() != null && colorInfo.getHueRange().contain(hue)) { return colorInfo; } } @@ -298,9 +298,9 @@ private void loadColorBounds() { lowerBounds1.add(new Range(0, 0)); lowerBounds1.add(new Range(100, 0)); defineColor( - Color.MONOCHROME.name(), - new Range(0, 0), - lowerBounds1 + Color.MONOCHROME.name(), + new Range(0, 0), + lowerBounds1 ); List lowerBounds2 = new ArrayList<>(); @@ -314,9 +314,9 @@ private void loadColorBounds() { lowerBounds2.add(new Range(90, 55)); lowerBounds2.add(new Range(100, 50)); defineColor( - Color.RED.name(), - new Range(-26, 18), - lowerBounds2 + Color.RED.name(), + new Range(-26, 18), + lowerBounds2 ); List lowerBounds3 = new ArrayList(); @@ -328,9 +328,9 @@ private void loadColorBounds() { lowerBounds3.add(new Range(70, 70)); lowerBounds3.add(new Range(100, 70)); defineColor( - Color.ORANGE.name(), - new Range(19, 46), - lowerBounds3 + Color.ORANGE.name(), + new Range(19, 46), + lowerBounds3 ); List lowerBounds4 = new ArrayList<>(); @@ -344,9 +344,9 @@ private void loadColorBounds() { lowerBounds4.add(new Range(100, 75)); defineColor( - Color.YELLOW.name(), - new Range(47, 62), - lowerBounds4 + Color.YELLOW.name(), + new Range(47, 62), + lowerBounds4 ); List lowerBounds5 = new ArrayList<>(); @@ -360,9 +360,9 @@ private void loadColorBounds() { lowerBounds5.add(new Range(100, 40)); defineColor( - Color.GREEN.name(), - new Range(63, 178), - lowerBounds5 + Color.GREEN.name(), + new Range(63, 178), + lowerBounds5 ); List lowerBounds6 = new ArrayList<>(); @@ -377,9 +377,9 @@ private void loadColorBounds() { lowerBounds6.add(new Range(100, 35)); defineColor( - Color.BLUE.name(), - new Range(179, 257), - lowerBounds6 + Color.BLUE.name(), + new Range(179, 257), + lowerBounds6 ); List lowerBounds7 = new ArrayList<>(); @@ -394,9 +394,9 @@ private void loadColorBounds() { lowerBounds7.add(new Range(100, 42)); defineColor( - Color.PURPLE.name(), - new Range(258, 282), - lowerBounds7 + Color.PURPLE.name(), + new Range(258, 282), + lowerBounds7 ); List lowerBounds8 = new ArrayList<>(); @@ -409,9 +409,9 @@ private void loadColorBounds() { lowerBounds8.add(new Range(100, 73)); defineColor( - Color.PINK.name(), - new Range(283, 334), - lowerBounds8 + Color.PINK.name(), + new Range(283, 334), + lowerBounds8 ); } diff --git a/src/main/java/com/volmit/iris/util/inventorygui/UIElement.java b/src/main/java/com/volmit/iris/util/inventorygui/UIElement.java index c6c89d2c5..21344d06f 100644 --- a/src/main/java/com/volmit/iris/util/inventorygui/UIElement.java +++ b/src/main/java/com/volmit/iris/util/inventorygui/UIElement.java @@ -137,7 +137,7 @@ public UIElement onOtherDraggedInto(Callback other) { @Override public Element call(ElementEvent event, Element context) { try { - switch(event) { + switch (event) { case DRAG_INTO -> { eDraggedInto.run(context); return this; @@ -163,10 +163,10 @@ public Element call(ElementEvent event, Element context) { return this; } } - } catch(NullPointerException e) { + } catch (NullPointerException e) { Iris.reportError(e); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -211,13 +211,13 @@ public ItemStack computeItemStack() { im.setDisplayName(getName()); im.setLore(getLore().copy()); - if(isEnchanted()) { + if (isEnchanted()) { im.addEnchant(Enchantment.DURABILITY, 1, true); } is.setItemMeta(im); return is; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -238,7 +238,7 @@ public double getProgress() { @Override public short getEffectiveDurability() { - if(getMaterial().getMaterial().getMaxDurability() == 0) { + if (getMaterial().getMaterial().getMaxDurability() == 0) { return 0; } else { int prog = (int) ((double) getMaterial().getMaterial().getMaxDurability() * (1D - getProgress())); diff --git a/src/main/java/com/volmit/iris/util/inventorygui/UIWindow.java b/src/main/java/com/volmit/iris/util/inventorygui/UIWindow.java index be3131902..e1c17ea1c 100644 --- a/src/main/java/com/volmit/iris/util/inventorygui/UIWindow.java +++ b/src/main/java/com/volmit/iris/util/inventorygui/UIWindow.java @@ -63,31 +63,31 @@ public UIWindow(Player viewer) { @EventHandler public void on(InventoryClickEvent e) { - if(!e.getWhoClicked().equals(viewer)) { + if (!e.getWhoClicked().equals(viewer)) { return; } - if(!isVisible()) { + if (!isVisible()) { return; } // 1.14 bukkit api change, removed getTitle() and getName() from Inventory.class - if(!viewer.getOpenInventory().getTitle().equals(title)) { + if (!viewer.getOpenInventory().getTitle().equals(title)) { return; } - if(e.getClickedInventory() == null) { + if (e.getClickedInventory() == null) { return; } - if(!e.getView().getType().equals(getResolution().getType())) { + if (!e.getView().getType().equals(getResolution().getType())) { return; } - if(e.getClickedInventory().getType().equals(getResolution().getType())) { + if (e.getClickedInventory().getType().equals(getResolution().getType())) { Element element = getElement(getLayoutPosition(e.getSlot()), getLayoutRow(e.getSlot())); - switch(e.getAction()) { + switch (e.getAction()) { case CLONE_STACK: case UNKNOWN: case SWAP_WITH_CURSOR: @@ -110,7 +110,7 @@ public void on(InventoryClickEvent e) { break; } - switch(e.getClick()) { + switch (e.getClick()) { case DOUBLE_CLICK: doubleclicked = true; break; @@ -118,21 +118,21 @@ public void on(InventoryClickEvent e) { clickcheck++; - if(clickcheck == 1) { + if (clickcheck == 1) { J.s(() -> { - if(clickcheck == 1) { + if (clickcheck == 1) { clickcheck = 0; - if(element != null) { + if (element != null) { element.call(ElementEvent.LEFT, element); } } }); - } else if(clickcheck == 2) { + } else if (clickcheck == 2) { J.s(() -> { - if(doubleclicked) { + if (doubleclicked) { doubleclicked = false; } else { scroll(1); @@ -144,19 +144,19 @@ public void on(InventoryClickEvent e) { break; case RIGHT: - if(element != null) { + if (element != null) { element.call(ElementEvent.RIGHT, element); } else { scroll(-1); } break; case SHIFT_LEFT: - if(element != null) { + if (element != null) { element.call(ElementEvent.SHIFT_LEFT, element); } break; case SHIFT_RIGHT: - if(element != null) { + if (element != null) { element.call(ElementEvent.SHIFT_RIGHT, element); } break; @@ -180,15 +180,15 @@ public void on(InventoryClickEvent e) { @EventHandler public void on(InventoryCloseEvent e) { - if(!e.getPlayer().equals(viewer)) { + if (!e.getPlayer().equals(viewer)) { return; } - if(!e.getPlayer().getOpenInventory().getTitle().equals(title)) { + if (!e.getPlayer().getOpenInventory().getTitle().equals(title)) { return; } - if(isVisible()) { + if (isVisible()) { close(); callClosed(); } @@ -224,14 +224,14 @@ public boolean isVisible() { @Override public UIWindow setVisible(boolean visible) { - if(isVisible() == visible) { + if (isVisible() == visible) { return this; } - if(visible) { + if (visible) { Bukkit.getPluginManager().registerEvents(this, Iris.instance); - if(getResolution().getType().equals(InventoryType.CHEST)) { + if (getResolution().getType().equals(InventoryType.CHEST)) { inventory = Bukkit.createInventory(null, getViewportHeight() * 9, getTitle()); } else { inventory = Bukkit.createInventory(null, getResolution().getType(), getTitle()); @@ -286,7 +286,7 @@ public int getViewportHeight() { public UIWindow setViewportHeight(int height) { viewportSize = (int) clip(height, 1, getResolution().getMaxHeight()).doubleValue(); - if(isVisible()) { + if (isVisible()) { reopen(); } @@ -302,7 +302,7 @@ public String getTitle() { public UIWindow setTitle(String title) { this.title = title; - if(isVisible()) { + if (isVisible()) { reopen(); } @@ -311,7 +311,7 @@ public UIWindow setTitle(String title) { @Override public UIWindow setElement(int position, int row, Element e) { - if(row > highestRow) { + if (row > highestRow) { highestRow = row; } @@ -373,7 +373,7 @@ public int getPosition(int realPosition) { @Override public Window callClosed() { - if(eClose != null) { + if (eClose != null) { eClose.run(this); } @@ -412,23 +412,23 @@ public Window clearElements() { @Override public Window updateInventory() { - if(isVisible()) { + if (isVisible()) { ItemStack[] is = inventory.getContents(); @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") KSet isf = new KSet<>(); - for(int i = 0; i < is.length; i++) { + for (int i = 0; i < is.length; i++) { ItemStack isc = is[i]; ItemStack isx = computeItemStack(i); int layoutRow = getLayoutRow(i); int layoutPosition = getLayoutPosition(i); - if(isx != null && !hasElement(layoutPosition, layoutRow)) { + if (isx != null && !hasElement(layoutPosition, layoutRow)) { ItemStack gg = isx.clone(); gg.setAmount(gg.getAmount() + 1); isf.add(gg); } - if(((isc == null) != (isx == null)) || isx != null && isc != null && !isc.equals(isx)) { + if (((isc == null) != (isx == null)) || isx != null && isc != null && !isc.equals(isx)) { inventory.setItem(i, isx); } } @@ -443,7 +443,7 @@ public ItemStack computeItemStack(int viewportSlot) { int layoutPosition = getLayoutPosition(viewportSlot); Element e = hasElement(layoutPosition, layoutRow) ? getElement(layoutPosition, layoutRow) : getDecorator().onDecorateBackground(this, layoutPosition, layoutRow); - if(e != null) { + if (e != null) { return e.computeItemStack(); } diff --git a/src/main/java/com/volmit/iris/util/io/FileWatcher.java b/src/main/java/com/volmit/iris/util/io/FileWatcher.java index 91b719c18..8a588d186 100644 --- a/src/main/java/com/volmit/iris/util/io/FileWatcher.java +++ b/src/main/java/com/volmit/iris/util/io/FileWatcher.java @@ -42,7 +42,7 @@ public boolean checkModified() { boolean mod = false; readProperties(); - if(lastModified != m || g != size) { + if (lastModified != m || g != size) { mod = true; } diff --git a/src/main/java/com/volmit/iris/util/io/FolderWatcher.java b/src/main/java/com/volmit/iris/util/io/FolderWatcher.java index 2c0a2f98a..ec1c2708b 100644 --- a/src/main/java/com/volmit/iris/util/io/FolderWatcher.java +++ b/src/main/java/com/volmit/iris/util/io/FolderWatcher.java @@ -34,22 +34,22 @@ public FolderWatcher(File file) { } protected void readProperties() { - if(watchers == null) { + if (watchers == null) { watchers = new KMap<>(); changed = new KList<>(); created = new KList<>(); deleted = new KList<>(); } - if(file.isDirectory()) { - for(File i : file.listFiles()) { - if(!watchers.containsKey(i)) { + if (file.isDirectory()) { + for (File i : file.listFiles()) { + if (!watchers.containsKey(i)) { watchers.put(i, new FolderWatcher(i)); } } - for(File i : watchers.k()) { - if(!i.exists()) { + for (File i : watchers.k()) { + if (!i.exists()) { watchers.remove(i); } } @@ -63,22 +63,22 @@ public boolean checkModified() { created.clear(); deleted.clear(); - if(file.isDirectory()) { + if (file.isDirectory()) { KMap w = watchers.copy(); readProperties(); - for(File i : w.keySet()) { - if(!watchers.containsKey(i)) { + for (File i : w.keySet()) { + if (!watchers.containsKey(i)) { deleted.add(i); } } - for(File i : watchers.keySet()) { - if(!w.containsKey(i)) { + for (File i : watchers.keySet()) { + if (!w.containsKey(i)) { created.add(i); } else { FolderWatcher fw = watchers.get(i); - if(fw.checkModified()) { + if (fw.checkModified()) { changed.add(fw.file); } @@ -95,7 +95,7 @@ public boolean checkModified() { } public boolean checkModifiedFast() { - if(watchers == null || watchers.isEmpty()) { + if (watchers == null || watchers.isEmpty()) { return checkModified(); } @@ -103,10 +103,10 @@ public boolean checkModifiedFast() { created.clear(); deleted.clear(); - if(file.isDirectory()) { - for(File i : watchers.keySet()) { + if (file.isDirectory()) { + for (File i : watchers.keySet()) { FolderWatcher fw = watchers.get(i); - if(fw.checkModifiedFast()) { + if (fw.checkModifiedFast()) { changed.add(fw.file); } diff --git a/src/main/java/com/volmit/iris/util/io/IO.java b/src/main/java/com/volmit/iris/util/io/IO.java index 5f68157fe..aee6dcfbe 100644 --- a/src/main/java/com/volmit/iris/util/io/IO.java +++ b/src/main/java/com/volmit/iris/util/io/IO.java @@ -105,7 +105,7 @@ public static String hash(String b) { try { MessageDigest d = MessageDigest.getInstance("SHA-256"); return bytesToHex(d.digest(b.getBytes(StandardCharsets.UTF_8))); - } catch(NoSuchAlgorithmException e) { + } catch (NoSuchAlgorithmException e) { Iris.reportError(e); e.printStackTrace(); } @@ -120,7 +120,7 @@ public static String hash(File b) { fullTransfer(din, new VoidOutputStream(), 8192); din.close(); return bytesToHex(din.getMessageDigest().digest()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } @@ -130,7 +130,7 @@ public static String hash(File b) { public static String bytesToHex(byte[] bytes) { char[] hexChars = new char[bytes.length * 2]; - for(int j = 0; j < bytes.length; j++) { + for (int j = 0; j < bytes.length; j++) { int v = bytes[j] & 0xFF; hexChars[j * 2] = hexArray[v >>> 4]; hexChars[j * 2 + 1] = hexArray[v & 0x0F]; @@ -146,7 +146,7 @@ public static String print(byte[] bytes) { public static String longsToHex(long[] bytes) { byte[] v = new byte[bytes.length * 8]; - for(int i = 0; i < bytes.length; i++) { + for (int i = 0; i < bytes.length; i++) { v[i * 8] = (byte) (bytes[i] >>> 56); v[(i * 8) + 1] = (byte) (bytes[i] >>> 48); v[(i * 8) + 2] = (byte) (bytes[i] >>> 40); @@ -164,18 +164,15 @@ public static String longsToHex(long[] bytes) { * Transfers the length of the buffer amount of data from the input stream to * the output stream * - * @param in - * the input - * @param out - * the output + * @param in the input + * @param out the output * @return the actual transfered amount - * @throws IOException - * shit happens + * @throws IOException shit happens */ public static int transfer(InputStream in, OutputStream out, byte[] buffer) throws IOException { int r = in.read(buffer); - if(r != -1) { + if (r != -1) { out.write(buffer, 0, r); } @@ -186,17 +183,12 @@ public static int transfer(InputStream in, OutputStream out, byte[] buffer) thro * Transfers the length of the buffer amount of data from the input stream to * the output stream * - * @param in - * the input - * @param out - * the output - * @param targetBuffer - * the buffer and size to use - * @param totalSize - * the total amount to transfer + * @param in the input + * @param out the output + * @param targetBuffer the buffer and size to use + * @param totalSize the total amount to transfer * @return the actual transfered amount - * @throws IOException - * shit happens + * @throws IOException shit happens */ public static long transfer(InputStream in, OutputStream out, int targetBuffer, long totalSize) throws IOException { long total = totalSize; @@ -204,12 +196,12 @@ public static long transfer(InputStream in, OutputStream out, int targetBuffer, byte[] buf = new byte[targetBuffer]; int r = 0; - while((r = in.read(buf, 0, (int) (total < targetBuffer ? total : targetBuffer))) != -1) { + while ((r = in.read(buf, 0, (int) (total < targetBuffer ? total : targetBuffer))) != -1) { total -= r; out.write(buf, 0, r); wrote += r; - if(total <= 0) { + if (total <= 0) { break; } } @@ -228,10 +220,10 @@ public static long fillTransfer(InputStream in, OutputStream out) throws IOExcep } public static void deleteUp(File f) { - if(f.exists()) { + if (f.exists()) { f.delete(); - if(f.getParentFile().list().length == 0) { + if (f.getParentFile().list().length == 0) { deleteUp(f.getParentFile()); } } @@ -241,22 +233,18 @@ public static void deleteUp(File f) { * Fully move data from a finite inputstream to an output stream using a given * buffer size. This does NOT close streams. * - * @param in - * the input stream to read from - * @param out - * the output stream to writeNodeData to - * @param bufferSize - * the target buffer size + * @param in the input stream to read from + * @param out the output stream to writeNodeData to + * @param bufferSize the target buffer size * @return total size transfered - * @throws IOException - * shit happens + * @throws IOException shit happens */ public static long fullTransfer(InputStream in, OutputStream out, int bufferSize) throws IOException { long wrote = 0; byte[] buf = new byte[bufferSize]; int r = 0; - while((r = in.read(buf)) != -1) { + while ((r = in.read(buf)) != -1) { out.write(buf, 0, r); wrote += r; } @@ -267,16 +255,15 @@ public static long fullTransfer(InputStream in, OutputStream out, int bufferSize /** * Recursive delete (deleting folders) * - * @param f - * the file to delete (and subfiles if folder) + * @param f the file to delete (and subfiles if folder) */ public static void delete(File f) { - if(f == null || !f.exists()) { + if (f == null || !f.exists()) { return; } - if(f.isDirectory()) { - for(File i : f.listFiles()) { + if (f.isDirectory()) { + for (File i : f.listFiles()) { delete(i); } } @@ -287,9 +274,9 @@ public static void delete(File f) { public static long size(File file) { long s = 0; - if(file.exists()) { - if(file.isDirectory()) { - for(File i : file.listFiles()) { + if (file.exists()) { + if (file.isDirectory()) { + for (File i : file.listFiles()) { s += size(i); } } else { @@ -303,9 +290,9 @@ public static long size(File file) { public static long count(File file) { long s = 0; - if(file.exists()) { - if(file.isDirectory()) { - for(File i : file.listFiles()) { + if (file.exists()) { + if (file.isDirectory()) { + for (File i : file.listFiles()) { s += count(i); } } else { @@ -321,12 +308,12 @@ public static long transfer(InputStream in, OutputStream out, byte[] buf, int to long wrote = 0; int r = 0; - while((r = in.read(buf, 0, (int) (total < buf.length ? total : buf.length))) != -1) { + while ((r = in.read(buf, 0, (int) (total < buf.length ? total : buf.length))) != -1) { total -= r; out.write(buf, 0, r); wrote += r; - if(total <= 0) { + if (total <= 0) { break; } } @@ -340,22 +327,22 @@ public static void readEntry(File zipfile, String entryname, Consumer entries = file.entries(); - while(entries.hasMoreElements()) { + while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); - if(entryname.equals(entry.getName())) { + if (entryname.equals(entry.getName())) { InputStream in = file.getInputStream(entry); v.accept(in); } } - } catch(Exception ex) { + } catch (Exception ex) { Iris.reportError(ex); x = ex.getCause(); } finally { file.close(); } - if(x != null) { + if (x != null) { throw new IOException("Failed to read zip entry, however it has been closed safely.", x); } } @@ -363,7 +350,7 @@ public static void readEntry(File zipfile, String entryname, ConsumerBufferedInputStream. * - * @param input - * the InputStream to read from + * @param input the InputStream to read from * @return the requested byte array - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs */ public static byte[] toByteArray(InputStream input) throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); @@ -653,13 +616,10 @@ public static byte[] toByteArray(InputStream input) throws IOException { * This method buffers the input internally, so there is no need to use a * BufferedReader. * - * @param input - * the Reader to read from + * @param input the Reader to read from * @return the requested byte array - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs */ public static byte[] toByteArray(Reader input) throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); @@ -677,15 +637,11 @@ public static byte[] toByteArray(Reader input) throws IOException { * This method buffers the input internally, so there is no need to use a * BufferedReader. * - * @param input - * the Reader to read from - * @param encoding - * the encoding to use, null means platform default + * @param input the Reader to read from + * @param encoding the encoding to use, null means platform default * @return the requested byte array - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static byte[] toByteArray(Reader input, String encoding) throws IOException { @@ -703,8 +659,7 @@ public static byte[] toByteArray(Reader input, String encoding) throws IOExcepti *

* This method uses {@link String#String(byte[])}. * - * @param data - * the byte array to writeNodeData, do not modify during output, null ignored - * @param output - * the Writer to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the byte array to writeNodeData, do not modify during output, null ignored + * @param output the Writer to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(byte[] data, Writer output) throws IOException { - if(data != null) { + if (data != null) { output.write(new String(data)); } } @@ -1068,21 +976,16 @@ public static void write(byte[] data, Writer output) throws IOException { *

* This method uses {@link String#String(byte[], String)}. * - * @param data - * the byte array to writeNodeData, do not modify during output, null ignored - * @param output - * the Writer to writeNodeData to - * @param encoding - * the encoding to use, null means platform default - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the byte array to writeNodeData, do not modify during output, null ignored + * @param output the Writer to writeNodeData to + * @param encoding the encoding to use, null means platform default + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(byte[] data, Writer output, String encoding) throws IOException { - if(data != null) { - if(encoding == null) { + if (data != null) { + if (encoding == null) { write(data, output); } else { output.write(new String(data, encoding)); @@ -1094,18 +997,14 @@ public static void write(byte[] data, Writer output, String encoding) throws IOE * Writes chars from a char[] to a Writer using the * default character encoding of the platform. * - * @param data - * the char array to writeNodeData, do not modify during output, null ignored - * @param output - * the Writer to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the char array to writeNodeData, do not modify during output, null ignored + * @param output the Writer to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(char[] data, Writer output) throws IOException { - if(data != null) { + if (data != null) { output.write(data); } } @@ -1116,18 +1015,14 @@ public static void write(char[] data, Writer output) throws IOException { *

* This method uses {@link String#String(char[])} and {@link String#getBytes()}. * - * @param data - * the char array to writeNodeData, do not modify during output, null ignored - * @param output - * the OutputStream to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the char array to writeNodeData, do not modify during output, null ignored + * @param output the OutputStream to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(char[] data, OutputStream output) throws IOException { - if(data != null) { + if (data != null) { output.write(new String(data).getBytes()); } } @@ -1145,21 +1040,16 @@ public static void write(char[] data, OutputStream output) throws IOException { * This method uses {@link String#String(char[])} and * {@link String#getBytes(String)}. * - * @param data - * the char array to writeNodeData, do not modify during output, null ignored - * @param output - * the OutputStream to writeNodeData to - * @param encoding - * the encoding to use, null means platform default - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the char array to writeNodeData, do not modify during output, null ignored + * @param output the OutputStream to writeNodeData to + * @param encoding the encoding to use, null means platform default + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(char[] data, OutputStream output, String encoding) throws IOException { - if(data != null) { - if(encoding == null) { + if (data != null) { + if (encoding == null) { write(data, output); } else { output.write(new String(data).getBytes(encoding)); @@ -1170,18 +1060,14 @@ public static void write(char[] data, OutputStream output, String encoding) thro /** * Writes chars from a String to a Writer. * - * @param data - * the String to writeNodeData, null ignored - * @param output - * the Writer to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the String to writeNodeData, null ignored + * @param output the Writer to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(String data, Writer output) throws IOException { - if(data != null) { + if (data != null) { output.write(data); } } @@ -1193,18 +1079,14 @@ public static void write(String data, Writer output) throws IOException { *

* This method uses {@link String#getBytes()}. * - * @param data - * the String to writeNodeData, null ignored - * @param output - * the OutputStream to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the String to writeNodeData, null ignored + * @param output the OutputStream to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(String data, OutputStream output) throws IOException { - if(data != null) { + if (data != null) { output.write(data.getBytes()); } } @@ -1221,21 +1103,16 @@ public static void write(String data, OutputStream output) throws IOException { *

* This method uses {@link String#getBytes(String)}. * - * @param data - * the String to writeNodeData, null ignored - * @param output - * the OutputStream to writeNodeData to - * @param encoding - * the encoding to use, null means platform default - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the String to writeNodeData, null ignored + * @param output the OutputStream to writeNodeData to + * @param encoding the encoding to use, null means platform default + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(String data, OutputStream output, String encoding) throws IOException { - if(data != null) { - if(encoding == null) { + if (data != null) { + if (encoding == null) { write(data, output); } else { output.write(data.getBytes(encoding)); @@ -1246,18 +1123,14 @@ public static void write(String data, OutputStream output, String encoding) thro /** * Writes chars from a StringBuffer to a Writer. * - * @param data - * the StringBuffer to writeNodeData, null ignored - * @param output - * the Writer to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the StringBuffer to writeNodeData, null ignored + * @param output the Writer to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(StringBuffer data, Writer output) throws IOException { - if(data != null) { + if (data != null) { output.write(data.toString()); } } @@ -1269,18 +1142,14 @@ public static void write(StringBuffer data, Writer output) throws IOException { *

* This method uses {@link String#getBytes()}. * - * @param data - * the StringBuffer to writeNodeData, null ignored - * @param output - * the OutputStream to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the StringBuffer to writeNodeData, null ignored + * @param output the OutputStream to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(StringBuffer data, OutputStream output) throws IOException { - if(data != null) { + if (data != null) { output.write(data.toString().getBytes()); } } @@ -1297,21 +1166,16 @@ public static void write(StringBuffer data, OutputStream output) throws IOExcept *

* This method uses {@link String#getBytes(String)}. * - * @param data - * the StringBuffer to writeNodeData, null ignored - * @param output - * the OutputStream to writeNodeData to - * @param encoding - * the encoding to use, null means platform default - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the StringBuffer to writeNodeData, null ignored + * @param output the OutputStream to writeNodeData to + * @param encoding the encoding to use, null means platform default + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(StringBuffer data, OutputStream output, String encoding) throws IOException { - if(data != null) { - if(encoding == null) { + if (data != null) { + if (encoding == null) { write(data, output); } else { output.write(data.toString().getBytes(encoding)); @@ -1324,28 +1188,23 @@ public static void write(StringBuffer data, OutputStream output, String encoding * OutputStream line by line, using the default character encoding * of the platform and the specified line ending. * - * @param lines - * the lines to writeNodeData, null entries produce blank lines - * @param lineEnding - * the line separator to use, null is system default - * @param output - * the OutputStream to writeNodeData to, not null, not closed - * @throws NullPointerException - * if the output is null - * @throws IOException - * if an I/O error occurs + * @param lines the lines to writeNodeData, null entries produce blank lines + * @param lineEnding the line separator to use, null is system default + * @param output the OutputStream to writeNodeData to, not null, not closed + * @throws NullPointerException if the output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void writeLines(Collection lines, String lineEnding, OutputStream output) throws IOException { - if(lines == null) { + if (lines == null) { return; } - if(lineEnding == null) { + if (lineEnding == null) { lineEnding = LINE_SEPARATOR; } - for(Iterator it = lines.iterator(); it.hasNext(); ) { + for (Iterator it = lines.iterator(); it.hasNext(); ) { Object line = it.next(); - if(line != null) { + if (line != null) { output.write(line.toString().getBytes()); } output.write(lineEnding.getBytes()); @@ -1360,33 +1219,27 @@ public static void writeLines(Collection lines, String lineEnding, Outpu * Character encoding names can be found at * IANA. * - * @param lines - * the lines to writeNodeData, null entries produce blank lines - * @param lineEnding - * the line separator to use, null is system default - * @param output - * the OutputStream to writeNodeData to, not null, not closed - * @param encoding - * the encoding to use, null means platform default - * @throws NullPointerException - * if the output is null - * @throws IOException - * if an I/O error occurs + * @param lines the lines to writeNodeData, null entries produce blank lines + * @param lineEnding the line separator to use, null is system default + * @param output the OutputStream to writeNodeData to, not null, not closed + * @param encoding the encoding to use, null means platform default + * @throws NullPointerException if the output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void writeLines(Collection lines, String lineEnding, OutputStream output, String encoding) throws IOException { - if(encoding == null) { + if (encoding == null) { writeLines(lines, lineEnding, output); } else { - if(lines == null) { + if (lines == null) { return; } - if(lineEnding == null) { + if (lineEnding == null) { lineEnding = LINE_SEPARATOR; } - for(Iterator it = lines.iterator(); it.hasNext(); ) { + for (Iterator it = lines.iterator(); it.hasNext(); ) { Object line = it.next(); - if(line != null) { + if (line != null) { output.write(line.toString().getBytes(encoding)); } output.write(lineEnding.getBytes(encoding)); @@ -1401,28 +1254,23 @@ public static void writeLines(Collection lines, String lineEnding, Outpu * Writes the toString() value of each item in a collection to a * Writer line by line, using the specified line ending. * - * @param lines - * the lines to writeNodeData, null entries produce blank lines - * @param lineEnding - * the line separator to use, null is system default - * @param writer - * the Writer to writeNodeData to, not null, not closed - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @param lines the lines to writeNodeData, null entries produce blank lines + * @param lineEnding the line separator to use, null is system default + * @param writer the Writer to writeNodeData to, not null, not closed + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void writeLines(Collection lines, String lineEnding, Writer writer) throws IOException { - if(lines == null) { + if (lines == null) { return; } - if(lineEnding == null) { + if (lineEnding == null) { lineEnding = LINE_SEPARATOR; } - for(Iterator it = lines.iterator(); it.hasNext(); ) { + for (Iterator it = lines.iterator(); it.hasNext(); ) { Object line = it.next(); - if(line != null) { + if (line != null) { writer.write(line.toString()); } writer.write(lineEnding); @@ -1440,22 +1288,17 @@ public static void writeLines(Collection lines, String lineEnding, Write * returned as an int. For large streams use the * copyLarge(InputStream, OutputStream) method. * - * @param input - * the InputStream to read from - * @param output - * the OutputStream to writeNodeData to + * @param input the InputStream to read from + * @param output the OutputStream to writeNodeData to * @return the number of bytes copied - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs - * @throws ArithmeticException - * if the byte count is too large + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs + * @throws ArithmeticException if the byte count is too large * @since Commons IO 1.1 */ public static int copy(InputStream input, OutputStream output) throws IOException { long count = copyLarge(input, output); - if(count > Integer.MAX_VALUE) { + if (count > Integer.MAX_VALUE) { return -1; } return (int) count; @@ -1468,22 +1311,18 @@ public static int copy(InputStream input, OutputStream output) throws IOExceptio * This method buffers the input internally, so there is no need to use a * BufferedInputStream. * - * @param input - * the InputStream to read from - * @param output - * the OutputStream to writeNodeData to + * @param input the InputStream to read from + * @param output the OutputStream to writeNodeData to * @return the number of bytes copied - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.3 */ public static long copyLarge(InputStream input, OutputStream output) throws IOException { byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; long count = 0; int n = 0; - while(-1 != (n = input.read(buffer))) { + while (-1 != (n = input.read(buffer))) { output.write(buffer, 0, n); count += n; } @@ -1499,14 +1338,10 @@ public static long copyLarge(InputStream input, OutputStream output) throws IOEx *

* This method uses {@link InputStreamReader}. * - * @param input - * the InputStream to read from - * @param output - * the Writer to writeNodeData to - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs + * @param input the InputStream to read from + * @param output the Writer to writeNodeData to + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void copy(InputStream input, Writer output) throws IOException { @@ -1529,20 +1364,15 @@ public static void copy(InputStream input, Writer output) throws IOException { *

* This method uses {@link InputStreamReader}. * - * @param input - * the InputStream to read from - * @param output - * the Writer to writeNodeData to - * @param encoding - * the encoding to use, null means platform default - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs + * @param input the InputStream to read from + * @param output the Writer to writeNodeData to + * @param encoding the encoding to use, null means platform default + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void copy(InputStream input, Writer output, String encoding) throws IOException { - if(encoding == null) { + if (encoding == null) { copy(input, output); } else { InputStreamReader in = new InputStreamReader(input, encoding); @@ -1561,22 +1391,17 @@ public static void copy(InputStream input, Writer output, String encoding) throw * returned as an int. For large streams use the * copyLarge(Reader, Writer) method. * - * @param input - * the Reader to read from - * @param output - * the Writer to writeNodeData to + * @param input the Reader to read from + * @param output the Writer to writeNodeData to * @return the number of characters copied - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs - * @throws ArithmeticException - * if the character count is too large + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs + * @throws ArithmeticException if the character count is too large * @since Commons IO 1.1 */ public static int copy(Reader input, Writer output) throws IOException { long count = copyLarge(input, output); - if(count > Integer.MAX_VALUE) { + if (count > Integer.MAX_VALUE) { return -1; } return (int) count; @@ -1589,22 +1414,18 @@ public static int copy(Reader input, Writer output) throws IOException { * This method buffers the input internally, so there is no need to use a * BufferedReader. * - * @param input - * the Reader to read from - * @param output - * the Writer to writeNodeData to + * @param input the Reader to read from + * @param output the Writer to writeNodeData to * @return the number of characters copied - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.3 */ public static long copyLarge(Reader input, Writer output) throws IOException { char[] buffer = new char[DEFAULT_BUFFER_SIZE]; long count = 0; int n = 0; - while(-1 != (n = input.read(buffer))) { + while (-1 != (n = input.read(buffer))) { output.write(buffer, 0, n); count += n; } @@ -1624,14 +1445,10 @@ public static long copyLarge(Reader input, Writer output) throws IOException { *

* This method uses {@link OutputStreamWriter}. * - * @param input - * the Reader to read from - * @param output - * the OutputStream to writeNodeData to - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs + * @param input the Reader to read from + * @param output the OutputStream to writeNodeData to + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void copy(Reader input, OutputStream output) throws IOException { @@ -1660,20 +1477,15 @@ public static void copy(Reader input, OutputStream output) throws IOException { *

* This method uses {@link OutputStreamWriter}. * - * @param input - * the Reader to read from - * @param output - * the OutputStream to writeNodeData to - * @param encoding - * the encoding to use, null means platform default - * @throws NullPointerException - * if the input or output is null - * @throws IOException - * if an I/O error occurs + * @param input the Reader to read from + * @param output the OutputStream to writeNodeData to + * @param encoding the encoding to use, null means platform default + * @throws NullPointerException if the input or output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void copy(Reader input, OutputStream output, String encoding) throws IOException { - if(encoding == null) { + if (encoding == null) { copy(input, output); } else { OutputStreamWriter out = new OutputStreamWriter(output, encoding); @@ -1689,29 +1501,25 @@ public static void copy(Reader input, OutputStream output, String encoding) thro * This method buffers the input internally using * BufferedInputStream if they are not already buffered. * - * @param input1 - * the first stream - * @param input2 - * the second stream + * @param input1 the first stream + * @param input2 the second stream * @return true if the content of the streams are equal or they both don't * exist, false otherwise - * @throws NullPointerException - * if either input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if either input is null + * @throws IOException if an I/O error occurs */ public static boolean contentEquals(InputStream input1, InputStream input2) throws IOException { - if(!(input1 instanceof BufferedInputStream)) { + if (!(input1 instanceof BufferedInputStream)) { input1 = new BufferedInputStream(input1); } - if(!(input2 instanceof BufferedInputStream)) { + if (!(input2 instanceof BufferedInputStream)) { input2 = new BufferedInputStream(input2); } int ch = input1.read(); - while(-1 != ch) { + while (-1 != ch) { int ch2 = input2.read(); - if(ch != ch2) { + if (ch != ch2) { return false; } ch = input1.read(); @@ -1727,30 +1535,26 @@ public static boolean contentEquals(InputStream input1, InputStream input2) thro * This method buffers the input internally using BufferedReader if * they are not already buffered. * - * @param input1 - * the first reader - * @param input2 - * the second reader + * @param input1 the first reader + * @param input2 the second reader * @return true if the content of the readers are equal or they both don't * exist, false otherwise - * @throws NullPointerException - * if either input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if either input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static boolean contentEquals(Reader input1, Reader input2) throws IOException { - if(!(input1 instanceof BufferedReader)) { + if (!(input1 instanceof BufferedReader)) { input1 = new BufferedReader(input1); } - if(!(input2 instanceof BufferedReader)) { + if (!(input2 instanceof BufferedReader)) { input2 = new BufferedReader(input2); } int ch = input1.read(); - while(-1 != ch) { + while (-1 != ch) { int ch2 = input2.read(); - if(ch != ch2) { + if (ch != ch2) { return false; } ch = input1.read(); diff --git a/src/main/java/com/volmit/iris/util/io/InstanceState.java b/src/main/java/com/volmit/iris/util/io/InstanceState.java index 1695642d2..0b1c0dd48 100644 --- a/src/main/java/com/volmit/iris/util/io/InstanceState.java +++ b/src/main/java/com/volmit/iris/util/io/InstanceState.java @@ -27,7 +27,7 @@ public class InstanceState { public static int getInstanceId() { try { return Integer.parseInt(IO.readAll(instanceFile()).trim()); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } @@ -37,7 +37,7 @@ public static int getInstanceId() { public static void updateInstanceId() { try { IO.writeAll(instanceFile(), RNG.r.imax() + ""); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } } diff --git a/src/main/java/com/volmit/iris/util/io/JarScanner.java b/src/main/java/com/volmit/iris/util/io/JarScanner.java index af04772b9..2d8c86e1b 100644 --- a/src/main/java/com/volmit/iris/util/io/JarScanner.java +++ b/src/main/java/com/volmit/iris/util/io/JarScanner.java @@ -35,8 +35,7 @@ public class JarScanner { /** * Create a scanner * - * @param jar - * the path to the jar + * @param jar the path to the jar */ public JarScanner(File jar, String superPackage) { this.jar = jar; @@ -47,27 +46,26 @@ public JarScanner(File jar, String superPackage) { /** * Scan the jar * - * @throws IOException - * bad things happen + * @throws IOException bad things happen */ public void scan() throws IOException { classes.clear(); FileInputStream fin = new FileInputStream(jar); ZipInputStream zip = new ZipInputStream(fin); - for(ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) { - if(!entry.isDirectory() && entry.getName().endsWith(".class")) { - if(entry.getName().contains("$")) { + for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) { + if (!entry.isDirectory() && entry.getName().endsWith(".class")) { + if (entry.getName().contains("$")) { continue; } String c = entry.getName().replaceAll("/", ".").replace(".class", ""); - if(c.startsWith(superPackage)) { + if (c.startsWith(superPackage)) { try { Class clazz = Class.forName(c); classes.add(clazz); - } catch(ClassNotFoundException e) { + } catch (ClassNotFoundException e) { Iris.reportError(e); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/io/ReactiveFolder.java b/src/main/java/com/volmit/iris/util/io/ReactiveFolder.java index 12e91035c..b05e38760 100644 --- a/src/main/java/com/volmit/iris/util/io/ReactiveFolder.java +++ b/src/main/java/com/volmit/iris/util/io/ReactiveFolder.java @@ -44,10 +44,10 @@ public boolean check() { checkCycle++; boolean modified = false; - if(checkCycle % 3 == 0 ? fw.checkModified() : fw.checkModifiedFast()) { - for(File i : fw.getCreated()) { - if(i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) { - if(i.getPath().contains(".iris")) { + if (checkCycle % 3 == 0 ? fw.checkModified() : fw.checkModifiedFast()) { + for (File i : fw.getCreated()) { + if (i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) { + if (i.getPath().contains(".iris")) { continue; } @@ -56,26 +56,26 @@ public boolean check() { } } - if(!modified) { - for(File i : fw.getChanged()) { - if(i.getPath().contains(".iris")) { + if (!modified) { + for (File i : fw.getChanged()) { + if (i.getPath().contains(".iris")) { continue; } - if(i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) { + if (i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) { modified = true; break; } } } - if(!modified) { - for(File i : fw.getDeleted()) { - if(i.getPath().contains(".iris")) { + if (!modified) { + for (File i : fw.getDeleted()) { + if (i.getPath().contains(".iris")) { continue; } - if(i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) { + if (i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) { modified = true; break; } @@ -83,7 +83,7 @@ public boolean check() { } } - if(modified) { + if (modified) { hotload.accept(fw.getCreated(), fw.getChanged(), fw.getDeleted()); } diff --git a/src/main/java/com/volmit/iris/util/json/HTTP.java b/src/main/java/com/volmit/iris/util/json/HTTP.java index 417a7e406..2b3099522 100644 --- a/src/main/java/com/volmit/iris/util/json/HTTP.java +++ b/src/main/java/com/volmit/iris/util/json/HTTP.java @@ -78,8 +78,7 @@ public class HTTP { * It does no further checking or conversion. It does not parse dates. It * does not do '%' transforms on URLs. * - * @param string - * An HTTP header string. + * @param string An HTTP header string. * @return A JSONObject containing the elements and attributes of the XML * string. */ @@ -89,7 +88,7 @@ public static JSONObject toJSONObject(String string) throws JSONException { String token; token = x.nextToken(); - if(token.toUpperCase().startsWith("HTTP")) { + if (token.toUpperCase().startsWith("HTTP")) { // Response @@ -109,7 +108,7 @@ public static JSONObject toJSONObject(String string) throws JSONException { // Fields - while(x.more()) { + while (x.more()) { String name = x.nextTo(':'); x.next(':'); jo.put(name, x.nextTo('\0')); @@ -142,23 +141,21 @@ public static JSONObject toJSONObject(String string) throws JSONException { * Any other members of the JSONObject will be output as HTTP fields. The * result will end with two CRLF pairs. * - * @param jo - * A JSONObject + * @param jo A JSONObject * @return An HTTP header string. - * @throws JSONException - * if the object does not contain enough information. + * @throws JSONException if the object does not contain enough information. */ public static String toString(JSONObject jo) throws JSONException { Iterator keys = jo.keys(); String string; StringBuilder sb = new StringBuilder(); - if(jo.has("Status-Code") && jo.has("Reason-Phrase")) { + if (jo.has("Status-Code") && jo.has("Reason-Phrase")) { sb.append(jo.getString("HTTP-Version")); sb.append(' '); sb.append(jo.getString("Status-Code")); sb.append(' '); sb.append(jo.getString("Reason-Phrase")); - } else if(jo.has("Method") && jo.has("Request-URI")) { + } else if (jo.has("Method") && jo.has("Request-URI")) { sb.append(jo.getString("Method")); sb.append(' '); sb.append('"'); @@ -170,9 +167,9 @@ public static String toString(JSONObject jo) throws JSONException { throw new JSONException("Not enough material for an HTTP header."); } sb.append(CRLF); - while(keys.hasNext()) { + while (keys.hasNext()) { string = keys.next(); - if(!"HTTP-Version".equals(string) && !"Status-Code".equals(string) && !"Reason-Phrase".equals(string) && !"Method".equals(string) && !"Request-URI".equals(string) && !jo.isNull(string)) { + if (!"HTTP-Version".equals(string) && !"Status-Code".equals(string) && !"Reason-Phrase".equals(string) && !"Method".equals(string) && !"Request-URI".equals(string) && !jo.isNull(string)) { sb.append(string); sb.append(": "); sb.append(jo.getString(string)); diff --git a/src/main/java/com/volmit/iris/util/json/HTTPTokener.java b/src/main/java/com/volmit/iris/util/json/HTTPTokener.java index fb8deaecd..d2f4a6a64 100644 --- a/src/main/java/com/volmit/iris/util/json/HTTPTokener.java +++ b/src/main/java/com/volmit/iris/util/json/HTTPTokener.java @@ -31,8 +31,7 @@ public class HTTPTokener extends JSONTokener { /** * Construct an HTTPTokener from a string. * - * @param string - * A source string. + * @param string A source string. */ public HTTPTokener(String string) { super(string); @@ -49,22 +48,22 @@ public String nextToken() throws JSONException { StringBuilder sb = new StringBuilder(); do { c = next(); - } while(Character.isWhitespace(c)); - if(c == '"' || c == '\'') { + } while (Character.isWhitespace(c)); + if (c == '"' || c == '\'') { q = c; - for(; ; ) { + for (; ; ) { c = next(); - if(c < ' ') { + if (c < ' ') { throw syntaxError("Unterminated string."); } - if(c == q) { + if (c == q) { return sb.toString(); } sb.append(c); } } - for(; ; ) { - if(c == 0 || Character.isWhitespace(c)) { + for (; ; ) { + if (c == 0 || Character.isWhitespace(c)) { return sb.toString(); } sb.append(c); diff --git a/src/main/java/com/volmit/iris/util/json/JSONArray.java b/src/main/java/com/volmit/iris/util/json/JSONArray.java index d89e6de46..62b09b3c8 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONArray.java +++ b/src/main/java/com/volmit/iris/util/json/JSONArray.java @@ -94,29 +94,27 @@ public JSONArray() { /** * Construct a JSONArray from a JSONTokener. * - * @param x - * A JSONTokener - * @throws JSONException - * If there is a syntax error. + * @param x A JSONTokener + * @throws JSONException If there is a syntax error. */ public JSONArray(JSONTokener x) throws JSONException { this(); - if(x.nextClean() != '[') { + if (x.nextClean() != '[') { throw x.syntaxError("A JSONArray text must start with '['"); } - if(x.nextClean() != ']') { + if (x.nextClean() != ']') { x.back(); - for(; ; ) { - if(x.nextClean() == ',') { + for (; ; ) { + if (x.nextClean() == ',') { x.back(); this.myArrayList.add(JSONObject.NULL); } else { x.back(); this.myArrayList.add(x.nextValue()); } - switch(x.nextClean()) { + switch (x.nextClean()) { case ',': - if(x.nextClean() == ']') { + if (x.nextClean() == ']') { return; } x.back(); @@ -133,12 +131,10 @@ public JSONArray(JSONTokener x) throws JSONException { /** * Construct a JSONArray from a source JSON text. * - * @param source - * A string that begins with [ (left - * bracket) and ends with ]   - * (right bracket). - * @throws JSONException - * If there is a syntax error. + * @param source A string that begins with [ (left + * bracket) and ends with ]   + * (right bracket). + * @throws JSONException If there is a syntax error. */ public JSONArray(String source) throws JSONException { this(new JSONTokener(source)); @@ -147,14 +143,13 @@ public JSONArray(String source) throws JSONException { /** * Construct a JSONArray from a Collection. * - * @param collection - * A Collection. + * @param collection A Collection. */ public JSONArray(Collection collection) { this.myArrayList = new ArrayList(); - if(collection != null) { + if (collection != null) { Iterator iter = collection.iterator(); - while(iter.hasNext()) { + while (iter.hasNext()) { this.myArrayList.add(JSONObject.wrap(iter.next())); } } @@ -163,14 +158,13 @@ public JSONArray(Collection collection) { /** * Construct a JSONArray from an array * - * @throws JSONException - * If not an array. + * @throws JSONException If not an array. */ public JSONArray(Object array) throws JSONException { this(); - if(array.getClass().isArray()) { + if (array.getClass().isArray()) { int length = Array.getLength(array); - for(int i = 0; i < length; i += 1) { + for (int i = 0; i < length; i += 1) { this.put(JSONObject.wrap(Array.get(array, i))); } } else { @@ -186,15 +180,13 @@ public Iterator iterator() { /** * Get the object value associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return An object value. - * @throws JSONException - * If there is no value for the index. + * @throws JSONException If there is no value for the index. */ public Object get(int index) throws JSONException { Object object = this.opt(index); - if(object == null) { + if (object == null) { throw new JSONException("JSONArray[" + index + "] not found."); } return object; @@ -204,18 +196,16 @@ public Object get(int index) throws JSONException { * Get the boolean value associated with an index. The string values "true" * and "false" are converted to boolean. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The truth. - * @throws JSONException - * If there is no value for the index or if the value is not - * convertible to boolean. + * @throws JSONException If there is no value for the index or if the value is not + * convertible to boolean. */ public boolean getBoolean(int index) throws JSONException { Object object = this.get(index); - if(object.equals(Boolean.FALSE) || (object instanceof String && ((String) object).equalsIgnoreCase("false"))) { + if (object.equals(Boolean.FALSE) || (object instanceof String && ((String) object).equalsIgnoreCase("false"))) { return false; - } else if(object.equals(Boolean.TRUE) || (object instanceof String && ((String) object).equalsIgnoreCase("true"))) { + } else if (object.equals(Boolean.TRUE) || (object instanceof String && ((String) object).equalsIgnoreCase("true"))) { return true; } throw new JSONException("JSONArray[" + index + "] is not a boolean."); @@ -224,18 +214,16 @@ public boolean getBoolean(int index) throws JSONException { /** * Get the double value associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a number. + * @throws JSONException If the key is not found or if the value cannot be converted + * to a number. */ public double getDouble(int index) throws JSONException { Object object = this.get(index); try { return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble((String) object); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONArray[" + index + "] is not a number."); } @@ -244,18 +232,15 @@ public double getDouble(int index) throws JSONException { /** * Get the enum value associated with an index. * - * @param clazz - * The type of enum to retrieve. - * @param index - * The index must be between 0 and length() - 1. + * @param clazz The type of enum to retrieve. + * @param index The index must be between 0 and length() - 1. * @return The enum value at the index location - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to an enum. + * @throws JSONException if the key is not found or if the value cannot be converted + * to an enum. */ public > E getEnum(Class clazz, int index) throws JSONException { E val = optEnum(clazz, index); - if(val == null) { + if (val == null) { // JSONException should really take a throwable argument. // If it did, I would re-implement this with the Enum.valueOf // method and place any thrown exception in the JSONException @@ -267,18 +252,16 @@ public > E getEnum(Class clazz, int index) throws JSONExcep /** * Get the BigDecimal value associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a BigDecimal. + * @throws JSONException If the key is not found or if the value cannot be converted + * to a BigDecimal. */ public BigDecimal getBigDecimal(int index) throws JSONException { Object object = this.get(index); try { return new BigDecimal(object.toString()); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONArray[" + index + "] could not convert to BigDecimal."); } @@ -287,18 +270,16 @@ public BigDecimal getBigDecimal(int index) throws JSONException { /** * Get the BigInteger value associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a BigInteger. + * @throws JSONException If the key is not found or if the value cannot be converted + * to a BigInteger. */ public BigInteger getBigInteger(int index) throws JSONException { Object object = this.get(index); try { return new BigInteger(object.toString()); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONArray[" + index + "] could not convert to BigInteger."); } @@ -307,17 +288,15 @@ public BigInteger getBigInteger(int index) throws JSONException { /** * Get the int value associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. - * @throws JSONException - * If the key is not found or if the value is not a number. + * @throws JSONException If the key is not found or if the value is not a number. */ public int getInt(int index) throws JSONException { Object object = this.get(index); try { return object instanceof Number ? ((Number) object).intValue() : Integer.parseInt((String) object); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONArray[" + index + "] is not a number."); } @@ -326,16 +305,14 @@ public int getInt(int index) throws JSONException { /** * Get the JSONArray associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return A JSONArray value. - * @throws JSONException - * If there is no value for the index. or if the value is not a - * JSONArray + * @throws JSONException If there is no value for the index. or if the value is not a + * JSONArray */ public JSONArray getJSONArray(int index) throws JSONException { Object object = this.get(index); - if(object instanceof JSONArray) { + if (object instanceof JSONArray) { return (JSONArray) object; } throw new JSONException("JSONArray[" + index + "] is not a JSONArray."); @@ -344,16 +321,14 @@ public JSONArray getJSONArray(int index) throws JSONException { /** * Get the JSONObject associated with an index. * - * @param index - * subscript + * @param index subscript * @return A JSONObject value. - * @throws JSONException - * If there is no value for the index or if the value is not a - * JSONObject + * @throws JSONException If there is no value for the index or if the value is not a + * JSONObject */ public JSONObject getJSONObject(int index) throws JSONException { Object object = this.get(index); - if(object instanceof JSONObject) { + if (object instanceof JSONObject) { return (JSONObject) object; } throw new JSONException("JSONArray[" + index + "] is not a JSONObject."); @@ -362,18 +337,16 @@ public JSONObject getJSONObject(int index) throws JSONException { /** * Get the long value associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a number. + * @throws JSONException If the key is not found or if the value cannot be converted + * to a number. */ public long getLong(int index) throws JSONException { Object object = this.get(index); try { return object instanceof Number ? ((Number) object).longValue() : Long.parseLong((String) object); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONArray[" + index + "] is not a number."); } @@ -382,15 +355,13 @@ public long getLong(int index) throws JSONException { /** * Get the string associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return A string value. - * @throws JSONException - * If there is no string value for the index. + * @throws JSONException If there is no string value for the index. */ public String getString(int index) throws JSONException { Object object = this.get(index); - if(object instanceof String) { + if (object instanceof String) { return (String) object; } throw new JSONException("JSONArray[" + index + "] not a string."); @@ -399,8 +370,7 @@ public String getString(int index) throws JSONException { /** * Determine if the value is null. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return true if the value at the index is null, or if there is no value. */ public boolean isNull(int index) { @@ -412,18 +382,16 @@ public boolean isNull(int index) { * separator string is inserted between each element. Warning: * This method assumes that the data structure is acyclical. * - * @param separator - * A string that will be inserted between the elements. + * @param separator A string that will be inserted between the elements. * @return a string. - * @throws JSONException - * If the array contains an invalid number. + * @throws JSONException If the array contains an invalid number. */ public String join(String separator) throws JSONException { int len = this.length(); StringBuilder sb = new StringBuilder(); - for(int i = 0; i < len; i += 1) { - if(i > 0) { + for (int i = 0; i < len; i += 1) { + if (i > 0) { sb.append(separator); } sb.append(JSONObject.valueToString(this.myArrayList.get(i))); @@ -443,8 +411,7 @@ public int length() { /** * Get the optional object value associated with an index. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return An object value, or null if there is no object at that index. */ public Object opt(int index) { @@ -456,8 +423,7 @@ public Object opt(int index) { * if there is no value at that index, or if the value is not Boolean.TRUE * or the String "true". * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The truth. */ public boolean optBoolean(int index) { @@ -469,16 +435,14 @@ public boolean optBoolean(int index) { * defaultValue if there is no value at that index or if it is not a Boolean * or the String "true" or "false" (case insensitive). * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * A boolean default. + * @param index The index must be between 0 and length() - 1. + * @param defaultValue A boolean default. * @return The truth. */ public boolean optBoolean(int index, boolean defaultValue) { try { return this.getBoolean(index); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -489,8 +453,7 @@ public boolean optBoolean(int index, boolean defaultValue) { * if there is no value for the index, or if the value is not a number and * cannot be converted to a number. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. */ public double optDouble(int index) { @@ -502,16 +465,14 @@ public double optDouble(int index) { * is returned if there is no value for the index, or if the value is not a * number and cannot be converted to a number. * - * @param index - * subscript - * @param defaultValue - * The default value. + * @param index subscript + * @param defaultValue The default value. * @return The value. */ public double optDouble(int index, double defaultValue) { try { return this.getDouble(index); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -522,8 +483,7 @@ public double optDouble(int index, double defaultValue) { * there is no value for the index, or if the value is not a number and * cannot be converted to a number. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. */ public int optInt(int index) { @@ -535,16 +495,14 @@ public int optInt(int index) { * returned if there is no value for the index, or if the value is not a * number and cannot be converted to a number. * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. * @return The value. */ public int optInt(int index, int defaultValue) { try { return this.getInt(index); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -553,10 +511,8 @@ public int optInt(int index, int defaultValue) { /** * Get the enum value associated with a key. * - * @param clazz - * The type of enum to retrieve. - * @param index - * The index must be between 0 and length() - 1. + * @param clazz The type of enum to retrieve. + * @param index The index must be between 0 and length() - 1. * @return The enum value at the index location or null if not found */ public > E optEnum(Class clazz, int index) { @@ -566,32 +522,29 @@ public > E optEnum(Class clazz, int index) { /** * Get the enum value associated with a key. * - * @param clazz - * The type of enum to retrieve. - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default in case the value is not found + * @param clazz The type of enum to retrieve. + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default in case the value is not found * @return The enum value at the index location or defaultValue if the value * is not found or cannot be assigned to clazz */ public > E optEnum(Class clazz, int index, E defaultValue) { try { Object val = this.opt(index); - if(JSONObject.NULL.equals(val)) { + if (JSONObject.NULL.equals(val)) { return defaultValue; } - if(clazz.isAssignableFrom(val.getClass())) { + if (clazz.isAssignableFrom(val.getClass())) { // we just checked it! @SuppressWarnings("unchecked") E myE = (E) val; return myE; } return Enum.valueOf(clazz, val.toString()); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { Iris.reportError(e); return defaultValue; - } catch(NullPointerException e) { + } catch (NullPointerException e) { Iris.reportError(e); return defaultValue; } @@ -602,16 +555,14 @@ public > E optEnum(Class clazz, int index, E defaultValue) * defaultValue is returned if there is no value for the index, or if the * value is not a number and cannot be converted to a number. * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. * @return The value. */ public BigInteger optBigInteger(int index, BigInteger defaultValue) { try { return this.getBigInteger(index); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -622,16 +573,14 @@ public BigInteger optBigInteger(int index, BigInteger defaultValue) { * defaultValue is returned if there is no value for the index, or if the * value is not a number and cannot be converted to a number. * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. * @return The value. */ public BigDecimal optBigDecimal(int index, BigDecimal defaultValue) { try { return this.getBigDecimal(index); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -640,8 +589,7 @@ public BigDecimal optBigDecimal(int index, BigDecimal defaultValue) { /** * Get the optional JSONArray associated with an index. * - * @param index - * subscript + * @param index subscript * @return A JSONArray value, or null if the index has no value, or if the * value is not a JSONArray. */ @@ -655,8 +603,7 @@ public JSONArray optJSONArray(int index) { * the key is not found, or null if the index has no value, or if the value * is not a JSONObject. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return A JSONObject value. */ public JSONObject optJSONObject(int index) { @@ -669,8 +616,7 @@ public JSONObject optJSONObject(int index) { * there is no value for the index, or if the value is not a number and * cannot be converted to a number. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return The value. */ public long optLong(int index) { @@ -682,16 +628,14 @@ public long optLong(int index) { * returned if there is no value for the index, or if the value is not a * number and cannot be converted to a number. * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. * @return The value. */ public long optLong(int index, long defaultValue) { try { return this.getLong(index); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -702,8 +646,7 @@ public long optLong(int index, long defaultValue) { * empty string if there is no value at that index. If the value is not a * string and is not null, then it is coverted to a string. * - * @param index - * The index must be between 0 and length() - 1. + * @param index The index must be between 0 and length() - 1. * @return A String value. */ public String optString(int index) { @@ -714,10 +657,8 @@ public String optString(int index) { * Get the optional string associated with an index. The defaultValue is * returned if the key is not found. * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. * @return A String value. */ public String optString(int index, String defaultValue) { @@ -728,8 +669,7 @@ public String optString(int index, String defaultValue) { /** * Append a boolean value. This increases the array's length by one. * - * @param value - * A boolean value. + * @param value A boolean value. * @return this. */ public JSONArray put(boolean value) { @@ -741,8 +681,7 @@ public JSONArray put(boolean value) { * Put a value in the JSONArray, where the value will be a JSONArray which * is produced from a Collection. * - * @param value - * A Collection value. + * @param value A Collection value. * @return this. */ public JSONArray put(Collection value) { @@ -753,11 +692,9 @@ public JSONArray put(Collection value) { /** * Append a double value. This increases the array's length by one. * - * @param value - * A double value. + * @param value A double value. * @return this. - * @throws JSONException - * if the value is not finite. + * @throws JSONException if the value is not finite. */ public JSONArray put(double value) throws JSONException { Double d = Double.valueOf(value); @@ -769,8 +706,7 @@ public JSONArray put(double value) throws JSONException { /** * Append an int value. This increases the array's length by one. * - * @param value - * An int value. + * @param value An int value. * @return this. */ public JSONArray put(int value) { @@ -781,8 +717,7 @@ public JSONArray put(int value) { /** * Append an long value. This increases the array's length by one. * - * @param value - * A long value. + * @param value A long value. * @return this. */ public JSONArray put(long value) { @@ -794,8 +729,7 @@ public JSONArray put(long value) { * Put a value in the JSONArray, where the value will be a JSONObject which * is produced from a Map. * - * @param value - * A Map value. + * @param value A Map value. * @return this. */ public JSONArray put(Map value) { @@ -806,10 +740,9 @@ public JSONArray put(Map value) { /** * Append an object value. This increases the array's length by one. * - * @param value - * An object value. The value should be a Boolean, Double, - * Integer, JSONArray, JSONObject, Long, or String, or the - * JSONObject.NULL object. + * @param value An object value. The value should be a Boolean, Double, + * Integer, JSONArray, JSONObject, Long, or String, or the + * JSONObject.NULL object. * @return this. */ public JSONArray put(Object value) { @@ -822,13 +755,10 @@ public JSONArray put(Object value) { * than the length of the JSONArray, then null elements will be added as * necessary to pad it out. * - * @param index - * The subscript. - * @param value - * A boolean value. + * @param index The subscript. + * @param value A boolean value. * @return this. - * @throws JSONException - * If the index is negative. + * @throws JSONException If the index is negative. */ public JSONArray put(int index, boolean value) throws JSONException { this.put(index, value ? Boolean.TRUE : Boolean.FALSE); @@ -839,13 +769,10 @@ public JSONArray put(int index, boolean value) throws JSONException { * Put a value in the JSONArray, where the value will be a JSONArray which * is produced from a Collection. * - * @param index - * The subscript. - * @param value - * A Collection value. + * @param index The subscript. + * @param value A Collection value. * @return this. - * @throws JSONException - * If the index is negative or if the value is not finite. + * @throws JSONException If the index is negative or if the value is not finite. */ public JSONArray put(int index, Collection value) throws JSONException { this.put(index, new JSONArray(value)); @@ -857,13 +784,10 @@ public JSONArray put(int index, Collection value) throws JSONException { * the JSONArray, then null elements will be added as necessary to pad it * out. * - * @param index - * The subscript. - * @param value - * A double value. + * @param index The subscript. + * @param value A double value. * @return this. - * @throws JSONException - * If the index is negative or if the value is not finite. + * @throws JSONException If the index is negative or if the value is not finite. */ public JSONArray put(int index, double value) throws JSONException { this.put(index, Double.valueOf(value)); @@ -875,13 +799,10 @@ public JSONArray put(int index, double value) throws JSONException { * the JSONArray, then null elements will be added as necessary to pad it * out. * - * @param index - * The subscript. - * @param value - * An int value. + * @param index The subscript. + * @param value An int value. * @return this. - * @throws JSONException - * If the index is negative. + * @throws JSONException If the index is negative. */ public JSONArray put(int index, int value) throws JSONException { this.put(index, Integer.valueOf(value)); @@ -893,13 +814,10 @@ public JSONArray put(int index, int value) throws JSONException { * the JSONArray, then null elements will be added as necessary to pad it * out. * - * @param index - * The subscript. - * @param value - * A long value. + * @param index The subscript. + * @param value A long value. * @return this. - * @throws JSONException - * If the index is negative. + * @throws JSONException If the index is negative. */ public JSONArray put(int index, long value) throws JSONException { this.put(index, Long.valueOf(value)); @@ -910,14 +828,11 @@ public JSONArray put(int index, long value) throws JSONException { * Put a value in the JSONArray, where the value will be a JSONObject that * is produced from a Map. * - * @param index - * The subscript. - * @param value - * The Map value. + * @param index The subscript. + * @param value The Map value. * @return this. - * @throws JSONException - * If the index is negative or if the the value is an invalid - * number. + * @throws JSONException If the index is negative or if the the value is an invalid + * number. */ public JSONArray put(int index, Map value) throws JSONException { this.put(index, new JSONObject(value)); @@ -929,26 +844,23 @@ public JSONArray put(int index, Map value) throws JSONException * than the length of the JSONArray, then null elements will be added as * necessary to pad it out. * - * @param index - * The subscript. - * @param value - * The value to put into the array. The value should be a - * Boolean, Double, Integer, JSONArray, JSONObject, Long, or - * String, or the JSONObject.NULL object. + * @param index The subscript. + * @param value The value to put into the array. The value should be a + * Boolean, Double, Integer, JSONArray, JSONObject, Long, or + * String, or the JSONObject.NULL object. * @return this. - * @throws JSONException - * If the index is negative or if the the value is an invalid - * number. + * @throws JSONException If the index is negative or if the the value is an invalid + * number. */ public JSONArray put(int index, Object value) throws JSONException { JSONObject.testValidity(value); - if(index < 0) { + if (index < 0) { throw new JSONException("JSONArray[" + index + "] not found."); } - if(index < this.length()) { + if (index < this.length()) { this.myArrayList.set(index, value); } else { - while(index != this.length()) { + while (index != this.length()) { this.put(JSONObject.NULL); } this.put(value); @@ -959,8 +871,7 @@ public JSONArray put(int index, Object value) throws JSONException { /** * Remove an index and close the hole. * - * @param index - * The index of the element to be removed. + * @param index The index of the element to be removed. * @return The value that was associated with the index, or null if there * was no value. */ @@ -972,31 +883,30 @@ public Object remove(int index) { * Determine if two JSONArrays are similar. They must contain similar * sequences. * - * @param other - * The other JSONArray + * @param other The other JSONArray * @return true if they are equal */ @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean similar(Object other) { - if(!(other instanceof JSONArray)) { + if (!(other instanceof JSONArray)) { return false; } int len = this.length(); - if(len != ((JSONArray) other).length()) { + if (len != ((JSONArray) other).length()) { return false; } - for(int i = 0; i < len; i += 1) { + for (int i = 0; i < len; i += 1) { Object valueThis = this.get(i); Object valueOther = ((JSONArray) other).get(i); - if(valueThis instanceof JSONObject) { - if(!((JSONObject) valueThis).similar(valueOther)) { + if (valueThis instanceof JSONObject) { + if (!((JSONObject) valueThis).similar(valueOther)) { return false; } - } else if(valueThis instanceof JSONArray) { - if(!((JSONArray) valueThis).similar(valueOther)) { + } else if (valueThis instanceof JSONArray) { + if (!((JSONArray) valueThis).similar(valueOther)) { return false; } - } else if(!valueThis.equals(valueOther)) { + } else if (!valueThis.equals(valueOther)) { return false; } } @@ -1007,20 +917,18 @@ public boolean similar(Object other) { * Produce a JSONObject by combining a JSONArray of names with the values of * this JSONArray. * - * @param names - * A JSONArray containing a list of key strings. These will be - * paired with the values. + * @param names A JSONArray containing a list of key strings. These will be + * paired with the values. * @return A JSONObject, or null if there are no names or if this JSONArray * has no values. - * @throws JSONException - * If any of the names are null. + * @throws JSONException If any of the names are null. */ public JSONObject toJSONObject(JSONArray names) throws JSONException { - if(names == null || names.length() == 0 || this.length() == 0) { + if (names == null || names.length() == 0 || this.length() == 0) { return null; } JSONObject jo = new JSONObject(); - for(int i = 0; i < names.length(); i += 1) { + for (int i = 0; i < names.length(); i += 1) { jo.put(names.getString(i), this.opt(i)); } return jo; @@ -1041,7 +949,7 @@ public JSONObject toJSONObject(JSONArray names) throws JSONException { public String toString() { try { return this.toString(0); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return null; } @@ -1051,8 +959,7 @@ public String toString() { * Make a prettyprinted JSON text of this JSONArray. Warning: This method * assumes that the data structure is acyclical. * - * @param indentFactor - * The number of spaces to add to each level of indentation. + * @param indentFactor The number of spaces to add to each level of indentation. * @return a printable, displayable, transmittable representation of the * object, beginning with [ (left * bracket) and ending with ]   @@ -1060,7 +967,7 @@ public String toString() { */ public String toString(int indentFactor) throws JSONException { StringWriter sw = new StringWriter(); - synchronized(sw.getBuffer()) { + synchronized (sw.getBuffer()) { return this.write(sw, indentFactor, 0).toString(); } } @@ -1083,10 +990,8 @@ public Writer write(Writer writer) throws JSONException { *

* Warning: This method assumes that the data structure is acyclical. * - * @param indentFactor - * The number of spaces to add to each level of indentation. - * @param indent - * The indention of the top level. + * @param indentFactor The number of spaces to add to each level of indentation. + * @param indent The indention of the top level. * @return The writer. */ Writer write(Writer writer, int indentFactor, int indent) throws JSONException { @@ -1095,30 +1000,30 @@ Writer write(Writer writer, int indentFactor, int indent) throws JSONException { int length = this.length(); writer.write('['); - if(length == 1) { + if (length == 1) { JSONObject.writeValue(writer, this.myArrayList.get(0), indentFactor, indent); - } else if(length != 0) { + } else if (length != 0) { final int newindent = indent + indentFactor; - for(int i = 0; i < length; i += 1) { - if(commanate) { + for (int i = 0; i < length; i += 1) { + if (commanate) { writer.write(','); } - if(indentFactor > 0) { + if (indentFactor > 0) { writer.write('\n'); } JSONObject.indent(writer, newindent); JSONObject.writeValue(writer, this.myArrayList.get(i), indentFactor, newindent); commanate = true; } - if(indentFactor > 0) { + if (indentFactor > 0) { writer.write('\n'); } JSONObject.indent(writer, indent); } writer.write(']'); return writer; - } catch(IOException e) { + } catch (IOException e) { throw new JSONException(e); } } diff --git a/src/main/java/com/volmit/iris/util/json/JSONException.java b/src/main/java/com/volmit/iris/util/json/JSONException.java index 27cbf9c37..2f7f5ac8a 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONException.java +++ b/src/main/java/com/volmit/iris/util/json/JSONException.java @@ -32,8 +32,7 @@ public class JSONException extends RuntimeException { /** * Constructs a JSONException with an explanatory message. * - * @param message - * Detail about the reason for the exception. + * @param message Detail about the reason for the exception. */ public JSONException(String message) { super(message); @@ -42,8 +41,7 @@ public JSONException(String message) { /** * Constructs a new JSONException with the specified cause. * - * @param cause - * The cause. + * @param cause The cause. */ public JSONException(Throwable cause) { super(cause.getMessage()); diff --git a/src/main/java/com/volmit/iris/util/json/JSONML.java b/src/main/java/com/volmit/iris/util/json/JSONML.java index b90963bee..091f7d08b 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONML.java +++ b/src/main/java/com/volmit/iris/util/json/JSONML.java @@ -34,13 +34,10 @@ public class JSONML { /** * Parse XML values and store them in a JSONArray. * - * @param x - * The XMLTokener containing the source string. - * @param arrayForm - * true if array form, false if object form. - * @param ja - * The JSONArray that is containing the current tag or null if we - * are at the outermost level. + * @param x The XMLTokener containing the source string. + * @param arrayForm true if array form, false if object form. + * @param ja The JSONArray that is containing the current tag or null if we + * are at the outermost level. * @return A JSONArray if the value is the outermost tag, otherwise null. */ private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throws JSONException { @@ -59,41 +56,41 @@ private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throw // // - while(true) { - if(!x.more()) { + while (true) { + if (!x.more()) { throw x.syntaxError("Bad XML"); } token = x.nextContent(); - if(token == XML.LT) { + if (token == XML.LT) { token = x.nextToken(); - if(token instanceof Character) { - if(token == XML.SLASH) { + if (token instanceof Character) { + if (token == XML.SLASH) { // Close tag "); } else { x.back(); } - } else if(c == '[') { + } else if (c == '[') { token = x.nextToken(); - if(token.equals("CDATA") && x.next() == '[') { - if(ja != null) { + if (token.equals("CDATA") && x.next() == '[') { + if (ja != null) { ja.put(x.nextCDATA()); } } else { @@ -103,16 +100,16 @@ private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throw i = 1; do { token = x.nextMeta(); - if(token == null) { + if (token == null) { throw x.syntaxError("Missing '>' after ' 0); + } while (i > 0); } - } else if(token == XML.QUEST) { + } else if (token == XML.QUEST) { // 0) { + if (arrayForm && newjo.length() > 0) { newja.put(newjo); } // Empty tag <.../> - if(token == XML.SLASH) { - if(x.nextToken() != XML.GT) { + if (token == XML.SLASH) { + if (x.nextToken() != XML.GT) { throw x.syntaxError("Misshaped tag"); } - if(ja == null) { - if(arrayForm) { + if (ja == null) { + if (arrayForm) { return newja; } else { return newjo; @@ -192,20 +189,20 @@ private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throw // Content, between <...> and } else { - if(token != XML.GT) { + if (token != XML.GT) { throw x.syntaxError("Misshaped tag"); } closeTag = (String) parse(x, arrayForm, newja); - if(closeTag != null) { - if(!closeTag.equals(tagName)) { + if (closeTag != null) { + if (!closeTag.equals(tagName)) { throw x.syntaxError("Mismatched '" + tagName + "' and '" + closeTag + "'"); } tagName = null; - if(!arrayForm && newja.length() > 0) { + if (!arrayForm && newja.length() > 0) { newjo.put("childNodes", newja); } - if(ja == null) { - if(arrayForm) { + if (ja == null) { + if (arrayForm) { return newja; } else { return newjo; @@ -215,7 +212,7 @@ private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throw } } } else { - if(ja != null) { + if (ja != null) { ja.put(token instanceof String ? XML.stringToValue((String) token) : token); } } @@ -231,8 +228,7 @@ private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throw * JSONArrays will represent the child tags. Comments, prologs, DTDs, and * <[ [ ]]> are ignored. * - * @param string - * The source string. + * @param string The source string. * @return A JSONArray containing the structured data from the XML string. */ public static JSONArray toJSONArray(String string) throws JSONException { @@ -248,8 +244,7 @@ public static JSONArray toJSONArray(String string) throws JSONException { * JSONArrays will represent the child content and tags. Comments, prologs, * DTDs, and <[ [ ]]> are ignored. * - * @param x - * An XMLTokener. + * @param x An XMLTokener. * @return A JSONArray containing the structured data from the XML string. */ public static JSONArray toJSONArray(XMLTokener x) throws JSONException { @@ -266,8 +261,7 @@ public static JSONArray toJSONArray(XMLTokener x) throws JSONException { *

* Comments, prologs, DTDs, and <[ [ ]]> are ignored. * - * @param x - * An XMLTokener of the XML source text. + * @param x An XMLTokener of the XML source text. * @return A JSONObject containing the structured data from the XML string. */ public static JSONObject toJSONObject(XMLTokener x) throws JSONException { @@ -284,8 +278,7 @@ public static JSONObject toJSONObject(XMLTokener x) throws JSONException { *

* Comments, prologs, DTDs, and <[ [ ]]> are ignored. * - * @param string - * The XML source text. + * @param string The XML source text. * @return A JSONObject containing the structured data from the XML string. */ public static JSONObject toJSONObject(String string) throws JSONException { @@ -295,8 +288,7 @@ public static JSONObject toJSONObject(String string) throws JSONException { /** * Reverse the JSONML transformation, making an XML text from a JSONArray. * - * @param ja - * A JSONArray. + * @param ja A JSONArray. * @return An XML string. */ public static String toString(JSONArray ja) throws JSONException { @@ -319,18 +311,18 @@ public static String toString(JSONArray ja) throws JSONException { sb.append(tagName); object = ja.opt(1); - if(object instanceof JSONObject) { + if (object instanceof JSONObject) { i = 2; jo = (JSONObject) object; // Emit the attributes keys = jo.keys(); - while(keys.hasNext()) { + while (keys.hasNext()) { key = keys.next(); XML.noSpace(key); value = jo.optString(key); - if(value != null) { + if (value != null) { sb.append(' '); sb.append(XML.escape(key)); sb.append('='); @@ -346,25 +338,25 @@ public static String toString(JSONArray ja) throws JSONException { // Emit content in body length = ja.length(); - if(i >= length) { + if (i >= length) { sb.append('/'); } else { sb.append('>'); do { object = ja.get(i); i += 1; - if(object != null) { - if(object instanceof String) { + if (object != null) { + if (object instanceof String) { sb.append(XML.escape(object.toString())); - } else if(object instanceof JSONObject) { + } else if (object instanceof JSONObject) { sb.append(toString((JSONObject) object)); - } else if(object instanceof JSONArray) { + } else if (object instanceof JSONArray) { sb.append(toString((JSONArray) object)); } else { sb.append(object); } } - } while(i < length); + } while (i < length); sb.append('<'); sb.append('/'); sb.append(tagName); @@ -379,8 +371,7 @@ public static String toString(JSONArray ja) throws JSONException { * then it must have a "childNodes" property containing an array of objects. * The other properties are attributes with string values. * - * @param jo - * A JSONObject. + * @param jo A JSONObject. * @return An XML string. */ public static String toString(JSONObject jo) throws JSONException { @@ -397,7 +388,7 @@ public static String toString(JSONObject jo) throws JSONException { // Emit '); length = ja.length(); - for(i = 0; i < length; i += 1) { + for (i = 0; i < length; i += 1) { object = ja.get(i); - if(object != null) { - if(object instanceof String) { + if (object != null) { + if (object instanceof String) { sb.append(XML.escape(object.toString())); - } else if(object instanceof JSONObject) { + } else if (object instanceof JSONObject) { sb.append(toString((JSONObject) object)); - } else if(object instanceof JSONArray) { + } else if (object instanceof JSONArray) { sb.append(toString((JSONArray) object)); } else { sb.append(object); diff --git a/src/main/java/com/volmit/iris/util/json/JSONObject.java b/src/main/java/com/volmit/iris/util/json/JSONObject.java index f84a28422..05aa7f2bb 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONObject.java +++ b/src/main/java/com/volmit/iris/util/json/JSONObject.java @@ -107,20 +107,17 @@ public JSONObject() { * strings is used to identify the keys that should be copied. Missing keys * are ignored. * - * @param jo - * A JSONObject. - * @param names - * An array of strings. - * @throws JSONException - * If a value is a non-finite number or if a name is - * duplicated. + * @param jo A JSONObject. + * @param names An array of strings. + * @throws JSONException If a value is a non-finite number or if a name is + * duplicated. */ public JSONObject(JSONObject jo, String[] names) { this(); - for(int i = 0; i < names.length; i += 1) { + for (int i = 0; i < names.length; i += 1) { try { this.putOnce(names[i], jo.opt(names[i])); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); } } @@ -129,23 +126,21 @@ public JSONObject(JSONObject jo, String[] names) { /** * Construct a JSONObject from a JSONTokener. * - * @param x - * A JSONTokener object containing the source string. - * @throws JSONException - * If there is a syntax error in the source string or a - * duplicated key. + * @param x A JSONTokener object containing the source string. + * @throws JSONException If there is a syntax error in the source string or a + * duplicated key. */ public JSONObject(JSONTokener x) throws JSONException { this(); char c; String key; - if(x.nextClean() != '{') { + if (x.nextClean() != '{') { throw x.syntaxError("A JSONObject text must begin with '{'"); } - for(; ; ) { + for (; ; ) { c = x.nextClean(); - switch(c) { + switch (c) { case 0: throw x.syntaxError("A JSONObject text must end with '}'"); case '}': @@ -158,17 +153,17 @@ public JSONObject(JSONTokener x) throws JSONException { // The key is followed by ':'. c = x.nextClean(); - if(c != ':') { + if (c != ':') { throw x.syntaxError("Expected a ':' after a key"); } this.putOnce(key, x.nextValue()); // Pairs are separated by ','. - switch(x.nextClean()) { + switch (x.nextClean()) { case ';': case ',': - if(x.nextClean() == '}') { + if (x.nextClean() == '}') { return; } x.back(); @@ -184,18 +179,17 @@ public JSONObject(JSONTokener x) throws JSONException { /** * Construct a JSONObject from a Map. * - * @param map - * A map object that can be used to initialize the contents of - * the JSONObject. + * @param map A map object that can be used to initialize the contents of + * the JSONObject. */ public JSONObject(Map map) { this.map = new LinkedHashMap<>(); - if(map != null) { + if (map != null) { Iterator> i = map.entrySet().iterator(); - while(i.hasNext()) { + while (i.hasNext()) { Entry entry = i.next(); Object value = entry.getValue(); - if(value != null) { + if (value != null) { this.map.put(entry.getKey(), wrap(value)); } } @@ -219,9 +213,8 @@ public JSONObject(Map map) { * "Larry Fine", then the JSONObject will contain * "name": "Larry Fine". * - * @param bean - * An object that has getter methods that should be used to make - * a JSONObject. + * @param bean An object that has getter methods that should be used to make + * a JSONObject. */ public JSONObject(Object bean) { this(); @@ -235,21 +228,19 @@ public JSONObject(Object bean) { * those keys in the object. If a key is not found or not visible, then it * will not be copied into the new JSONObject. * - * @param object - * An object that has fields that should be used to make a - * JSONObject. - * @param names - * An array of strings, the names of the fields to be obtained - * from the object. + * @param object An object that has fields that should be used to make a + * JSONObject. + * @param names An array of strings, the names of the fields to be obtained + * from the object. */ public JSONObject(Object object, String[] names) { this(); Class c = object.getClass(); - for(int i = 0; i < names.length; i += 1) { + for (int i = 0; i < names.length; i += 1) { String name = names[i]; try { this.putOpt(name, c.getField(name).get(object)); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); } } @@ -259,13 +250,11 @@ public JSONObject(Object object, String[] names) { * Construct a JSONObject from a source JSON text string. This is the most * commonly used JSONObject constructor. * - * @param source - * A string beginning with { (left - * brace) and ending with }   - * (right brace). - * @throws JSONException - * If there is a syntax error in the source string or a - * duplicated key. + * @param source A string beginning with { (left + * brace) and ending with }   + * (right brace). + * @throws JSONException If there is a syntax error in the source string or a + * duplicated key. */ public JSONObject(String source) throws JSONException { this(new JSONTokener(source)); @@ -274,12 +263,9 @@ public JSONObject(String source) throws JSONException { /** * Construct a JSONObject from a ResourceBundle. * - * @param baseName - * The ResourceBundle base name. - * @param locale - * The Locale to load the ResourceBundle for. - * @throws JSONException - * If any JSONExceptions are detected. + * @param baseName The ResourceBundle base name. + * @param locale The Locale to load the ResourceBundle for. + * @throws JSONException If any JSONExceptions are detected. */ public JSONObject(String baseName, Locale locale) throws JSONException { this(); @@ -288,9 +274,9 @@ public JSONObject(String baseName, Locale locale) throws JSONException { // Iterate through the keys in the bundle. Enumeration keys = bundle.getKeys(); - while(keys.hasMoreElements()) { + while (keys.hasMoreElements()) { Object key = keys.nextElement(); - if(key != null) { + if (key != null) { // Go through the path, ensuring that there is a nested // JSONObject for each @@ -301,10 +287,10 @@ public JSONObject(String baseName, Locale locale) throws JSONException { String[] path = ((String) key).split("\\."); int last = path.length - 1; JSONObject target = this; - for(int i = 0; i < last; i += 1) { + for (int i = 0; i < last; i += 1) { String segment = path[i]; JSONObject nextTarget = target.optJSONObject(segment); - if(nextTarget == null) { + if (nextTarget == null) { nextTarget = new JSONObject(); target.put(segment, nextTarget); } @@ -319,23 +305,22 @@ public JSONObject(String baseName, Locale locale) throws JSONException { * Produce a string from a double. The string "null" will be returned if the * number is not finite. * - * @param d - * A double. + * @param d A double. * @return A String. */ public static String doubleToString(double d) { - if(Double.isInfinite(d) || Double.isNaN(d)) { + if (Double.isInfinite(d) || Double.isNaN(d)) { return "null"; } // Shave off trailing zeros and decimal point, if possible. String string = Double.toString(d); - if(string.indexOf('.') > 0 && string.indexOf('e') < 0 && string.indexOf('E') < 0) { - while(string.endsWith("0")) { + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 && string.indexOf('E') < 0) { + while (string.endsWith("0")) { string = string.substring(0, string.length() - 1); } - if(string.endsWith(".")) { + if (string.endsWith(".")) { string = string.substring(0, string.length() - 1); } } @@ -349,13 +334,13 @@ public static String doubleToString(double d) { */ public static String[] getNames(JSONObject jo) { int length = jo.length(); - if(length == 0) { + if (length == 0) { return null; } Iterator iterator = jo.keys(); String[] names = new String[length]; int i = 0; - while(iterator.hasNext()) { + while (iterator.hasNext()) { names[i] = iterator.next(); i += 1; } @@ -368,17 +353,17 @@ public static String[] getNames(JSONObject jo) { * @return An array of field names, or null if there are no names. */ public static String[] getNames(Object object) { - if(object == null) { + if (object == null) { return null; } Class klass = object.getClass(); Field[] fields = klass.getFields(); int length = fields.length; - if(length == 0) { + if (length == 0) { return null; } String[] names = new String[length]; - for(int i = 0; i < length; i += 1) { + for (int i = 0; i < length; i += 1) { names[i] = fields[i].getName(); } return names; @@ -387,14 +372,12 @@ public static String[] getNames(Object object) { /** * Produce a string from a Number. * - * @param number - * A Number + * @param number A Number * @return A String. - * @throws JSONException - * If n is a non-finite number. + * @throws JSONException If n is a non-finite number. */ public static String numberToString(Number number) throws JSONException { - if(number == null) { + if (number == null) { throw new JSONException("Null pointer"); } testValidity(number); @@ -402,11 +385,11 @@ public static String numberToString(Number number) throws JSONException { // Shave off trailing zeros and decimal point, if possible. String string = number.toString(); - if(string.indexOf('.') > 0 && string.indexOf('e') < 0 && string.indexOf('E') < 0) { - while(string.endsWith("0")) { + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 && string.indexOf('E') < 0) { + while (string.endsWith("0")) { string = string.substring(0, string.length() - 1); } - if(string.endsWith(".")) { + if (string.endsWith(".")) { string = string.substring(0, string.length() - 1); } } @@ -419,16 +402,15 @@ public static String numberToString(Number number) throws JSONException { * allowing JSON text to be delivered in HTML. In JSON text, a string cannot * contain a control character or an unescaped quote or backslash. * - * @param string - * A String + * @param string A String * @return A String correctly formatted for insertion in a JSON text. */ public static String quote(String string) { StringWriter sw = new StringWriter(); - synchronized(sw.getBuffer()) { + synchronized (sw.getBuffer()) { try { return quote(string, sw).toString(); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); // will never happen - we are writing to a string writer return ""; @@ -437,7 +419,7 @@ public static String quote(String string) { } public static Writer quote(String string, Writer w) throws IOException { - if(string == null || string.length() == 0) { + if (string == null || string.length() == 0) { w.write("\"\""); return w; } @@ -449,17 +431,17 @@ public static Writer quote(String string, Writer w) throws IOException { int len = string.length(); w.write('"'); - for(i = 0; i < len; i += 1) { + for (i = 0; i < len; i += 1) { b = c; c = string.charAt(i); - switch(c) { + switch (c) { case '\\': case '"': w.write('\\'); w.write(c); break; case '/': - if(b == '<') { + if (b == '<') { w.write('\\'); } w.write(c); @@ -480,7 +462,7 @@ public static Writer quote(String string, Writer w) throws IOException { w.write("\\r"); break; default: - if(c < ' ' || (c >= '\u0080' && c < '\u00a0') || (c >= '\u2000' && c < '\u2100')) { + if (c < ' ' || (c >= '\u0080' && c < '\u00a0') || (c >= '\u2000' && c < '\u2100')) { w.write("\\u"); hhhh = Integer.toHexString(c); w.write("0000", 0, 4 - hhhh.length()); @@ -498,22 +480,21 @@ public static Writer quote(String string, Writer w) throws IOException { * Try to convert a string into a number, boolean, or null. If the string * can't be converted, return the string. * - * @param string - * A String. + * @param string A String. * @return A simple JSON value. */ public static Object stringToValue(String string) { Double d; - if(string.equals("")) { + if (string.equals("")) { return string; } - if(string.equalsIgnoreCase("true")) { + if (string.equalsIgnoreCase("true")) { return Boolean.TRUE; } - if(string.equalsIgnoreCase("false")) { + if (string.equalsIgnoreCase("false")) { return Boolean.FALSE; } - if(string.equalsIgnoreCase("null")) { + if (string.equalsIgnoreCase("null")) { return JSONObject.NULL; } @@ -523,24 +504,24 @@ public static Object stringToValue(String string) { */ char b = string.charAt(0); - if((b >= '0' && b <= '9') || b == '-') { + if ((b >= '0' && b <= '9') || b == '-') { try { - if(string.indexOf('.') > -1 || string.indexOf('e') > -1 || string.indexOf('E') > -1) { + if (string.indexOf('.') > -1 || string.indexOf('e') > -1 || string.indexOf('E') > -1) { d = Double.valueOf(string); - if(!d.isInfinite() && !d.isNaN()) { + if (!d.isInfinite() && !d.isNaN()) { return d; } } else { Long myLong = Long.valueOf(string); - if(string.equals(myLong.toString())) { - if(myLong == myLong.intValue()) { + if (string.equals(myLong.toString())) { + if (myLong == myLong.intValue()) { return myLong.intValue(); } else { return myLong; } } } - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); } } @@ -550,19 +531,17 @@ public static Object stringToValue(String string) { /** * Throw an exception if the object is a NaN or infinite number. * - * @param o - * The object to test. - * @throws JSONException - * If o is a non-finite number. + * @param o The object to test. + * @throws JSONException If o is a non-finite number. */ public static void testValidity(Object o) throws JSONException { - if(o != null) { - if(o instanceof Double) { - if(((Double) o).isInfinite() || ((Double) o).isNaN()) { + if (o != null) { + if (o instanceof Double) { + if (((Double) o).isInfinite() || ((Double) o).isNaN()) { throw new JSONException("JSON does not allow non-finite numbers."); } - } else if(o instanceof Float) { - if(((Float) o).isInfinite() || ((Float) o).isNaN()) { + } else if (o instanceof Float) { + if (((Float) o).isInfinite() || ((Float) o).isNaN()) { throw new JSONException("JSON does not allow non-finite numbers."); } } @@ -584,49 +563,47 @@ public static void testValidity(Object o) throws JSONException { *

* Warning: This method assumes that the data structure is acyclical. * - * @param value - * The value to be serialized. + * @param value The value to be serialized. * @return a printable, displayable, transmittable representation of the * object, beginning with { (left * brace) and ending with } (right * brace). - * @throws JSONException - * If the value is or contains an invalid number. + * @throws JSONException If the value is or contains an invalid number. */ public static String valueToString(Object value) throws JSONException { - if(value == null || value.equals(null)) { + if (value == null || value.equals(null)) { return "null"; } - if(value instanceof JSONString) { + if (value instanceof JSONString) { Object object; try { object = ((JSONString) value).toJSONString(); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException(e); } - if(object instanceof String) { + if (object instanceof String) { return (String) object; } throw new JSONException("Bad value from toJSONString: " + object); } - if(value instanceof Number) { + if (value instanceof Number) { return numberToString((Number) value); } - if(value instanceof Boolean || value instanceof JSONObject || value instanceof JSONArray) { + if (value instanceof Boolean || value instanceof JSONObject || value instanceof JSONArray) { return value.toString(); } - if(value instanceof Map) { + if (value instanceof Map) { @SuppressWarnings("unchecked") Map map = (Map) value; return new JSONObject(map).toString(); } - if(value instanceof Collection) { + if (value instanceof Collection) { @SuppressWarnings("unchecked") Collection coll = (Collection) value; return new JSONArray(coll).toString(); } - if(value.getClass().isArray()) { + if (value.getClass().isArray()) { return new JSONArray(value).toString(); } return quote(value.toString()); @@ -640,70 +617,69 @@ public static String valueToString(Object value) throws JSONException { * one of the java packages, turn it into a string. And if it doesn't, try * to wrap it in a JSONObject. If the wrapping fails, then null is returned. * - * @param object - * The object to wrap + * @param object The object to wrap * @return The wrapped value */ public static Object wrap(Object object) { try { - if(object == null) { + if (object == null) { return NULL; } - if(object instanceof JSONObject || object instanceof JSONArray || NULL.equals(object) || object instanceof JSONString || object instanceof Byte || object instanceof Character || object instanceof Short || object instanceof Integer || object instanceof Long || object instanceof Boolean || object instanceof Float || object instanceof Double || object instanceof String || object instanceof BigInteger || object instanceof BigDecimal) { + if (object instanceof JSONObject || object instanceof JSONArray || NULL.equals(object) || object instanceof JSONString || object instanceof Byte || object instanceof Character || object instanceof Short || object instanceof Integer || object instanceof Long || object instanceof Boolean || object instanceof Float || object instanceof Double || object instanceof String || object instanceof BigInteger || object instanceof BigDecimal) { return object; } - if(object instanceof Collection) { + if (object instanceof Collection) { @SuppressWarnings("unchecked") Collection coll = (Collection) object; return new JSONArray(coll); } - if(object.getClass().isArray()) { + if (object.getClass().isArray()) { return new JSONArray(object); } - if(object instanceof Map) { + if (object instanceof Map) { @SuppressWarnings("unchecked") Map map = (Map) object; return new JSONObject(map); } Package objectPackage = object.getClass().getPackage(); String objectPackageName = objectPackage != null ? objectPackage.getName() : ""; - if(objectPackageName.startsWith("java.") || objectPackageName.startsWith("javax.") || object.getClass().getClassLoader() == null) { + if (objectPackageName.startsWith("java.") || objectPackageName.startsWith("javax.") || object.getClass().getClassLoader() == null) { return object.toString(); } return new JSONObject(object); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return null; } } static final Writer writeValue(Writer writer, Object value, int indentFactor, int indent) throws JSONException, IOException { - if(value == null || value.equals(null)) { + if (value == null || value.equals(null)) { writer.write("null"); - } else if(value instanceof JSONObject) { + } else if (value instanceof JSONObject) { ((JSONObject) value).write(writer, indentFactor, indent); - } else if(value instanceof JSONArray) { + } else if (value instanceof JSONArray) { ((JSONArray) value).write(writer, indentFactor, indent); - } else if(value instanceof Map) { + } else if (value instanceof Map) { @SuppressWarnings("unchecked") Map map = (Map) value; new JSONObject(map).write(writer, indentFactor, indent); - } else if(value instanceof Collection) { + } else if (value instanceof Collection) { @SuppressWarnings("unchecked") Collection coll = (Collection) value; new JSONArray(coll).write(writer, indentFactor, indent); - } else if(value.getClass().isArray()) { + } else if (value.getClass().isArray()) { new JSONArray(value).write(writer, indentFactor, indent); - } else if(value instanceof Number) { + } else if (value instanceof Number) { writer.write(numberToString((Number) value)); - } else if(value instanceof Boolean) { + } else if (value instanceof Boolean) { writer.write(value.toString()); - } else if(value instanceof JSONString) { + } else if (value instanceof JSONString) { Object o; try { o = ((JSONString) value).toJSONString(); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException(e); } @@ -715,7 +691,7 @@ static final Writer writeValue(Writer writer, Object value, int indentFactor, in } static final void indent(Writer writer, int indent) throws IOException { - for(int i = 0; i < indent; i += 1) { + for (int i = 0; i < indent; i += 1) { writer.write(' '); } } @@ -731,20 +707,17 @@ static final void indent(Writer writer, int indent) throws IOException { * will be the same as using put. But if multiple values are accumulated, * then the result will be like append. * - * @param key - * A key string. - * @param value - * An object to be accumulated under the key. + * @param key A key string. + * @param value An object to be accumulated under the key. * @return this. - * @throws JSONException - * If the value is an invalid number or if the key is null. + * @throws JSONException If the value is an invalid number or if the key is null. */ public JSONObject accumulate(String key, Object value) throws JSONException { testValidity(value); Object object = this.opt(key); - if(object == null) { + if (object == null) { this.put(key, value instanceof JSONArray ? new JSONArray().put(value) : value); - } else if(object instanceof JSONArray) { + } else if (object instanceof JSONArray) { ((JSONArray) object).put(value); } else { this.put(key, new JSONArray().put(object).put(value)); @@ -758,21 +731,18 @@ public JSONObject accumulate(String key, Object value) throws JSONException { * JSONArray containing the value parameter. If the key was already * associated with a JSONArray, then the value parameter is appended to it. * - * @param key - * A key string. - * @param value - * An object to be accumulated under the key. + * @param key A key string. + * @param value An object to be accumulated under the key. * @return this. - * @throws JSONException - * If the key is null or if the current value associated with - * the key is not a JSONArray. + * @throws JSONException If the key is null or if the current value associated with + * the key is not a JSONArray. */ public JSONObject append(String key, Object value) throws JSONException { testValidity(value); Object object = this.opt(key); - if(object == null) { + if (object == null) { this.put(key, new JSONArray().put(value)); - } else if(object instanceof JSONArray) { + } else if (object instanceof JSONArray) { this.put(key, ((JSONArray) object).put(value)); } else { throw new JSONException("JSONObject[" + key + "] is not a JSONArray."); @@ -783,18 +753,16 @@ public JSONObject append(String key, Object value) throws JSONException { /** * Get the value object associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return The object associated with the key. - * @throws JSONException - * if the key is not found. + * @throws JSONException if the key is not found. */ public Object get(String key) throws JSONException { - if(key == null) { + if (key == null) { throw new JSONException("Null key."); } Object object = this.opt(key); - if(object == null) { + if (object == null) { throw new JSONException("JSONObject[" + quote(key) + "] not found."); } return object; @@ -803,18 +771,15 @@ public Object get(String key) throws JSONException { /** * Get the enum value associated with a key. * - * @param clazz - * The type of enum to retrieve. - * @param key - * A key string. + * @param clazz The type of enum to retrieve. + * @param key A key string. * @return The enum value associated with the key - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to an enum. + * @throws JSONException if the key is not found or if the value cannot be converted + * to an enum. */ public > E getEnum(Class clazz, String key) throws JSONException { E val = optEnum(clazz, key); - if(val == null) { + if (val == null) { // JSONException should really take a throwable argument. // If it did, I would re-implement this with the Enum.valueOf // method and place any thrown exception in the JSONException @@ -826,18 +791,16 @@ public > E getEnum(Class clazz, String key) throws JSONExce /** * Get the boolean value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return The truth. - * @throws JSONException - * if the value is not a Boolean or the String "true" or - * "false". + * @throws JSONException if the value is not a Boolean or the String "true" or + * "false". */ public boolean getBoolean(String key) throws JSONException { Object object = this.get(key); - if(object.equals(Boolean.FALSE) || (object instanceof String && ((String) object).equalsIgnoreCase("false"))) { + if (object.equals(Boolean.FALSE) || (object instanceof String && ((String) object).equalsIgnoreCase("false"))) { return false; - } else if(object.equals(Boolean.TRUE) || (object instanceof String && ((String) object).equalsIgnoreCase("true"))) { + } else if (object.equals(Boolean.TRUE) || (object instanceof String && ((String) object).equalsIgnoreCase("true"))) { return true; } throw new JSONException("JSONObject[" + quote(key) + "] is not a Boolean."); @@ -846,18 +809,16 @@ public boolean getBoolean(String key) throws JSONException { /** * Get the BigInteger value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to BigInteger. + * @throws JSONException if the key is not found or if the value cannot be converted + * to BigInteger. */ public BigInteger getBigInteger(String key) throws JSONException { Object object = this.get(key); try { return new BigInteger(object.toString()); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONObject[" + quote(key) + "] could not be converted to BigInteger."); } @@ -866,18 +827,16 @@ public BigInteger getBigInteger(String key) throws JSONException { /** * Get the BigDecimal value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to BigDecimal. + * @throws JSONException if the key is not found or if the value cannot be converted + * to BigDecimal. */ public BigDecimal getBigDecimal(String key) throws JSONException { Object object = this.get(key); try { return new BigDecimal(object.toString()); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONObject[" + quote(key) + "] could not be converted to BigDecimal."); } @@ -886,18 +845,16 @@ public BigDecimal getBigDecimal(String key) throws JSONException { /** * Get the double value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value is not a Number - * object and cannot be converted to a number. + * @throws JSONException if the key is not found or if the value is not a Number + * object and cannot be converted to a number. */ public double getDouble(String key) throws JSONException { Object object = this.get(key); try { return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble((String) object); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONObject[" + quote(key) + "] is not a number."); } @@ -906,18 +863,16 @@ public double getDouble(String key) throws JSONException { /** * Get the int value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return The integer value. - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to an integer. + * @throws JSONException if the key is not found or if the value cannot be converted + * to an integer. */ public int getInt(String key) throws JSONException { Object object = this.get(key); try { return object instanceof Number ? ((Number) object).intValue() : Integer.parseInt((String) object); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONObject[" + quote(key) + "] is not an int."); } @@ -926,15 +881,13 @@ public int getInt(String key) throws JSONException { /** * Get the JSONArray value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return A JSONArray which is the value. - * @throws JSONException - * if the key is not found or if the value is not a JSONArray. + * @throws JSONException if the key is not found or if the value is not a JSONArray. */ public JSONArray getJSONArray(String key) throws JSONException { Object object = this.get(key); - if(object instanceof JSONArray) { + if (object instanceof JSONArray) { return (JSONArray) object; } throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONArray."); @@ -943,15 +896,13 @@ public JSONArray getJSONArray(String key) throws JSONException { /** * Get the JSONObject value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return A JSONObject which is the value. - * @throws JSONException - * if the key is not found or if the value is not a JSONObject. + * @throws JSONException if the key is not found or if the value is not a JSONObject. */ public JSONObject getJSONObject(String key) throws JSONException { Object object = this.get(key); - if(object instanceof JSONObject) { + if (object instanceof JSONObject) { return (JSONObject) object; } throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONObject."); @@ -960,18 +911,16 @@ public JSONObject getJSONObject(String key) throws JSONException { /** * Get the long value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return The long value. - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to a long. + * @throws JSONException if the key is not found or if the value cannot be converted + * to a long. */ public long getLong(String key) throws JSONException { Object object = this.get(key); try { return object instanceof Number ? ((Number) object).longValue() : Long.parseLong((String) object); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); throw new JSONException("JSONObject[" + quote(key) + "] is not a long."); } @@ -980,15 +929,13 @@ public long getLong(String key) throws JSONException { /** * Get the string associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return A string which is the value. - * @throws JSONException - * if there is no string value for the key. + * @throws JSONException if there is no string value for the key. */ public String getString(String key) throws JSONException { Object object = this.get(key); - if(object instanceof String) { + if (object instanceof String) { return (String) object; } throw new JSONException("JSONObject[" + quote(key) + "] not a string."); @@ -997,8 +944,7 @@ public String getString(String key) throws JSONException { /** * Determine if the JSONObject contains a specific key. * - * @param key - * A key string. + * @param key A key string. * @return true if the key exists in the JSONObject. */ public boolean has(String key) { @@ -1010,28 +956,26 @@ public boolean has(String key) { * create one with a value of 1. If there is such a property, and if it is * an Integer, Long, Double, or Float, then add one to it. * - * @param key - * A key string. + * @param key A key string. * @return this. - * @throws JSONException - * If there is already a property with this name that is not an - * Integer, Long, Double, or Float. + * @throws JSONException If there is already a property with this name that is not an + * Integer, Long, Double, or Float. */ public JSONObject increment(String key) throws JSONException { Object value = this.opt(key); - if(value == null) { + if (value == null) { this.put(key, 1); - } else if(value instanceof BigInteger) { + } else if (value instanceof BigInteger) { this.put(key, ((BigInteger) value).add(BigInteger.ONE)); - } else if(value instanceof BigDecimal) { + } else if (value instanceof BigDecimal) { this.put(key, ((BigDecimal) value).add(BigDecimal.ONE)); - } else if(value instanceof Integer) { + } else if (value instanceof Integer) { this.put(key, (Integer) value + 1); - } else if(value instanceof Long) { + } else if (value instanceof Long) { this.put(key, (Long) value + 1); - } else if(value instanceof Double) { + } else if (value instanceof Double) { this.put(key, (Double) value + 1); - } else if(value instanceof Float) { + } else if (value instanceof Float) { this.put(key, (Float) value + 1); } else { throw new JSONException("Unable to increment [" + quote(key) + "]."); @@ -1043,8 +987,7 @@ public JSONObject increment(String key) throws JSONException { * Determine if the value associated with the key is null or if there is no * value. * - * @param key - * A key string. + * @param key A key string. * @return true if there is no value associated with the key or if the value * is the JSONObject.NULL object. */ @@ -1089,7 +1032,7 @@ public int length() { public JSONArray names() { JSONArray ja = new JSONArray(); Iterator keys = this.keys(); - while(keys.hasNext()) { + while (keys.hasNext()) { ja.put(keys.next()); } return ja.length() == 0 ? null : ja; @@ -1098,8 +1041,7 @@ public JSONArray names() { /** * Get an optional value associated with a key. * - * @param key - * A key string. + * @param key A key string. * @return An object which is the value, or null if there is no value. */ public Object opt(String key) { @@ -1109,10 +1051,8 @@ public Object opt(String key) { /** * Get the enum value associated with a key. * - * @param clazz - * The type of enum to retrieve. - * @param key - * A key string. + * @param clazz The type of enum to retrieve. + * @param key A key string. * @return The enum value associated with the key or null if not found */ public > E optEnum(Class clazz, String key) { @@ -1122,32 +1062,29 @@ public > E optEnum(Class clazz, String key) { /** * Get the enum value associated with a key. * - * @param clazz - * The type of enum to retrieve. - * @param key - * A key string. - * @param defaultValue - * The default in case the value is not found + * @param clazz The type of enum to retrieve. + * @param key A key string. + * @param defaultValue The default in case the value is not found * @return The enum value associated with the key or defaultValue if the * value is not found or cannot be assigned to clazz */ public > E optEnum(Class clazz, String key, E defaultValue) { try { Object val = this.opt(key); - if(NULL.equals(val)) { + if (NULL.equals(val)) { return defaultValue; } - if(clazz.isAssignableFrom(val.getClass())) { + if (clazz.isAssignableFrom(val.getClass())) { // we just checked it! @SuppressWarnings("unchecked") E myE = (E) val; return myE; } return Enum.valueOf(clazz, val.toString()); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { Iris.reportError(e); return defaultValue; - } catch(NullPointerException e) { + } catch (NullPointerException e) { Iris.reportError(e); return defaultValue; } @@ -1157,8 +1094,7 @@ public > E optEnum(Class clazz, String key, E defaultValue) * Get an optional boolean associated with a key. It returns false if there * is no such key, or if the value is not Boolean.TRUE or the String "true". * - * @param key - * A key string. + * @param key A key string. * @return The truth. */ public boolean optBoolean(String key) { @@ -1170,16 +1106,14 @@ public boolean optBoolean(String key) { * defaultValue if there is no such key, or if it is not a Boolean or the * String "true" or "false" (case insensitive). * - * @param key - * A key string. - * @param defaultValue - * The default. + * @param key A key string. + * @param defaultValue The default. * @return The truth. */ public boolean optBoolean(String key, boolean defaultValue) { try { return this.getBoolean(key); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -1190,8 +1124,7 @@ public boolean optBoolean(String key, boolean defaultValue) { * key or if its value is not a number. If the value is a string, an attempt * will be made to evaluate it as a number. * - * @param key - * A string which is the key. + * @param key A string which is the key. * @return An object which is the value. */ public double optDouble(String key) { @@ -1203,16 +1136,14 @@ public double optDouble(String key) { * there is no such key or if its value is not a number. If the value is a * string, an attempt will be made to evaluate it as a number. * - * @param key - * A key string. - * @param defaultValue - * The default. + * @param key A key string. + * @param defaultValue The default. * @return An object which is the value. */ public BigInteger optBigInteger(String key, BigInteger defaultValue) { try { return this.getBigInteger(key); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -1223,16 +1154,14 @@ public BigInteger optBigInteger(String key, BigInteger defaultValue) { * there is no such key or if its value is not a number. If the value is a * string, an attempt will be made to evaluate it as a number. * - * @param key - * A key string. - * @param defaultValue - * The default. + * @param key A key string. + * @param defaultValue The default. * @return An object which is the value. */ public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) { try { return this.getBigDecimal(key); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -1243,16 +1172,14 @@ public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) { * there is no such key or if its value is not a number. If the value is a * string, an attempt will be made to evaluate it as a number. * - * @param key - * A key string. - * @param defaultValue - * The default. + * @param key A key string. + * @param defaultValue The default. * @return An object which is the value. */ public double optDouble(String key, double defaultValue) { try { return this.getDouble(key); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -1263,8 +1190,7 @@ public double optDouble(String key, double defaultValue) { * such key or if the value is not a number. If the value is a string, an * attempt will be made to evaluate it as a number. * - * @param key - * A key string. + * @param key A key string. * @return An object which is the value. */ public int optInt(String key) { @@ -1276,16 +1202,14 @@ public int optInt(String key) { * is no such key or if the value is not a number. If the value is a string, * an attempt will be made to evaluate it as a number. * - * @param key - * A key string. - * @param defaultValue - * The default. + * @param key A key string. + * @param defaultValue The default. * @return An object which is the value. */ public int optInt(String key, int defaultValue) { try { return this.getInt(key); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -1295,8 +1219,7 @@ public int optInt(String key, int defaultValue) { * Get an optional JSONArray associated with a key. It returns null if there * is no such key, or if its value is not a JSONArray. * - * @param key - * A key string. + * @param key A key string. * @return A JSONArray which is the value. */ public JSONArray optJSONArray(String key) { @@ -1308,8 +1231,7 @@ public JSONArray optJSONArray(String key) { * Get an optional JSONObject associated with a key. It returns null if * there is no such key, or if its value is not a JSONObject. * - * @param key - * A key string. + * @param key A key string. * @return A JSONObject which is the value. */ public JSONObject optJSONObject(String key) { @@ -1322,8 +1244,7 @@ public JSONObject optJSONObject(String key) { * such key or if the value is not a number. If the value is a string, an * attempt will be made to evaluate it as a number. * - * @param key - * A key string. + * @param key A key string. * @return An object which is the value. */ public long optLong(String key) { @@ -1335,16 +1256,14 @@ public long optLong(String key) { * is no such key or if the value is not a number. If the value is a string, * an attempt will be made to evaluate it as a number. * - * @param key - * A key string. - * @param defaultValue - * The default. + * @param key A key string. + * @param defaultValue The default. * @return An object which is the value. */ public long optLong(String key, long defaultValue) { try { return this.getLong(key); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return defaultValue; } @@ -1355,8 +1274,7 @@ public long optLong(String key, long defaultValue) { * if there is no such key. If the value is not a string and is not null, * then it is converted to a string. * - * @param key - * A key string. + * @param key A key string. * @return A string which is the value. */ public String optString(String key) { @@ -1367,10 +1285,8 @@ public String optString(String key) { * Get an optional string associated with a key. It returns the defaultValue * if there is no such key. * - * @param key - * A key string. - * @param defaultValue - * The default. + * @param key A key string. + * @param defaultValue The default. * @return A string which is the value. */ public String optString(String key, String defaultValue) { @@ -1386,35 +1302,35 @@ private void populateMap(Object bean) { boolean includeSuperClass = klass.getClassLoader() != null; Method[] methods = includeSuperClass ? klass.getMethods() : klass.getDeclaredMethods(); - for(int i = 0; i < methods.length; i += 1) { + for (int i = 0; i < methods.length; i += 1) { try { Method method = methods[i]; - if(Modifier.isPublic(method.getModifiers())) { + if (Modifier.isPublic(method.getModifiers())) { String name = method.getName(); String key = ""; - if(name.startsWith("get")) { - if("getClass".equals(name) || "getDeclaringClass".equals(name)) { + if (name.startsWith("get")) { + if ("getClass".equals(name) || "getDeclaringClass".equals(name)) { key = ""; } else { key = name.substring(3); } - } else if(name.startsWith("is")) { + } else if (name.startsWith("is")) { key = name.substring(2); } - if(key.length() > 0 && Character.isUpperCase(key.charAt(0)) && method.getParameterTypes().length == 0) { - if(key.length() == 1) { + if (key.length() > 0 && Character.isUpperCase(key.charAt(0)) && method.getParameterTypes().length == 0) { + if (key.length() == 1) { key = key.toLowerCase(); - } else if(!Character.isUpperCase(key.charAt(1))) { + } else if (!Character.isUpperCase(key.charAt(1))) { key = key.substring(0, 1).toLowerCase() + key.substring(1); } Object result = method.invoke(bean, (Object[]) null); - if(result != null) { + if (result != null) { this.map.put(key, wrap(result)); } } } - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); } } @@ -1423,13 +1339,10 @@ private void populateMap(Object bean) { /** * Put a key/boolean pair in the JSONObject. * - * @param key - * A key string. - * @param value - * A boolean which is the value. + * @param key A key string. + * @param value A boolean which is the value. * @return this. - * @throws JSONException - * If the key is null. + * @throws JSONException If the key is null. */ public JSONObject put(String key, boolean value) throws JSONException { this.put(key, value ? Boolean.TRUE : Boolean.FALSE); @@ -1440,10 +1353,8 @@ public JSONObject put(String key, boolean value) throws JSONException { * Put a key/value pair in the JSONObject, where the value will be a * JSONArray which is produced from a Collection. * - * @param key - * A key string. - * @param value - * A Collection value. + * @param key A key string. + * @param value A Collection value. * @return this. */ public JSONObject put(String key, Collection value) throws JSONException { @@ -1454,13 +1365,10 @@ public JSONObject put(String key, Collection value) throws JSONException /** * Put a key/double pair in the JSONObject. * - * @param key - * A key string. - * @param value - * A double which is the value. + * @param key A key string. + * @param value A double which is the value. * @return this. - * @throws JSONException - * If the key is null or if the number is invalid. + * @throws JSONException If the key is null or if the number is invalid. */ public JSONObject put(String key, double value) throws JSONException { this.put(key, Double.valueOf(value)); @@ -1470,13 +1378,10 @@ public JSONObject put(String key, double value) throws JSONException { /** * Put a key/int pair in the JSONObject. * - * @param key - * A key string. - * @param value - * An int which is the value. + * @param key A key string. + * @param value An int which is the value. * @return this. - * @throws JSONException - * If the key is null. + * @throws JSONException If the key is null. */ public JSONObject put(String key, int value) throws JSONException { this.put(key, Integer.valueOf(value)); @@ -1486,13 +1391,10 @@ public JSONObject put(String key, int value) throws JSONException { /** * Put a key/long pair in the JSONObject. * - * @param key - * A key string. - * @param value - * A long which is the value. + * @param key A key string. + * @param value A long which is the value. * @return this. - * @throws JSONException - * If the key is null. + * @throws JSONException If the key is null. */ public JSONObject put(String key, long value) throws JSONException { this.put(key, Long.valueOf(value)); @@ -1503,10 +1405,8 @@ public JSONObject put(String key, long value) throws JSONException { * Put a key/value pair in the JSONObject, where the value will be a * JSONObject which is produced from a Map. * - * @param key - * A key string. - * @param value - * A Map value. + * @param key A key string. + * @param value A Map value. * @return this. */ public JSONObject put(String key, Map value) throws JSONException { @@ -1518,21 +1418,18 @@ public JSONObject put(String key, Map value) throws JSONExceptio * Put a key/value pair in the JSONObject. If the value is null, then the * key will be removed from the JSONObject if it is present. * - * @param key - * A key string. - * @param value - * An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, - * String, or the JSONObject.NULL object. + * @param key A key string. + * @param value An object which is the value. It should be of one of these + * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + * String, or the JSONObject.NULL object. * @return this. - * @throws JSONException - * If the value is non-finite number or if the key is null. + * @throws JSONException If the value is non-finite number or if the key is null. */ public JSONObject put(String key, Object value) throws JSONException { - if(key == null) { + if (key == null) { throw new NullPointerException("Null key."); } - if(value != null) { + if (value != null) { testValidity(value); this.map.put(key, value); } else { @@ -1546,17 +1443,14 @@ public JSONObject put(String key, Object value) throws JSONException { * are both non-null, and only if there is not already a member with that * name. * - * @param key - * string - * @param value - * object + * @param key string + * @param value object * @return this. - * @throws JSONException - * if the key is a duplicate + * @throws JSONException if the key is a duplicate */ public JSONObject putOnce(String key, Object value) throws JSONException { - if(key != null && value != null) { - if(this.opt(key) != null) { + if (key != null && value != null) { + if (this.opt(key) != null) { throw new JSONException("Duplicate key \"" + key + "\""); } this.put(key, value); @@ -1568,18 +1462,15 @@ public JSONObject putOnce(String key, Object value) throws JSONException { * Put a key/value pair in the JSONObject, but only if the key and the value * are both non-null. * - * @param key - * A key string. - * @param value - * An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, - * String, or the JSONObject.NULL object. + * @param key A key string. + * @param value An object which is the value. It should be of one of these + * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + * String, or the JSONObject.NULL object. * @return this. - * @throws JSONException - * If the value is a non-finite number. + * @throws JSONException If the value is a non-finite number. */ public JSONObject putOpt(String key, Object value) throws JSONException { - if(key != null && value != null) { + if (key != null && value != null) { this.put(key, value); } return this; @@ -1588,8 +1479,7 @@ public JSONObject putOpt(String key, Object value) throws JSONException { /** * Remove a name and its value, if present. * - * @param key - * The name to be removed. + * @param key The name to be removed. * @return The value that was associated with the name, or null if there was * no value. */ @@ -1601,39 +1491,38 @@ public Object remove(String key) { * Determine if two JSONObjects are similar. They must contain the same set * of names which must be associated with similar values. * - * @param other - * The other JSONObject + * @param other The other JSONObject * @return true if they are equal */ @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean similar(Object other) { try { - if(!(other instanceof JSONObject)) { + if (!(other instanceof JSONObject)) { return false; } Set set = this.keySet(); - if(!set.equals(((JSONObject) other).keySet())) { + if (!set.equals(((JSONObject) other).keySet())) { return false; } Iterator iterator = set.iterator(); - while(iterator.hasNext()) { + while (iterator.hasNext()) { String name = iterator.next(); Object valueThis = this.get(name); Object valueOther = ((JSONObject) other).get(name); - if(valueThis instanceof JSONObject) { - if(!((JSONObject) valueThis).similar(valueOther)) { + if (valueThis instanceof JSONObject) { + if (!((JSONObject) valueThis).similar(valueOther)) { return false; } - } else if(valueThis instanceof JSONArray) { - if(!((JSONArray) valueThis).similar(valueOther)) { + } else if (valueThis instanceof JSONArray) { + if (!((JSONArray) valueThis).similar(valueOther)) { return false; } - } else if(!valueThis.equals(valueOther)) { + } else if (!valueThis.equals(valueOther)) { return false; } } return true; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); return false; } @@ -1643,19 +1532,17 @@ public boolean similar(Object other) { * Produce a JSONArray containing the values of the members of this * JSONObject. * - * @param names - * A JSONArray containing a list of key strings. This determines - * the sequence of the values in the result. + * @param names A JSONArray containing a list of key strings. This determines + * the sequence of the values in the result. * @return A JSONArray of values. - * @throws JSONException - * If any of the values are non-finite numbers. + * @throws JSONException If any of the values are non-finite numbers. */ public JSONArray toJSONArray(JSONArray names) throws JSONException { - if(names == null || names.length() == 0) { + if (names == null || names.length() == 0) { return null; } JSONArray ja = new JSONArray(); - for(int i = 0; i < names.length(); i += 1) { + for (int i = 0; i < names.length(); i += 1) { ja.put(this.opt(names.getString(i))); } return ja; @@ -1676,7 +1563,7 @@ public JSONArray toJSONArray(JSONArray names) throws JSONException { public String toString() { try { return this.toString(0); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); return null; } @@ -1687,18 +1574,16 @@ public String toString() { *

* Warning: This method assumes that the data structure is acyclical. * - * @param indentFactor - * The number of spaces to add to each level of indentation. + * @param indentFactor The number of spaces to add to each level of indentation. * @return a printable, displayable, portable, transmittable representation * of the object, beginning with { (left * brace) and ending with } (right * brace). - * @throws JSONException - * If the object contains an invalid number. + * @throws JSONException If the object contains an invalid number. */ public String toString(int indentFactor) throws JSONException { StringWriter w = new StringWriter(); - synchronized(w.getBuffer()) { + synchronized (w.getBuffer()) { return this.write(w, indentFactor, 0).toString(); } } @@ -1730,41 +1615,41 @@ Writer write(Writer writer, int indentFactor, int indent) throws JSONException { Iterator keys = this.keys(); writer.write('{'); - if(length == 1) { + if (length == 1) { Object key = keys.next(); writer.write(quote(key.toString())); writer.write(':'); - if(indentFactor > 0) { + if (indentFactor > 0) { writer.write(' '); } writeValue(writer, this.map.get(key), indentFactor, indent); - } else if(length != 0) { + } else if (length != 0) { final int newindent = indent + indentFactor; - while(keys.hasNext()) { + while (keys.hasNext()) { Object key = keys.next(); - if(commanate) { + if (commanate) { writer.write(','); } - if(indentFactor > 0) { + if (indentFactor > 0) { writer.write('\n'); } indent(writer, newindent); writer.write(quote(key.toString())); writer.write(':'); - if(indentFactor > 0) { + if (indentFactor > 0) { writer.write(' '); } writeValue(writer, this.map.get(key), indentFactor, newindent); commanate = true; } - if(indentFactor > 0) { + if (indentFactor > 0) { writer.write('\n'); } indent(writer, indent); } writer.write('}'); return writer; - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); throw new JSONException(e); } @@ -1791,8 +1676,7 @@ protected final Object clone() { /** * A Null object is equal to the null value and to itself. * - * @param object - * An object to test for nullness. + * @param object An object to test for nullness. * @return true if the object parameter is the JSONObject.NULL object or * null. */ diff --git a/src/main/java/com/volmit/iris/util/json/JSONTokener.java b/src/main/java/com/volmit/iris/util/json/JSONTokener.java index 08b29a00f..6049a4d1b 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONTokener.java +++ b/src/main/java/com/volmit/iris/util/json/JSONTokener.java @@ -45,8 +45,7 @@ public class JSONTokener { /** * Construct a JSONTokener from a Reader. * - * @param reader - * A reader. + * @param reader A reader. */ public JSONTokener(Reader reader) { this.reader = reader.markSupported() ? reader : new BufferedReader(reader); @@ -61,8 +60,7 @@ public JSONTokener(Reader reader) { /** * Construct a JSONTokener from an InputStream. * - * @param inputStream - * The source. + * @param inputStream The source. */ public JSONTokener(InputStream inputStream) throws JSONException { this(new InputStreamReader(inputStream)); @@ -71,8 +69,7 @@ public JSONTokener(InputStream inputStream) throws JSONException { /** * Construct a JSONTokener from a string. * - * @param s - * A source string. + * @param s A source string. */ public JSONTokener(String s) { this(new StringReader(s)); @@ -81,19 +78,18 @@ public JSONTokener(String s) { /** * Get the hex value of a character (base16). * - * @param c - * A character between '0' and '9' or between 'A' and 'F' or - * between 'a' and 'f'. + * @param c A character between '0' and '9' or between 'A' and 'F' or + * between 'a' and 'f'. * @return An int between 0 and 15, or -1 if c was not a hex digit. */ public static int dehexchar(char c) { - if(c >= '0' && c <= '9') { + if (c >= '0' && c <= '9') { return c - '0'; } - if(c >= 'A' && c <= 'F') { + if (c >= 'A' && c <= 'F') { return c - ('A' - 10); } - if(c >= 'a' && c <= 'f') { + if (c >= 'a' && c <= 'f') { return c - ('a' - 10); } return -1; @@ -105,7 +101,7 @@ public static int dehexchar(char c) { * next number or identifier. */ public void back() throws JSONException { - if(this.usePrevious || this.index <= 0) { + if (this.usePrevious || this.index <= 0) { throw new JSONException("Stepping back two steps is not supported"); } this.index -= 1; @@ -126,7 +122,7 @@ public boolean end() { */ public boolean more() throws JSONException { this.next(); - if(this.end()) { + if (this.end()) { return false; } this.back(); @@ -140,27 +136,27 @@ public boolean more() throws JSONException { */ public char next() throws JSONException { int c; - if(this.usePrevious) { + if (this.usePrevious) { this.usePrevious = false; c = this.previous; } else { try { c = this.reader.read(); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); throw new JSONException(e); } - if(c <= 0) { // End of stream + if (c <= 0) { // End of stream this.eof = true; c = 0; } } this.index += 1; - if(this.previous == '\r') { + if (this.previous == '\r') { this.line += 1; this.character = c == '\n' ? 0 : 1; - } else if(c == '\n') { + } else if (c == '\n') { this.line += 1; this.character = 0; } else { @@ -174,15 +170,13 @@ public char next() throws JSONException { * Consume the next character, and check that it matches a specified * character. * - * @param c - * The character to match. + * @param c The character to match. * @return The character. - * @throws JSONException - * if the character does not match. + * @throws JSONException if the character does not match. */ public char next(char c) throws JSONException { char n = this.next(); - if(n != c) { + if (n != c) { throw this.syntaxError("Expected '" + c + "' and instead saw '" + n + "'"); } return n; @@ -191,24 +185,22 @@ public char next(char c) throws JSONException { /** * Get the next n characters. * - * @param n - * The number of characters to take. + * @param n The number of characters to take. * @return A string of n characters. - * @throws JSONException - * Substring bounds error if there are not n characters - * remaining in the source string. + * @throws JSONException Substring bounds error if there are not n characters + * remaining in the source string. */ public String next(int n) throws JSONException { - if(n == 0) { + if (n == 0) { return ""; } char[] chars = new char[n]; int pos = 0; - while(pos < n) { + while (pos < n) { chars[pos] = this.next(); - if(this.end()) { + if (this.end()) { throw this.syntaxError("Substring bounds error"); } pos += 1; @@ -222,9 +214,9 @@ public String next(int n) throws JSONException { * @return A character, or 0 if there are no more characters. */ public char nextClean() throws JSONException { - for(; ; ) { + for (; ; ) { char c = this.next(); - if(c == 0 || c > ' ') { + if (c == 0 || c > ' ') { return c; } } @@ -235,27 +227,25 @@ public char nextClean() throws JSONException { * processing is done. The formal JSON format does not allow strings in * single quotes, but an implementation is allowed to accept them. * - * @param quote - * The quoting character, either "  - * (double quote) or '  - * (single quote). + * @param quote The quoting character, either "  + * (double quote) or '  + * (single quote). * @return A String. - * @throws JSONException - * Unterminated string. + * @throws JSONException Unterminated string. */ public String nextString(char quote) throws JSONException { char c; StringBuilder sb = new StringBuilder(); - for(; ; ) { + for (; ; ) { c = this.next(); - switch(c) { + switch (c) { case 0: case '\n': case '\r': throw this.syntaxError("Unterminated string"); case '\\': c = this.next(); - switch(c) { + switch (c) { case 'b': sb.append('\b'); break; @@ -285,7 +275,7 @@ public String nextString(char quote) throws JSONException { } break; default: - if(c == quote) { + if (c == quote) { return sb.toString(); } sb.append(c); @@ -297,16 +287,15 @@ public String nextString(char quote) throws JSONException { * Get the text up but not including the specified character or the end of * line, whichever comes first. * - * @param delimiter - * A delimiter character. + * @param delimiter A delimiter character. * @return A string. */ public String nextTo(char delimiter) throws JSONException { StringBuilder sb = new StringBuilder(); - for(; ; ) { + for (; ; ) { char c = this.next(); - if(c == delimiter || c == 0 || c == '\n' || c == '\r') { - if(c != 0) { + if (c == delimiter || c == 0 || c == '\n' || c == '\r') { + if (c != 0) { this.back(); } return sb.toString().trim(); @@ -319,17 +308,16 @@ public String nextTo(char delimiter) throws JSONException { * Get the text up but not including one of the specified delimiter * characters or the end of line, whichever comes first. * - * @param delimiters - * A set of delimiter characters. + * @param delimiters A set of delimiter characters. * @return A string, trimmed. */ public String nextTo(String delimiters) throws JSONException { char c; StringBuilder sb = new StringBuilder(); - for(; ; ) { + for (; ; ) { c = this.next(); - if(delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r') { - if(c != 0) { + if (delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r') { + if (c != 0) { this.back(); } return sb.toString().trim(); @@ -343,14 +331,13 @@ public String nextTo(String delimiters) throws JSONException { * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object. * * @return An object. - * @throws JSONException - * If syntax error. + * @throws JSONException If syntax error. */ public Object nextValue() throws JSONException { char c = this.nextClean(); String string; - switch(c) { + switch (c) { case '"': case '\'': return this.nextString(c); @@ -372,14 +359,14 @@ public Object nextValue() throws JSONException { */ StringBuilder sb = new StringBuilder(); - while(c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) { + while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) { sb.append(c); c = this.next(); } this.back(); string = sb.toString().trim(); - if("".equals(string)) { + if ("".equals(string)) { throw this.syntaxError("Missing value"); } return JSONObject.stringToValue(string); @@ -389,8 +376,7 @@ public Object nextValue() throws JSONException { * Skip characters until the next character is the requested character. If * the requested character is not found, no characters are skipped. * - * @param to - * A character to skip to. + * @param to A character to skip to. * @return The requested character, or zero if the requested character is * not found. */ @@ -403,15 +389,15 @@ public char skipTo(char to) throws JSONException { this.reader.mark(1000000); do { c = this.next(); - if(c == 0) { + if (c == 0) { this.reader.reset(); this.index = startIndex; this.character = startCharacter; this.line = startLine; return c; } - } while(c != to); - } catch(IOException e) { + } while (c != to); + } catch (IOException e) { Iris.reportError(e); throw new JSONException(e); } @@ -422,8 +408,7 @@ public char skipTo(char to) throws JSONException { /** * Make a JSONException to signal a syntax error. * - * @param message - * The error message. + * @param message The error message. * @return A JSONException object, suitable for throwing */ public JSONException syntaxError(String message) { diff --git a/src/main/java/com/volmit/iris/util/json/JSONWriter.java b/src/main/java/com/volmit/iris/util/json/JSONWriter.java index affb1e65e..e9d212b68 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONWriter.java +++ b/src/main/java/com/volmit/iris/util/json/JSONWriter.java @@ -96,27 +96,25 @@ public JSONWriter(Writer w) { /** * Append a value. * - * @param string - * A string value. + * @param string A string value. * @return this - * @throws JSONException - * If the value is out of sequence. + * @throws JSONException If the value is out of sequence. */ private JSONWriter append(String string) throws JSONException { - if(string == null) { + if (string == null) { throw new JSONException("Null pointer"); } - if(this.mode == 'o' || this.mode == 'a') { + if (this.mode == 'o' || this.mode == 'a') { try { - if(this.comma && this.mode == 'a') { + if (this.comma && this.mode == 'a') { this.writer.write(','); } this.writer.write(string); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); throw new JSONException(e); } - if(this.mode == 'o') { + if (this.mode == 'o') { this.mode = 'k'; } this.comma = true; @@ -131,13 +129,12 @@ private JSONWriter append(String string) throws JSONException { * endArray method must be called to mark the array's end. * * @return this - * @throws JSONException - * If the nesting is too deep, or if the object is started in - * the wrong place (for example as a key or after the end of the - * outermost array or object). + * @throws JSONException If the nesting is too deep, or if the object is started in + * the wrong place (for example as a key or after the end of the + * outermost array or object). */ public JSONWriter array() throws JSONException { - if(this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { + if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { this.push(null); this.append("["); this.comma = false; @@ -149,22 +146,19 @@ public JSONWriter array() throws JSONException { /** * End something. * - * @param mode - * Mode - * @param c - * Closing character + * @param mode Mode + * @param c Closing character * @return this - * @throws JSONException - * If unbalanced. + * @throws JSONException If unbalanced. */ private JSONWriter end(char mode, char c) throws JSONException { - if(this.mode != mode) { + if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); throw new JSONException(e); } @@ -177,8 +171,7 @@ private JSONWriter end(char mode, char c) throws JSONException { * array. * * @return this - * @throws JSONException - * If incorrectly nested. + * @throws JSONException If incorrectly nested. */ public JSONWriter endArray() throws JSONException { return this.end('a', ']'); @@ -189,8 +182,7 @@ public JSONWriter endArray() throws JSONException { * object. * * @return this - * @throws JSONException - * If incorrectly nested. + * @throws JSONException If incorrectly nested. */ public JSONWriter endObject() throws JSONException { return this.end('k', '}'); @@ -200,21 +192,19 @@ public JSONWriter endObject() throws JSONException { * Append a key. The key will be associated with the next value. In an * object, every value must be preceded by a key. * - * @param string - * A key string. + * @param string A key string. * @return this - * @throws JSONException - * If the key is out of place. For example, keys do not belong - * in arrays or if the key is null. + * @throws JSONException If the key is out of place. For example, keys do not belong + * in arrays or if the key is null. */ public JSONWriter key(String string) throws JSONException { - if(string == null) { + if (string == null) { throw new JSONException("Null key."); } - if(this.mode == 'k') { + if (this.mode == 'k') { try { this.stack[this.top - 1].putOnce(string, Boolean.TRUE); - if(this.comma) { + if (this.comma) { this.writer.write(','); } this.writer.write(JSONObject.quote(string)); @@ -222,7 +212,7 @@ public JSONWriter key(String string) throws JSONException { this.comma = false; this.mode = 'o'; return this; - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); throw new JSONException(e); } @@ -236,16 +226,15 @@ public JSONWriter key(String string) throws JSONException { * endObject method must be called to mark the object's end. * * @return this - * @throws JSONException - * If the nesting is too deep, or if the object is started in - * the wrong place (for example as a key or after the end of the - * outermost array or object). + * @throws JSONException If the nesting is too deep, or if the object is started in + * the wrong place (for example as a key or after the end of the + * outermost array or object). */ public JSONWriter object() throws JSONException { - if(this.mode == 'i') { + if (this.mode == 'i') { this.mode = 'o'; } - if(this.mode == 'o' || this.mode == 'a') { + if (this.mode == 'o' || this.mode == 'a') { this.append("{"); this.push(new JSONObject()); this.comma = false; @@ -258,17 +247,15 @@ public JSONWriter object() throws JSONException { /** * Pop an array or object scope. * - * @param c - * The scope to close. - * @throws JSONException - * If nesting is wrong. + * @param c The scope to close. + * @throws JSONException If nesting is wrong. */ private void pop(char c) throws JSONException { - if(this.top <= 0) { + if (this.top <= 0) { throw new JSONException("Nesting error."); } char m = this.stack[this.top - 1] == null ? 'a' : 'k'; - if(m != c) { + if (m != c) { throw new JSONException("Nesting error."); } this.top -= 1; @@ -278,13 +265,11 @@ private void pop(char c) throws JSONException { /** * Push an array or object scope. * - * @param jo - * The scope to open. - * @throws JSONException - * If nesting is too deep. + * @param jo The scope to open. + * @throws JSONException If nesting is too deep. */ private void push(JSONObject jo) throws JSONException { - if(this.top >= maxdepth) { + if (this.top >= maxdepth) { throw new JSONException("Nesting too deep."); } this.stack[this.top] = jo; @@ -296,8 +281,7 @@ private void push(JSONObject jo) throws JSONException { * Append either the value true or the value false * . * - * @param b - * A boolean. + * @param b A boolean. * @return this */ public JSONWriter value(boolean b) throws JSONException { @@ -307,11 +291,9 @@ public JSONWriter value(boolean b) throws JSONException { /** * Append a double value. * - * @param d - * A double. + * @param d A double. * @return this - * @throws JSONException - * If the number is not finite. + * @throws JSONException If the number is not finite. */ public JSONWriter value(double d) throws JSONException { return this.value(Double.valueOf(d)); @@ -320,8 +302,7 @@ public JSONWriter value(double d) throws JSONException { /** * Append a long value. * - * @param l - * A long. + * @param l A long. * @return this */ public JSONWriter value(long l) throws JSONException { @@ -331,13 +312,11 @@ public JSONWriter value(long l) throws JSONException { /** * Append an object value. * - * @param object - * The object to append. It can be null, or a Boolean, Number, - * String, JSONObject, or JSONArray, or an object that implements - * JSONString. + * @param object The object to append. It can be null, or a Boolean, Number, + * String, JSONObject, or JSONArray, or an object that implements + * JSONString. * @return this - * @throws JSONException - * If the value is out of sequence. + * @throws JSONException If the value is out of sequence. */ public JSONWriter value(Object object) throws JSONException { return this.append(JSONObject.valueToString(object)); diff --git a/src/main/java/com/volmit/iris/util/json/XML.java b/src/main/java/com/volmit/iris/util/json/XML.java index 510ae034c..13e665eff 100644 --- a/src/main/java/com/volmit/iris/util/json/XML.java +++ b/src/main/java/com/volmit/iris/util/json/XML.java @@ -87,15 +87,14 @@ public class XML { * " (double quote) is replaced by &quot; * * - * @param string - * The string to be escaped. + * @param string The string to be escaped. * @return The escaped string. */ public static String escape(String string) { StringBuilder sb = new StringBuilder(string.length()); - for(int i = 0, length = string.length(); i < length; i++) { + for (int i = 0, length = string.length(); i < length; i++) { char c = string.charAt(i); - switch(c) { + switch (c) { case '&' -> sb.append("&"); case '<' -> sb.append("<"); case '>' -> sb.append(">"); @@ -111,16 +110,15 @@ public static String escape(String string) { * Throw an exception if the string contains whitespace. Whitespace is not * allowed in tagNames and attributes. * - * @param string - * A string. + * @param string A string. */ public static void noSpace(String string) throws JSONException { int i, length = string.length(); - if(length == 0) { + if (length == 0) { throw new JSONException("Empty string."); } - for(i = 0; i < length; i += 1) { - if(Character.isWhitespace(string.charAt(i))) { + for (i = 0; i < length; i += 1) { + if (Character.isWhitespace(string.charAt(i))) { throw new JSONException("'" + string + "' contains a space character."); } } @@ -129,12 +127,9 @@ public static void noSpace(String string) throws JSONException { /** * Scan the content following the named tag, attaching it to the context. * - * @param x - * The XMLTokener containing the source string. - * @param context - * The JSONObject that will include the new material. - * @param name - * The tag name. + * @param x The XMLTokener containing the source string. + * @param context The JSONObject that will include the new material. + * @param name The tag name. * @return true if the close tag is processed. */ private static boolean parse(XMLTokener x, JSONObject context, String name) throws JSONException { @@ -159,20 +154,20 @@ private static boolean parse(XMLTokener x, JSONObject context, String name) thro // "); return false; } x.back(); - } else if(c == '[') { + } else if (c == '[') { token = x.nextToken(); - if("CDATA".equals(token)) { - if(x.next() == '[') { + if ("CDATA".equals(token)) { + if (x.next() == '[') { string = x.nextCDATA(); - if(string.length() > 0) { + if (string.length() > 0) { context.accumulate("content", string); } return false; @@ -183,38 +178,38 @@ private static boolean parse(XMLTokener x, JSONObject context, String name) thro i = 1; do { token = x.nextMeta(); - if(token == null) { + if (token == null) { throw x.syntaxError("Missing '>' after ' 0); + } while (i > 0); return false; - } else if(token == QUEST) { + } else if (token == QUEST) { // "); return false; - } else if(token == SLASH) { + } else if (token == SLASH) { // Close tag - } else if(token == SLASH) { - if(x.nextToken() != GT) { + } else if (token == SLASH) { + if (x.nextToken() != GT) { throw x.syntaxError("Misshaped tag"); } - if(jsonobject.length() > 0) { + if (jsonobject.length() > 0) { context.accumulate(tagName, jsonobject); } else { context.accumulate(tagName, ""); @@ -259,27 +254,27 @@ private static boolean parse(XMLTokener x, JSONObject context, String name) thro // Content, between <...> and - } else if(token == GT) { - for(; ; ) { + } else if (token == GT) { + for (; ; ) { token = x.nextContent(); - if(token == null) { - if(tagName != null) { + if (token == null) { + if (tagName != null) { throw x.syntaxError("Unclosed tag " + tagName); } return false; - } else if(token instanceof String) { + } else if (token instanceof String) { string = (String) token; - if(string.length() > 0) { + if (string.length() > 0) { jsonobject.accumulate("content", XML.stringToValue(string)); } // Nested element - } else if(token == LT) { - if(parse(x, jsonobject, tagName)) { - if(jsonobject.length() == 0) { + } else if (token == LT) { + if (parse(x, jsonobject, tagName)) { + if (jsonobject.length() == 0) { context.accumulate(tagName, ""); - } else if(jsonobject.length() == 1 && jsonobject.opt("content") != null) { + } else if (jsonobject.length() == 1 && jsonobject.opt("content") != null) { context.accumulate(tagName, jsonobject.opt("content")); } else { context.accumulate(tagName, jsonobject); @@ -302,18 +297,17 @@ private static boolean parse(XMLTokener x, JSONObject context, String name) thro * convert plus forms, octal forms, hex forms, or E forms lacking decimal * points. * - * @param string - * A String. + * @param string A String. * @return A simple JSON value. */ public static Object stringToValue(String string) { - if("true".equalsIgnoreCase(string)) { + if ("true".equalsIgnoreCase(string)) { return Boolean.TRUE; } - if("false".equalsIgnoreCase(string)) { + if ("false".equalsIgnoreCase(string)) { return Boolean.FALSE; } - if("null".equalsIgnoreCase(string)) { + if ("null".equalsIgnoreCase(string)) { return JSONObject.NULL; } @@ -323,20 +317,20 @@ public static Object stringToValue(String string) { try { char initial = string.charAt(0); - if(initial == '-' || (initial >= '0' && initial <= '9')) { + if (initial == '-' || (initial >= '0' && initial <= '9')) { Long value = Long.valueOf(string); - if(value.toString().equals(string)) { + if (value.toString().equals(string)) { return value; } } - } catch(Exception ignore) { + } catch (Exception ignore) { Iris.reportError(ignore); try { Double value = Double.valueOf(string); - if(value.toString().equals(string)) { + if (value.toString().equals(string)) { return value; } - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); } } @@ -354,14 +348,13 @@ public static Object stringToValue(String string) { * "content" member. Comments, prologs, DTDs, and <[ [ ]]> * are ignored. * - * @param string - * The source string. + * @param string The source string. * @return A JSONObject containing the structured data from the XML string. */ public static JSONObject toJSONObject(String string) throws JSONException { JSONObject jo = new JSONObject(); XMLTokener x = new XMLTokener(string); - while(x.more() && x.skipPast("<")) { + while (x.more() && x.skipPast("<")) { parse(x, jo, null); } return jo; @@ -370,8 +363,7 @@ public static JSONObject toJSONObject(String string) throws JSONException { /** * Convert a JSONObject into a well-formed, element-normal XML string. * - * @param object - * A JSONObject. + * @param object A JSONObject. * @return A string. */ public static String toString(Object object) throws JSONException { @@ -381,10 +373,8 @@ public static String toString(Object object) throws JSONException { /** * Convert a JSONObject into a well-formed, element-normal XML string. * - * @param object - * A JSONObject. - * @param tagName - * The optional name of the enclosing tag. + * @param object A JSONObject. + * @param tagName The optional name of the enclosing tag. * @return A string. */ public static String toString(Object object, String tagName) throws JSONException { @@ -397,11 +387,11 @@ public static String toString(Object object, String tagName) throws JSONExceptio int length; String string; Object value; - if(object instanceof JSONObject) { + if (object instanceof JSONObject) { // Emit - if(tagName != null) { + if (tagName != null) { sb.append('<'); sb.append(tagName); sb.append('>'); @@ -411,22 +401,22 @@ public static String toString(Object object, String tagName) throws JSONExceptio jo = (JSONObject) object; keys = jo.keys(); - while(keys.hasNext()) { + while (keys.hasNext()) { key = keys.next(); value = jo.opt(key); - if(value == null) { + if (value == null) { value = ""; } string = value instanceof String ? (String) value : null; // Emit content in body - if("content".equals(key)) { - if(value instanceof JSONArray) { + if ("content".equals(key)) { + if (value instanceof JSONArray) { ja = (JSONArray) value; length = ja.length(); - for(i = 0; i < length; i += 1) { - if(i > 0) { + for (i = 0; i < length; i += 1) { + if (i > 0) { sb.append('\n'); } sb.append(escape(ja.get(i).toString())); @@ -437,12 +427,12 @@ public static String toString(Object object, String tagName) throws JSONExceptio // Emit an array of similar keys - } else if(value instanceof JSONArray) { + } else if (value instanceof JSONArray) { ja = (JSONArray) value; length = ja.length(); - for(i = 0; i < length; i += 1) { + for (i = 0; i < length; i += 1) { value = ja.get(i); - if(value instanceof JSONArray) { + if (value instanceof JSONArray) { sb.append('<'); sb.append(key); sb.append('>'); @@ -454,7 +444,7 @@ public static String toString(Object object, String tagName) throws JSONExceptio sb.append(toString(value, key)); } } - } else if("".equals(value)) { + } else if ("".equals(value)) { sb.append('<'); sb.append(key); sb.append("/>"); @@ -465,7 +455,7 @@ public static String toString(Object object, String tagName) throws JSONExceptio sb.append(toString(value, key)); } } - if(tagName != null) { + if (tagName != null) { // Emit the close tag @@ -480,13 +470,13 @@ public static String toString(Object object, String tagName) throws JSONExceptio // where XML is lacking, synthesize an element. } else { - if(object.getClass().isArray()) { + if (object.getClass().isArray()) { object = new JSONArray(object); } - if(object instanceof JSONArray) { + if (object instanceof JSONArray) { ja = (JSONArray) object; length = ja.length(); - for(i = 0; i < length; i += 1) { + for (i = 0; i < length; i += 1) { sb.append(toString(ja.opt(i), tagName == null ? "array" : tagName)); } return sb.toString(); diff --git a/src/main/java/com/volmit/iris/util/json/XMLTokener.java b/src/main/java/com/volmit/iris/util/json/XMLTokener.java index f27bfd5ab..a4e214064 100644 --- a/src/main/java/com/volmit/iris/util/json/XMLTokener.java +++ b/src/main/java/com/volmit/iris/util/json/XMLTokener.java @@ -46,8 +46,7 @@ public class XMLTokener extends JSONTokener { /** * Construct an XMLTokener from a string. * - * @param s - * A source string. + * @param s A source string. */ public XMLTokener(String s) { super(s); @@ -57,21 +56,20 @@ public XMLTokener(String s) { * Get the text in the CDATA block. * * @return The string up to the ]]>. - * @throws JSONException - * If the ]]> is not found. + * @throws JSONException If the ]]> is not found. */ public String nextCDATA() throws JSONException { char c; int i; StringBuilder sb = new StringBuilder(); - for(; ; ) { + for (; ; ) { c = next(); - if(end()) { + if (end()) { throw syntaxError("Unclosed CDATA"); } sb.append(c); i = sb.length() - 3; - if(i >= 0 && sb.charAt(i) == ']' && sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>') { + if (i >= 0 && sb.charAt(i) == ']' && sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>') { sb.setLength(i); return sb.toString(); } @@ -91,20 +89,20 @@ public Object nextContent() throws JSONException { StringBuilder sb; do { c = next(); - } while(Character.isWhitespace(c)); - if(c == 0) { + } while (Character.isWhitespace(c)); + if (c == 0) { return null; } - if(c == '<') { + if (c == '<') { return XML.LT; } sb = new StringBuilder(); - for(; ; ) { - if(c == '<' || c == 0) { + for (; ; ) { + if (c == '<' || c == 0) { back(); return sb.toString().trim(); } - if(c == '&') { + if (c == '&') { sb.append(nextEntity(c)); } else { sb.append(c); @@ -117,19 +115,17 @@ public Object nextContent() throws JSONException { * Return the next entity. These entities are translated to Characters: * & ' > < ". * - * @param ampersand - * An ampersand character. + * @param ampersand An ampersand character. * @return A Character or an entity String if the entity is not recognized. - * @throws JSONException - * If missing ';' in XML entity. + * @throws JSONException If missing ';' in XML entity. */ public Object nextEntity(char ampersand) throws JSONException { StringBuilder sb = new StringBuilder(); - for(; ; ) { + for (; ; ) { char c = next(); - if(Character.isLetterOrDigit(c) || c == '#') { + if (Character.isLetterOrDigit(c) || c == '#') { sb.append(Character.toLowerCase(c)); - } else if(c == ';') { + } else if (c == ';') { break; } else { throw syntaxError("Missing ';' in XML entity: &" + sb); @@ -147,17 +143,16 @@ public Object nextEntity(char ampersand) throws JSONException { * @return Syntax characters (< > / = ! ?) are returned as * Character, and strings and names are returned as Boolean. We * don't care what the values actually are. - * @throws JSONException - * If a string is not properly closed or if the XML is badly - * structured. + * @throws JSONException If a string is not properly closed or if the XML is badly + * structured. */ public Object nextMeta() throws JSONException { char c; char q; do { c = next(); - } while(Character.isWhitespace(c)); - switch(c) { + } while (Character.isWhitespace(c)); + switch (c) { case 0: throw syntaxError("Misshaped meta tag"); case '<': @@ -175,22 +170,22 @@ public Object nextMeta() throws JSONException { case '"': case '\'': q = c; - for(; ; ) { + for (; ; ) { c = next(); - if(c == 0) { + if (c == 0) { throw syntaxError("Unterminated string"); } - if(c == q) { + if (c == q) { return Boolean.TRUE; } } default: - for(; ; ) { + for (; ; ) { c = next(); - if(Character.isWhitespace(c)) { + if (Character.isWhitespace(c)) { return Boolean.TRUE; } - switch(c) { + switch (c) { case 0, '<', '>', '/', '=', '!', '?', '"', '\'' -> { back(); return Boolean.TRUE; @@ -206,8 +201,7 @@ public Object nextMeta() throws JSONException { * string wrapped in single quotes or double quotes, or it may be a name. * * @return a String or a Character. - * @throws JSONException - * If the XML is not well formed. + * @throws JSONException If the XML is not well formed. */ public Object nextToken() throws JSONException { char c; @@ -215,8 +209,8 @@ public Object nextToken() throws JSONException { StringBuilder sb; do { c = next(); - } while(Character.isWhitespace(c)); - switch(c) { + } while (Character.isWhitespace(c)); + switch (c) { case 0: throw syntaxError("Misshaped element"); case '<': @@ -238,15 +232,15 @@ public Object nextToken() throws JSONException { case '\'': q = c; sb = new StringBuilder(); - for(; ; ) { + for (; ; ) { c = next(); - if(c == 0) { + if (c == 0) { throw syntaxError("Unterminated string"); } - if(c == q) { + if (c == q) { return sb.toString(); } - if(c == '&') { + if (c == '&') { sb.append(nextEntity(c)); } else { sb.append(c); @@ -257,13 +251,13 @@ public Object nextToken() throws JSONException { // Name sb = new StringBuilder(); - for(; ; ) { + for (; ; ) { sb.append(c); c = next(); - if(Character.isWhitespace(c)) { + if (Character.isWhitespace(c)) { return sb.toString(); } - switch(c) { + switch (c) { case 0: return sb.toString(); case '>': @@ -288,8 +282,7 @@ public Object nextToken() throws JSONException { * Skip characters until past the requested string. If it is not found, we * are left at the end of the source with a result of false. * - * @param to - * A string to skip past. + * @param to A string to skip past. */ public boolean skipPast(String to) throws JSONException { boolean b; @@ -305,9 +298,9 @@ public boolean skipPast(String to) throws JSONException { * string. If we reach an early end, bail. */ - for(i = 0; i < length; i += 1) { + for (i = 0; i < length; i += 1) { c = next(); - if(c == 0) { + if (c == 0) { return false; } circle[i] = c; @@ -315,26 +308,26 @@ public boolean skipPast(String to) throws JSONException { /* We will loop, possibly for all of the remaining characters. */ - for(; ; ) { + for (; ; ) { j = offset; b = true; /* Compare the circle buffer with the to string. */ - for(i = 0; i < length; i += 1) { - if(circle[j] != to.charAt(i)) { + for (i = 0; i < length; i += 1) { + if (circle[j] != to.charAt(i)) { b = false; break; } j += 1; - if(j >= length) { + if (j >= length) { j -= length; } } /* If we exit the loop with b intact, then victory is ours. */ - if(b) { + if (b) { return true; } @@ -343,7 +336,7 @@ public boolean skipPast(String to) throws JSONException { */ c = next(); - if(c == 0) { + if (c == 0) { return false; } /* @@ -352,7 +345,7 @@ public boolean skipPast(String to) throws JSONException { */ circle[offset] = c; offset += 1; - if(offset >= length) { + if (offset >= length) { offset -= length; } } diff --git a/src/main/java/com/volmit/iris/util/mantle/Mantle.java b/src/main/java/com/volmit/iris/util/mantle/Mantle.java index f000a0572..6ef668ff5 100644 --- a/src/main/java/com/volmit/iris/util/mantle/Mantle.java +++ b/src/main/java/com/volmit/iris/util/mantle/Mantle.java @@ -70,10 +70,8 @@ public class Mantle { /** * Create a new mantle * - * @param dataFolder - * the data folder - * @param worldHeight - * the world's height (in blocks) + * @param dataFolder the data folder + * @param worldHeight the world's height (in blocks) */ @BlockCoordinates public Mantle(File dataFolder, int worldHeight) { @@ -93,12 +91,9 @@ public Mantle(File dataFolder, int worldHeight) { /** * Get the file for a region * - * @param folder - * the folder - * @param x - * the x coord - * @param z - * the z coord + * @param folder the folder + * @param x the x coord + * @param z the z coord * @return the file */ public static File fileForRegion(File folder, int x, int z) { @@ -108,15 +103,13 @@ public static File fileForRegion(File folder, int x, int z) { /** * Get the file for the given region * - * @param folder - * the data folder - * @param key - * the region key + * @param folder the data folder + * @param key the region key * @return the file */ public static File fileForRegion(File folder, Long key) { File f = new File(folder, "p." + key + ".ttp"); - if(!f.getParentFile().exists()) { + if (!f.getParentFile().exists()) { f.getParentFile().mkdirs(); } return f; @@ -125,10 +118,8 @@ public static File fileForRegion(File folder, Long key) { /** * Get the long value representing a chunk or region coordinate * - * @param x - * the x - * @param z - * the z + * @param x the x + * @param z the z * @return the value */ public static Long key(int x, int z) { @@ -138,18 +129,14 @@ public static Long key(int x, int z) { /** * Raise a flag if it is lowered currently, If the flag was raised, execute the runnable * - * @param x - * the chunk x - * @param z - * the chunk z - * @param flag - * the flag to raise - * @param r - * the runnable to fire if the flag is now raised (and was previously lowered) + * @param x the chunk x + * @param z the chunk z + * @param flag the flag to raise + * @param r the runnable to fire if the flag is now raised (and was previously lowered) */ @ChunkCoordinates public void raiseFlag(int x, int z, MantleFlag flag, Runnable r) { - if(!hasFlag(x, z, flag)) { + if (!hasFlag(x, z, flag)) { flag(x, z, flag, true); r.run(); } @@ -159,12 +146,9 @@ public void raiseFlag(int x, int z, MantleFlag flag, Runnable r) { * Obtain a cached writer which only contains cached chunks. * This avoids locking on regions when writing to lots of chunks * - * @param x - * the x chunk - * @param z - * the z chunk - * @param radius - * the radius chunks + * @param x the x chunk + * @param z the z chunk + * @param radius the radius chunks * @return the writer */ @ChunkCoordinates @@ -175,18 +159,14 @@ public MantleWriter write(EngineMantle engineMantle, int x, int z, int radius) { /** * Lower a flag if it is raised. If the flag was lowered (meaning it was previously raised), execute the runnable * - * @param x - * the chunk x - * @param z - * the chunk z - * @param flag - * the flag to lower - * @param r - * the runnable that is fired if the flag was raised but is now lowered + * @param x the chunk x + * @param z the chunk z + * @param flag the flag to lower + * @param r the runnable that is fired if the flag was raised but is now lowered */ @ChunkCoordinates public void lowerFlag(int x, int z, MantleFlag flag, Runnable r) { - if(hasFlag(x, z, flag)) { + if (hasFlag(x, z, flag)) { flag(x, z, flag, false); r.run(); } @@ -200,14 +180,10 @@ public MantleChunk getChunk(int x, int z) { /** * Flag or unflag a chunk * - * @param x - * the chunk x - * @param z - * the chunk z - * @param flag - * the flag - * @param flagged - * should it be set to flagged or not + * @param x the chunk x + * @param z the chunk z + * @param flag the flag + * @param flagged should it be set to flagged or not */ @ChunkCoordinates public void flag(int x, int z, MantleFlag flag, boolean flagged) { @@ -221,10 +197,8 @@ public void deleteChunk(int x, int z) { /** * Check very quickly if a tectonic plate exists via cached or the file system * - * @param x - * the x region coordinate - * @param z - * the z region coordinate + * @param x the x region coordinate + * @param z the z region coordinate * @return true if it exists */ @RegionCoordinates @@ -236,16 +210,11 @@ public boolean hasTectonicPlate(int x, int z) { /** * Iterate data in a chunk * - * @param x - * the chunk x - * @param z - * the chunk z - * @param type - * the type of data to iterate - * @param iterator - * the iterator (x,y,z,data) -> do stuff - * @param - * the type of data to iterate + * @param x the chunk x + * @param z the chunk z + * @param type the type of data to iterate + * @param iterator the iterator (x,y,z,data) -> do stuff + * @param the type of data to iterate */ @ChunkCoordinates public void iterateChunk(int x, int z, Class type, Consumer4 iterator) { @@ -259,17 +228,14 @@ public void iterateChunk(int x, int z, Class type, Consumer4> 5, z >> 5)) { + if (!hasTectonicPlate(x >> 5, z >> 5)) { return false; } @@ -284,49 +250,44 @@ public boolean hasFlag(int x, int z, MantleFlag flag) { * reading & writing other regions. Hyperlocks are slow sync, but in multicore * environments, they drastically speed up loading & saving large counts of plates * - * @param x - * the block's x coordinate - * @param y - * the block's y coordinate - * @param z - * the block's z coordinate - * @param t - * the data to set at the block - * @param - * the type of data (generic method) + * @param x the block's x coordinate + * @param y the block's y coordinate + * @param z the block's z coordinate + * @param t the data to set at the block + * @param the type of data (generic method) */ @BlockCoordinates public void set(int x, int y, int z, T t) { - if(closed.get()) { + if (closed.get()) { throw new RuntimeException("The Mantle is closed"); } - if(y < 0 || y >= worldHeight) { + if (y < 0 || y >= worldHeight) { return; } Matter matter = get((x >> 4) >> 5, (z >> 4) >> 5) - .getOrCreate((x >> 4) & 31, (z >> 4) & 31) - .getOrCreate(y >> 4); + .getOrCreate((x >> 4) & 31, (z >> 4) & 31) + .getOrCreate(y >> 4); matter.slice(matter.getClass(t)) - .set(x & 15, y & 15, z & 15, t); + .set(x & 15, y & 15, z & 15, t); } @BlockCoordinates public void remove(int x, int y, int z, Class t) { - if(closed.get()) { + if (closed.get()) { throw new RuntimeException("The Mantle is closed"); } - if(y < 0 || y >= worldHeight) { + if (y < 0 || y >= worldHeight) { return; } Matter matter = get((x >> 4) >> 5, (z >> 4) >> 5) - .getOrCreate((x >> 4) & 31, (z >> 4) & 31) - .getOrCreate(y >> 4); + .getOrCreate((x >> 4) & 31, (z >> 4) & 31) + .getOrCreate(y >> 4); matter.slice(t) - .set(x & 15, y & 15, z & 15, null); + .set(x & 15, y & 15, z & 15, null); } /** @@ -337,37 +298,32 @@ public void remove(int x, int y, int z, Class t) { * reading & writing other regions. Hyperlocks are slow sync, but in multicore * environments, they drastically speed up loading & saving large counts of plates * - * @param x - * the block's x coordinate - * @param y - * the block's y coordinate - * @param z - * the block's z coordinate - * @param t - * the class representing the type of data being requested - * @param - * the type assumed from the provided class + * @param x the block's x coordinate + * @param y the block's y coordinate + * @param z the block's z coordinate + * @param t the class representing the type of data being requested + * @param the type assumed from the provided class * @return the returned result (or null) if it doesnt exist */ @SuppressWarnings("unchecked") @BlockCoordinates public T get(int x, int y, int z, Class t) { - if(closed.get()) { + if (closed.get()) { throw new RuntimeException("The Mantle is closed"); } - if(!hasTectonicPlate((x >> 4) >> 5, (z >> 4) >> 5)) { + if (!hasTectonicPlate((x >> 4) >> 5, (z >> 4) >> 5)) { return null; } - if(y < 0 || y >= worldHeight) { + if (y < 0 || y >= worldHeight) { return null; } return (T) get((x >> 4) >> 5, (z >> 4) >> 5) - .getOrCreate((x >> 4) & 31, (z >> 4) & 31) - .getOrCreate(y >> 4).slice(t) - .get(x & 15, y & 15, z & 15); + .getOrCreate((x >> 4) & 31, (z >> 4) & 31) + .getOrCreate(y >> 4).slice(t) + .get(x & 15, y & 15, z & 15); } /** @@ -379,10 +335,8 @@ public boolean isClosed() { return closed.get(); } - public void set(int x, int y, int z, Matter matter) - { - for(MatterSlice i : matter.getSliceMap().values()) - { + public void set(int x, int y, int z, Matter matter) { + for (MatterSlice i : matter.getSliceMap().values()) { i.iterate((mx, my, mz, v) -> set(mx + x, my + y, mz + z, v)); } } @@ -394,17 +348,17 @@ public void set(int x, int y, int z, Matter matter) */ public synchronized void close() { Iris.debug("Closing The Mantle " + C.DARK_AQUA + dataFolder.getAbsolutePath()); - if(closed.get()) { + if (closed.get()) { return; } closed.set(true); BurstExecutor b = ioBurst.burst(loadedRegions.size()); - for(Long i : loadedRegions.keySet()) { + for (Long i : loadedRegions.keySet()) { b.queue(() -> { try { loadedRegions.get(i).write(fileForRegion(dataFolder, i)); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } }); @@ -412,7 +366,7 @@ public synchronized void close() { try { b.complete(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -424,11 +378,10 @@ public synchronized void close() { * Save & unload regions that have not been used for more than the * specified amount of milliseconds * - * @param idleDuration - * the duration + * @param idleDuration the duration */ public synchronized void trim(long idleDuration) { - if(closed.get()) { + if (closed.get()) { throw new RuntimeException("The Mantle is closed"); } @@ -436,22 +389,22 @@ public synchronized void trim(long idleDuration) { Iris.debug("Trimming Tectonic Plates older than " + Form.duration((double) idleDuration, 0)); unload.clear(); - for(Long i : lastUse.keySet()) { + for (Long i : lastUse.keySet()) { hyperLock.withLong(i, () -> { - if(M.ms() - lastUse.get(i) >= idleDuration) { + if (M.ms() - lastUse.get(i) >= idleDuration) { unload.add(i); } }); } - for(Long i : unload) { + for (Long i : unload) { hyperLock.withLong(i, () -> { TectonicPlate m = loadedRegions.remove(i); lastUse.remove(i); try { m.write(fileForRegion(dataFolder, i)); - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } @@ -465,36 +418,34 @@ public synchronized void trim(long idleDuration) { * This retreives a future of the Tectonic Plate at the given coordinates. * All methods accessing tectonic plates should go through this method * - * @param x - * the region x - * @param z - * the region z + * @param x the region x + * @param z the region z * @return the future of a tectonic plate. */ @RegionCoordinates private TectonicPlate get(int x, int z) { - if(io.get()) { + if (io.get()) { try { return getSafe(x, z).get(); - } catch(InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); - } catch(ExecutionException e) { + } catch (ExecutionException e) { e.printStackTrace(); } } TectonicPlate p = loadedRegions.get(key(x, z)); - if(p != null) { + if (p != null) { return p; } try { return getSafe(x, z).get(); - } catch(InterruptedException e) { + } catch (InterruptedException e) { Iris.warn("Failed to get Tectonic Plate " + x + " " + z + " Due to a thread intterruption (hotload?)"); Iris.reportError(e); - } catch(ExecutionException e) { + } catch (ExecutionException e) { Iris.warn("Failed to get Tectonic Plate " + x + " " + z + " Due to a thread execution exception (engine close?)"); Iris.reportError(e); } @@ -507,10 +458,8 @@ private TectonicPlate get(int x, int z) { * This retreives a future of the Tectonic Plate at the given coordinates. * All methods accessing tectonic plates should go through this method * - * @param x - * the region x - * @param z - * the region z + * @param x the region x + * @param z the region z * @return the future of a tectonic plate. */ @RegionCoordinates @@ -518,7 +467,7 @@ private Future getSafe(int x, int z) { Long k = key(x, z); TectonicPlate p = loadedRegions.get(k); - if(p != null) { + if (p != null) { lastUse.put(k, M.ms()); return CompletableFuture.completedFuture(p); } @@ -527,24 +476,24 @@ private Future getSafe(int x, int z) { lastUse.put(k, M.ms()); TectonicPlate region = loadedRegions.get(k); - if(region != null) { + if (region != null) { return region; } File file = fileForRegion(dataFolder, x, z); - if(file.exists()) { + if (file.exists()) { try { Iris.addPanic("reading.tectonic-plate", file.getAbsolutePath()); region = TectonicPlate.read(worldHeight, file); - if(region.getX() != x || region.getZ() != z) { + if (region.getX() != x || region.getZ() != z) { Iris.warn("Loaded Tectonic Plate " + x + "," + z + " but read it as " + region.getX() + "," + region.getZ() + "... Assuming " + x + "," + z); } loadedRegions.put(k, region); Iris.debug("Loaded Tectonic Plate " + C.DARK_GREEN + x + " " + z + C.DARK_AQUA + " " + file.getName()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("Failed to read Tectonic Plate " + file.getAbsolutePath() + " creating a new chunk instead."); Iris.reportError(e); if (!(e instanceof EOFException)) { @@ -579,7 +528,7 @@ public MantleChunk getChunk(Chunk e) { } public void deleteChunkSlice(int x, int z, Class c) { - if(!IrisToolbelt.toolbeltConfiguration.isEmpty() && IrisToolbelt.toolbeltConfiguration.getOrDefault("retain.mantle." + c.getCanonicalName(), false)) { + if (!IrisToolbelt.toolbeltConfiguration.isEmpty() && IrisToolbelt.toolbeltConfiguration.getOrDefault("retain.mantle." + c.getCanonicalName(), false)) { return; } @@ -591,7 +540,7 @@ public int getLoadedRegionCount() { } public void set(int x, int y, int z, MatterSlice slice) { - if(slice.isEmpty()) { + if (slice.isEmpty()) { return; } diff --git a/src/main/java/com/volmit/iris/util/mantle/MantleChunk.java b/src/main/java/com/volmit/iris/util/mantle/MantleChunk.java index 385bb12d8..e73e7d68e 100644 --- a/src/main/java/com/volmit/iris/util/mantle/MantleChunk.java +++ b/src/main/java/com/volmit/iris/util/mantle/MantleChunk.java @@ -47,8 +47,7 @@ public class MantleChunk { /** * Create a mantle chunk * - * @param sectionHeight - * the height of the world in sections (blocks >> 4) + * @param sectionHeight the height of the world in sections (blocks >> 4) */ @ChunkCoordinates public MantleChunk(int sectionHeight, int x, int z) { @@ -57,7 +56,7 @@ public MantleChunk(int sectionHeight, int x, int z) { this.x = x; this.z = z; - for(int i = 0; i < flags.length(); i++) { + for (int i = 0; i < flags.length(); i++) { flags.set(i, 0); } } @@ -65,26 +64,22 @@ public MantleChunk(int sectionHeight, int x, int z) { /** * Load a mantle chunk from a data stream * - * @param sectionHeight - * the height of the world in sections (blocks >> 4) - * @param din - * the data input - * @throws IOException - * shit happens - * @throws ClassNotFoundException - * shit happens + * @param sectionHeight the height of the world in sections (blocks >> 4) + * @param din the data input + * @throws IOException shit happens + * @throws ClassNotFoundException shit happens */ public MantleChunk(int sectionHeight, DataInputStream din) throws IOException, ClassNotFoundException { this(sectionHeight, din.readByte(), din.readByte()); int s = din.readByte(); - for(int i = 0; i < flags.length(); i++) { + for (int i = 0; i < flags.length(); i++) { flags.set(i, din.readBoolean() ? 1 : 0); } - for(int i = 0; i < s; i++) { + for (int i = 0; i < s; i++) { Iris.addPanic("read.section", "Section[" + i + "]"); - if(din.readBoolean()) { + if (din.readBoolean()) { sections.set(i, Matter.readDin(din)); } } @@ -95,7 +90,7 @@ public void flag(MantleFlag flag, boolean f) { } public void raiseFlag(MantleFlag flag, Runnable r) { - if(!isFlagged(flag)) { + if (!isFlagged(flag)) { flag(flag, true); r.run(); } @@ -108,8 +103,7 @@ public boolean isFlagged(MantleFlag flag) { /** * Check if a section exists (same as get(section) != null) * - * @param section - * the section (0 - (worldHeight >> 4)) + * @param section the section (0 - (worldHeight >> 4)) * @return true if it exists */ @ChunkCoordinates @@ -120,8 +114,7 @@ public boolean exists(int section) { /** * Get thje matter at the given section or null if it doesnt exist * - * @param section - * the section (0 - (worldHeight >> 4)) + * @param section the section (0 - (worldHeight >> 4)) * @return the matter or null if it doesnt exist */ @ChunkCoordinates @@ -133,7 +126,7 @@ public Matter get(int section) { * Clear all matter from this chunk */ public void clear() { - for(int i = 0; i < sections.length(); i++) { + for (int i = 0; i < sections.length(); i++) { delete(i); } } @@ -141,8 +134,7 @@ public void clear() { /** * Delete the matter from the given section * - * @param section - * the section (0 - (worldHeight >> 4)) + * @param section the section (0 - (worldHeight >> 4)) */ @ChunkCoordinates public void delete(int section) { @@ -152,15 +144,14 @@ public void delete(int section) { /** * Get or create a new matter section at the given section * - * @param section - * the section (0 - (worldHeight >> 4)) + * @param section the section (0 - (worldHeight >> 4)) * @return the matter */ @ChunkCoordinates public Matter getOrCreate(int section) { Matter matter = get(section); - if(matter == null) { + if (matter == null) { matter = new IrisMatter(16, 16, 16); sections.set(section, matter); } @@ -171,24 +162,22 @@ public Matter getOrCreate(int section) { /** * Write this chunk to a data stream * - * @param dos - * the stream - * @throws IOException - * shit happens + * @param dos the stream + * @throws IOException shit happens */ public void write(DataOutputStream dos) throws IOException { dos.writeByte(x); dos.writeByte(z); dos.writeByte(sections.length()); - for(int i = 0; i < flags.length(); i++) { + for (int i = 0; i < flags.length(); i++) { dos.writeBoolean(flags.get(i) == 1); } - for(int i = 0; i < sections.length(); i++) { + for (int i = 0; i < sections.length(); i++) { trimSlice(i); - if(exists(i)) { + if (exists(i)) { dos.writeBoolean(true); Matter matter = get(i); matter.writeDos(dos); @@ -199,14 +188,14 @@ public void write(DataOutputStream dos) throws IOException { } private void trimSlice(int i) { - if(exists(i)) { + if (exists(i)) { Matter m = get(i); - if(m.getSliceMap().isEmpty()) { + if (m.getSliceMap().isEmpty()) { sections.set(i, null); } else { m.trimSlices(); - if(m.getSliceMap().isEmpty()) { + if (m.getSliceMap().isEmpty()) { sections.set(i, null); } } @@ -214,14 +203,14 @@ private void trimSlice(int i) { } public void iterate(Class type, Consumer4 iterator) { - for(int i = 0; i < sections.length(); i++) { + for (int i = 0; i < sections.length(); i++) { int bs = (i << 4); Matter matter = get(i); - if(matter != null) { + if (matter != null) { MatterSlice t = matter.getSlice(type); - if(t != null) { + if (t != null) { t.iterateSync((a, b, c, f) -> iterator.accept(a, b + bs, c, f)); } } @@ -229,17 +218,17 @@ public void iterate(Class type, Consumer4 i } public void deleteSlices(Class c) { - for(int i = 0; i < sections.length(); i++) { + for (int i = 0; i < sections.length(); i++) { Matter m = sections.get(i); - if(m != null && m.hasSlice(c)) { + if (m != null && m.hasSlice(c)) { m.deleteSlice(c); } } } public void trimSlices() { - for(int i = 0; i < sections.length(); i++) { - if(exists(i)) { + for (int i = 0; i < sections.length(); i++) { + if (exists(i)) { trimSlice(i); } } diff --git a/src/main/java/com/volmit/iris/util/mantle/TectonicPlate.java b/src/main/java/com/volmit/iris/util/mantle/TectonicPlate.java index c48da80e1..bea18ba3a 100644 --- a/src/main/java/com/volmit/iris/util/mantle/TectonicPlate.java +++ b/src/main/java/com/volmit/iris/util/mantle/TectonicPlate.java @@ -49,8 +49,7 @@ public class TectonicPlate { /** * Create a new tectonic plate * - * @param worldHeight - * the height of the world + * @param worldHeight the height of the world */ public TectonicPlate(int worldHeight, int x, int z) { this.sectionHeight = worldHeight >> 4; @@ -62,19 +61,15 @@ public TectonicPlate(int worldHeight, int x, int z) { /** * Load a tectonic plate from a data stream * - * @param worldHeight - * the height of the world - * @param din - * the data input - * @throws IOException - * shit happens yo - * @throws ClassNotFoundException - * real shit bro + * @param worldHeight the height of the world + * @param din the data input + * @throws IOException shit happens yo + * @throws ClassNotFoundException real shit bro */ public TectonicPlate(int worldHeight, DataInputStream din) throws IOException, ClassNotFoundException { this(worldHeight, din.readInt(), din.readInt()); - for(int i = 0; i < chunks.length(); i++) { - if(din.readBoolean()) { + for (int i = 0; i < chunks.length(); i++) { + if (din.readBoolean()) { Iris.addPanic("read-chunk", "Chunk[" + i + "]"); chunks.set(i, new MantleChunk(sectionHeight, din)); EnginePanic.saveLast(); @@ -95,10 +90,8 @@ public static TectonicPlate read(int worldHeight, File file) throws IOException, /** * Check if a chunk exists in this plate or not (same as get(x, z) != null) * - * @param x - * the chunk relative x (0-31) - * @param z - * the chunk relative z (0-31) + * @param x the chunk relative x (0-31) + * @param z the chunk relative z (0-31) * @return true if the chunk exists */ @ChunkCoordinates @@ -109,10 +102,8 @@ public boolean exists(int x, int z) { /** * Get a chunk at the given coordinates or null if it doesnt exist * - * @param x - * the chunk relative x (0-31) - * @param z - * the chunk relative z (0-31) + * @param x the chunk relative x (0-31) + * @param z the chunk relative z (0-31) * @return the chunk or null if it doesnt exist */ @ChunkCoordinates @@ -124,7 +115,7 @@ public MantleChunk get(int x, int z) { * Clear all chunks from this tectonic plate */ public void clear() { - for(int i = 0; i < chunks.length(); i++) { + for (int i = 0; i < chunks.length(); i++) { chunks.set(i, null); } } @@ -132,10 +123,8 @@ public void clear() { /** * Delete a chunk from this tectonic plate * - * @param x - * the chunk relative x (0-31) - * @param z - * the chunk relative z (0-31) + * @param x the chunk relative x (0-31) + * @param z the chunk relative z (0-31) */ @ChunkCoordinates public void delete(int x, int z) { @@ -145,17 +134,15 @@ public void delete(int x, int z) { /** * Get a tectonic plate, or create one and insert it & return it if it diddnt exist * - * @param x - * the chunk relative x (0-31) - * @param z - * the chunk relative z (0-31) + * @param x the chunk relative x (0-31) + * @param z the chunk relative z (0-31) * @return the chunk (read or created & inserted) */ @ChunkCoordinates public MantleChunk getOrCreate(int x, int z) { MantleChunk chunk = get(x, z); - if(chunk == null) { + if (chunk == null) { chunk = new MantleChunk(sectionHeight, x & 31, z & 31); chunks.set(index(x, z), chunk); } @@ -171,10 +158,8 @@ private int index(int x, int z) { /** * Write this tectonic plate to file * - * @param file - * the file to writeNodeData it to - * @throws IOException - * shit happens + * @param file the file to writeNodeData it to + * @throws IOException shit happens */ public void write(File file) throws IOException { PrecisionStopwatch p = PrecisionStopwatch.start(); @@ -189,19 +174,17 @@ public void write(File file) throws IOException { /** * Write this tectonic plate to a data stream * - * @param dos - * the data output - * @throws IOException - * shit happens + * @param dos the data output + * @throws IOException shit happens */ public void write(DataOutputStream dos) throws IOException { dos.writeInt(x); dos.writeInt(z); - for(int i = 0; i < chunks.length(); i++) { + for (int i = 0; i < chunks.length(); i++) { MantleChunk chunk = chunks.get(i); - if(chunk != null) { + if (chunk != null) { dos.writeBoolean(true); chunk.write(dos); } else { diff --git a/src/main/java/com/volmit/iris/util/math/Average.java b/src/main/java/com/volmit/iris/util/math/Average.java index ba66e81f6..1ac83cf37 100644 --- a/src/main/java/com/volmit/iris/util/math/Average.java +++ b/src/main/java/com/volmit/iris/util/math/Average.java @@ -38,8 +38,7 @@ public class Average { /** * Create an average holder * - * @param size - * the size of entries to keep + * @param size the size of entries to keep */ public Average(int size) { values = new double[size]; @@ -54,14 +53,13 @@ public Average(int size) { /** * Put a value into the average (rolls over if full) * - * @param i - * the value + * @param i the value */ public void put(double i) { dirty = true; - if(brandNew) { + if (brandNew) { DoubleArrayUtils.fill(values, i); lastSum = size() * i; brandNew = false; @@ -80,7 +78,7 @@ public void put(double i) { * @return the average */ public double getAverage() { - if(dirty) { + if (dirty) { calculateAverage(); return getAverage(); } diff --git a/src/main/java/com/volmit/iris/util/math/BlockPosition.java b/src/main/java/com/volmit/iris/util/math/BlockPosition.java index 8f1500d5d..9ca1363f8 100644 --- a/src/main/java/com/volmit/iris/util/math/BlockPosition.java +++ b/src/main/java/com/volmit/iris/util/math/BlockPosition.java @@ -57,11 +57,11 @@ public int hashCode() { } public boolean equals(Object o) { - if(o == null) { + if (o == null) { return false; } - if(o instanceof BlockPosition ot) { + if (o instanceof BlockPosition ot) { return ot.x == x && ot.y == y && ot.z == z; } diff --git a/src/main/java/com/volmit/iris/util/math/CDou.java b/src/main/java/com/volmit/iris/util/math/CDou.java index f64daa2fc..02964d4ef 100644 --- a/src/main/java/com/volmit/iris/util/math/CDou.java +++ b/src/main/java/com/volmit/iris/util/math/CDou.java @@ -51,7 +51,7 @@ public double get() { } public void circ() { - if(number < 0) { + if (number < 0) { number = max - (Math.abs(number) > max ? max : Math.abs(number)); } diff --git a/src/main/java/com/volmit/iris/util/math/Direction.java b/src/main/java/com/volmit/iris/util/math/Direction.java index 72e0c4e0a..9ca17b149 100644 --- a/src/main/java/com/volmit/iris/util/math/Direction.java +++ b/src/main/java/com/volmit/iris/util/math/Direction.java @@ -56,7 +56,7 @@ public enum Direction { } public static Direction getDirection(BlockFace f) { - return switch(f) { + return switch (f) { case DOWN -> D; case EAST, EAST_SOUTH_EAST, EAST_NORTH_EAST -> E; case NORTH, NORTH_WEST, NORTH_NORTH_WEST, NORTH_NORTH_EAST, NORTH_EAST -> N; @@ -71,11 +71,11 @@ public static Direction closest(Vector v) { double m = Double.MAX_VALUE; Direction s = null; - for(Direction i : values()) { + for (Direction i : values()) { Vector x = i.toVector(); double g = x.dot(v); - if(g < m) { + if (g < m) { m = g; s = i; } @@ -88,11 +88,11 @@ public static Direction closest(Vector v, Direction... d) { double m = Double.MAX_VALUE; Direction s = null; - for(Direction i : d) { + for (Direction i : d) { Vector x = i.toVector(); double g = x.distance(v); - if(g < m) { + if (g < m) { m = g; s = i; } @@ -105,11 +105,11 @@ public static Direction closest(Vector v, KList d) { double m = Double.MAX_VALUE; Direction s = null; - for(Direction i : d) { + for (Direction i : d) { Vector x = i.toVector(); double g = x.distance(v); - if(g < m) { + if (g < m) { m = g; s = i; } @@ -125,8 +125,8 @@ public static KList news() { public static Direction getDirection(Vector v) { Vector k = VectorMath.triNormalize(v.clone().normalize()); - for(Direction i : udnews()) { - if(i.x == k.getBlockX() && i.y == k.getBlockY() && i.z == k.getBlockZ()) { + for (Direction i : udnews()) { + if (i.x == k.getBlockX() && i.y == k.getBlockY() && i.z == k.getBlockZ()) { return i; } } @@ -142,25 +142,24 @@ public static KList udnews() { * Get the directional value from the given byte from common directional blocks * (MUST BE BETWEEN 0 and 5 INCLUSIVE) * - * @param b - * the byte + * @param b the byte * @return the direction or null if the byte is outside of the inclusive range * 0-5 */ public static Direction fromByte(byte b) { - if(b > 5 || b < 0) { + if (b > 5 || b < 0) { return null; } - if(b == 0) { + if (b == 0) { return D; - } else if(b == 1) { + } else if (b == 1) { return U; - } else if(b == 2) { + } else if (b == 2) { return N; - } else if(b == 3) { + } else if (b == 3) { return S; - } else if(b == 4) { + } else if (b == 4) { return W; } else { return E; @@ -168,25 +167,25 @@ public static Direction fromByte(byte b) { } public static void calculatePermutations() { - if(permute != null) { + if (permute != null) { return; } permute = new KMap<>(); - for(Direction i : udnews()) { - for(Direction j : udnews()) { + for (Direction i : udnews()) { + for (Direction j : udnews()) { GBiset b = new GBiset<>(i, j); - if(i.equals(j)) { + if (i.equals(j)) { permute.put(b, new DOP("DIRECT") { @Override public Vector op(Vector v) { return v; } }); - } else if(i.reverse().equals(j)) { - if(i.isVertical()) { + } else if (i.reverse().equals(j)) { + if (i.isVertical()) { permute.put(b, new DOP("R180CCZ") { @Override public Vector op(Vector v) { @@ -201,42 +200,42 @@ public Vector op(Vector v) { } }); } - } else if(getDirection(VectorMath.rotate90CX(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CX(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CX") { @Override public Vector op(Vector v) { return VectorMath.rotate90CX(v); } }); - } else if(getDirection(VectorMath.rotate90CCX(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CCX(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CCX") { @Override public Vector op(Vector v) { return VectorMath.rotate90CCX(v); } }); - } else if(getDirection(VectorMath.rotate90CY(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CY(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CY") { @Override public Vector op(Vector v) { return VectorMath.rotate90CY(v); } }); - } else if(getDirection(VectorMath.rotate90CCY(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CCY(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CCY") { @Override public Vector op(Vector v) { return VectorMath.rotate90CCY(v); } }); - } else if(getDirection(VectorMath.rotate90CZ(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CZ(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CZ") { @Override public Vector op(Vector v) { return VectorMath.rotate90CZ(v); } }); - } else if(getDirection(VectorMath.rotate90CCZ(i.toVector())).equals(j)) { + } else if (getDirection(VectorMath.rotate90CCZ(i.toVector())).equals(j)) { permute.put(b, new DOP("R90CCZ") { @Override public Vector op(Vector v) { @@ -257,7 +256,7 @@ public Vector op(Vector v) { @Override public String toString() { - return switch(this) { + return switch (this) { case D -> "Down"; case E -> "East"; case N -> "North"; @@ -277,7 +276,7 @@ public Vector toVector() { } public boolean isCrooked(Direction to) { - if(equals(to.reverse())) { + if (equals(to.reverse())) { return false; } @@ -287,9 +286,9 @@ public boolean isCrooked(Direction to) { public Vector angle(Vector initial, Direction d) { calculatePermutations(); - for(Map.Entry, DOP> entry : permute.entrySet()) { + for (Map.Entry, DOP> entry : permute.entrySet()) { GBiset i = entry.getKey(); - if(i.getA().equals(this) && i.getB().equals(d)) { + if (i.getA().equals(this) && i.getB().equals(d)) { return entry.getValue().op(initial); } } @@ -298,7 +297,7 @@ public Vector angle(Vector initial, Direction d) { } public Direction reverse() { - switch(this) { + switch (this) { case D: return U; case E: @@ -340,7 +339,7 @@ public CuboidDirection f() { * @return the byte value */ public byte byteValue() { - switch(this) { + switch (this) { case D: return 0; case E: @@ -361,7 +360,7 @@ public byte byteValue() { } public BlockFace getFace() { - return switch(this) { + return switch (this) { case D -> BlockFace.DOWN; case E -> BlockFace.EAST; case N -> BlockFace.NORTH; @@ -373,7 +372,7 @@ public BlockFace getFace() { } public Axis getAxis() { - return switch(this) { + return switch (this) { case D, U -> Axis.Y; case E, W -> Axis.X; case N, S -> Axis.Z; diff --git a/src/main/java/com/volmit/iris/util/math/FinalInteger.java b/src/main/java/com/volmit/iris/util/math/FinalInteger.java index 6c934061d..dd4fd2527 100644 --- a/src/main/java/com/volmit/iris/util/math/FinalInteger.java +++ b/src/main/java/com/volmit/iris/util/math/FinalInteger.java @@ -33,8 +33,7 @@ public FinalInteger(Integer t) { /** * Add to this value * - * @param i - * the number to add to this value (value = value + i) + * @param i the number to add to this value (value = value + i) */ public void add(int i) { set(get() + i); @@ -43,8 +42,7 @@ public void add(int i) { /** * Subtract from this value * - * @param i - * the number to subtract from this value (value = value - i) + * @param i the number to subtract from this value (value = value - i) */ public void sub(int i) { set(get() - i); diff --git a/src/main/java/com/volmit/iris/util/math/IrisMathHelper.java b/src/main/java/com/volmit/iris/util/math/IrisMathHelper.java index 87ca5bb81..fea29342e 100644 --- a/src/main/java/com/volmit/iris/util/math/IrisMathHelper.java +++ b/src/main/java/com/volmit/iris/util/math/IrisMathHelper.java @@ -33,11 +33,11 @@ public class IrisMathHelper { static { a = c(2.0f); c = new Random(); - d = new int[] {0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9}; + d = new int[]{0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9}; e = Double.longBitsToDouble(4805340802404319232L); f = new double[257]; g = new double[257]; - for(int var2 = 0; var2 < 257; ++var2) { + for (int var2 = 0; var2 < 257; ++var2) { final double var3 = var2 / 256.0; final double var4 = Math.asin(var3); IrisMathHelper.g[var2] = Math.cos(var4); @@ -87,41 +87,41 @@ public static int f(final double var0) { } public static int clamp(final int var0, final int var1, final int var2) { - if(var0 < var1) { + if (var0 < var1) { return var1; } return Math.min(var0, var2); } public static float a(final float var0, final float var1, final float var2) { - if(var0 < var1) { + if (var0 < var1) { return var1; } return Math.min(var0, var2); } public static double a(final double var0, final double var2, final double var4) { - if(var0 < var2) { + if (var0 < var2) { return var2; } return Math.min(var0, var4); } public static double b(final double var0, final double var2, final double var4) { - if(var4 < 0.0) { + if (var4 < 0.0) { return var0; } - if(var4 > 1.0) { + if (var4 > 1.0) { return var2; } return d(var4, var0, var2); } public static double a(double var0, double var2) { - if(var0 < 0.0) { + if (var0 < 0.0) { var0 = -var0; } - if(var2 < 0.0) { + if (var2 < 0.0) { var2 = -var2; } return Math.max(var0, var2); @@ -132,21 +132,21 @@ public static int a(final int var0, final int var1) { } public static int nextInt(final Random var0, final int var1, final int var2) { - if(var1 >= var2) { + if (var1 >= var2) { return var1; } return var0.nextInt(var2 - var1 + 1) + var1; } public static float a(final Random var0, final float var1, final float var2) { - if(var1 >= var2) { + if (var1 >= var2) { return var1; } return var0.nextFloat() * (var2 - var1) + var1; } public static double a(final Random var0, final double var1, final double var3) { - if(var1 >= var3) { + if (var1 >= var3) { return var1; } return var0.nextDouble() * (var3 - var1) + var1; @@ -154,7 +154,7 @@ public static double a(final Random var0, final double var1, final double var3) public static double a(final long[] var0) { long var = 0L; - for(final long var2 : var0) { + for (final long var2 : var0) { var += var2; } return var / (double) var0.length; @@ -170,10 +170,10 @@ public static int b(final int var0, final int var1) { public static float g(final float var0) { float var = var0 % 360.0f; - if(var >= 180.0f) { + if (var >= 180.0f) { var -= 360.0f; } - if(var < -180.0f) { + if (var < -180.0f) { var += 360.0f; } return var; @@ -181,10 +181,10 @@ public static float g(final float var0) { public static double g(final double var0) { double var = var0 % 360.0; - if(var >= 180.0) { + if (var >= 180.0) { var -= 360.0; } - if(var < -180.0) { + if (var < -180.0) { var += 360.0; } return var; @@ -206,7 +206,7 @@ public static float b(final float var0, final float var1, final float var2) { public static float c(final float var0, final float var1, float var2) { var2 = e(var2); - if(var0 < var1) { + if (var0 < var1) { return a(var0 + var2, var0, var1); } return a(var0 - var2, var1, var0); @@ -241,17 +241,17 @@ public static int f(final int var0) { } public static int c(final int var0, int var1) { - if(var1 == 0) { + if (var1 == 0) { return 0; } - if(var0 == 0) { + if (var0 == 0) { return var1; } - if(var0 < 0) { + if (var0 < 0) { var1 *= -1; } final int var2 = var0 % var1; - if(var2 == 0) { + if (var2 == 0) { return var0; } return var0 + var1 - var2; @@ -287,19 +287,19 @@ public static double c(final double var0, final double var2, final double var4) public static double d(double var0, double var2) { final double var3 = var2 * var2 + var0 * var0; - if(Double.isNaN(var3)) { + if (Double.isNaN(var3)) { return Double.NaN; } final boolean var4 = var0 < 0.0; - if(var4) { + if (var4) { var0 = -var0; } final boolean var5 = var2 < 0.0; - if(var5) { + if (var5) { var2 = -var2; } final boolean var6 = var0 > var2; - if(var6) { + if (var6) { final double var7 = var2; var2 = var0; var0 = var7; @@ -315,13 +315,13 @@ public static double d(double var0, double var2) { final double var13 = var0 * var11 - var2 * var12; final double var14 = (6.0 + var13 * var13) * var13 * 0.16666666666666666; double var15 = var10 + var14; - if(var6) { + if (var6) { var15 = 1.5707963267948966 - var15; } - if(var5) { + if (var5) { var15 = 3.141592653589793 - var15; } - if(var4) { + if (var4) { var15 = -var15; } return var15; @@ -345,7 +345,7 @@ public static int f(final float var0, final float var1, final float var2) { float var8 = 0.0f; float var9 = 0.0f; float var10 = 0.0f; - switch(var3) { + switch (var3) { case 0 -> { var8 = var2; var9 = var7; @@ -376,7 +376,8 @@ public static int f(final float var0, final float var1, final float var2) { var9 = var5; var10 = var6; } - default -> throw new RuntimeException("Something went wrong when converting from HSV to RGB. Input was " + var0 + ", " + var1 + ", " + var2); + default -> + throw new RuntimeException("Something went wrong when converting from HSV to RGB. Input was " + var0 + ", " + var1 + ", " + var2); } final int var11 = clamp((int) (var8 * 255.0f), 0, 255); final int var12 = clamp((int) (var9 * 255.0f), 0, 255); @@ -395,10 +396,10 @@ public static int g(int var0) { public static int a(int var0, final int var1, final IntPredicate var2) { int var3 = var1 - var0; - while(var3 > 0) { + while (var3 > 0) { final int var4 = var3 / 2; final int var5 = var0 + var4; - if(var2.test(var5)) { + if (var2.test(var5)) { var3 = var4; } else { var0 = var5 + 1; @@ -429,7 +430,7 @@ public static double j(final double var0) { } public static int k(final double var0) { - if(var0 == 0.0) { + if (var0 == 0.0) { return 0; } return (var0 > 0.0) ? 1 : -1; @@ -438,9 +439,9 @@ public static int k(final double var0) { @Deprecated public static float j(final float var0, final float var1, final float var2) { float var3; - for(var3 = var1 - var0; var3 < -180.0f; var3 += 360.0f) { + for (var3 = var1 - var0; var3 < -180.0f; var3 += 360.0f) { } - while(var3 >= 180.0f) { + while (var3 >= 180.0f) { var3 -= 360.0f; } return var0 + var2 * var3; diff --git a/src/main/java/com/volmit/iris/util/math/KochanekBartelsInterpolation.java b/src/main/java/com/volmit/iris/util/math/KochanekBartelsInterpolation.java index 6c5449d12..ffd08c444 100644 --- a/src/main/java/com/volmit/iris/util/math/KochanekBartelsInterpolation.java +++ b/src/main/java/com/volmit/iris/util/math/KochanekBartelsInterpolation.java @@ -49,7 +49,7 @@ private void recalc() { coeffC = new Vector[nNodes]; coeffD = new Vector[nNodes]; - if(nNodes == 0) { + if (nNodes == 0) { return; } @@ -57,12 +57,12 @@ private void recalc() { double tensionB = nodeB.getTension(); double biasB = nodeB.getBias(); double continuityB = nodeB.getContinuity(); - for(int i = 0; i < nNodes; ++i) { + for (int i = 0; i < nNodes; ++i) { final double tensionA = tensionB; final double biasA = biasB; final double continuityA = continuityB; - if(i + 1 < nNodes) { + if (i + 1 < nNodes) { nodeB = nodes.get(i + 1); tensionB = nodeB.getTension(); biasB = nodeB.getBias(); @@ -88,16 +88,11 @@ private void recalc() { /** * Returns the linear combination of the given coefficients with the nodes adjacent to baseIndex. * - * @param baseIndex - * node index - * @param f1 - * coefficient for baseIndex-1 - * @param f2 - * coefficient for baseIndex - * @param f3 - * coefficient for baseIndex+1 - * @param f4 - * coefficient for baseIndex+2 + * @param baseIndex node index + * @param f1 coefficient for baseIndex-1 + * @param f2 coefficient for baseIndex + * @param f3 coefficient for baseIndex+1 + * @param f4 coefficient for baseIndex+2 * @return linear combination of nodes[n-1..n+2] with f1..4 */ private Vector linearCombination(int baseIndex, double f1, double f2, double f3, double f4) { @@ -112,16 +107,15 @@ private Vector linearCombination(int baseIndex, double f1, double f2, double f3, /** * Retrieves a node. Indexes are clamped to the valid range. * - * @param index - * node index to retrieve + * @param index node index to retrieve * @return nodes[clamp(0, nodes.length - 1)] */ private Vector retrieve(int index) { - if(index < 0) { + if (index < 0) { return fastRetrieve(0); } - if(index >= nodes.size()) { + if (index >= nodes.size()) { return fastRetrieve(nodes.size() - 1); } @@ -134,11 +128,11 @@ private Vector fastRetrieve(int index) { @Override public Vector getPosition(double position) { - if(coeffA == null) { + if (coeffA == null) { throw new IllegalStateException("Must call setNodes first."); } - if(position > 1) { + if (position > 1) { return null; } @@ -157,11 +151,11 @@ public Vector getPosition(double position) { @Override public Vector get1stDerivative(double position) { - if(coeffA == null) { + if (coeffA == null) { throw new IllegalStateException("Must call setNodes first."); } - if(position > 1) { + if (position > 1) { return null; } @@ -179,11 +173,11 @@ public Vector get1stDerivative(double position) { @Override public double arcLength(double positionA, double positionB) { - if(coeffA == null) { + if (coeffA == null) { throw new IllegalStateException("Must call setNodes first."); } - if(positionA > positionB) { + if (positionA > positionB) { return arcLength(positionB, positionA); } @@ -203,18 +197,18 @@ public double arcLength(double positionA, double positionB) { * Assumes a < b. */ private double arcLengthRecursive(int indexLeft, double remainderLeft, int indexRight, double remainderRight) { - switch(indexRight - indexLeft) { + switch (indexRight - indexLeft) { case 0: return arcLengthRecursive(indexLeft, remainderLeft, remainderRight); case 1: // This case is merely a speed-up for a very common case return arcLengthRecursive(indexLeft, remainderLeft, 1.0) - + arcLengthRecursive(indexRight, 0.0, remainderRight); + + arcLengthRecursive(indexRight, 0.0, remainderRight); default: return arcLengthRecursive(indexLeft, remainderLeft, indexRight - 1, 1.0) - + arcLengthRecursive(indexRight, 0.0, remainderRight); + + arcLengthRecursive(indexRight, 0.0, remainderRight); } } @@ -226,7 +220,7 @@ private double arcLengthRecursive(int index, double remainderLeft, double remain final int nPoints = 8; double accum = a.multiply(remainderLeft).add(b).multiply(remainderLeft).add(c).length() / 2.0; - for(int i = 1; i < nPoints - 1; ++i) { + for (int i = 1; i < nPoints - 1; ++i) { double t = ((double) i) / nPoints; t = (remainderRight - remainderLeft) * t + remainderLeft; accum += a.multiply(t).add(b).multiply(t).add(c).length(); @@ -238,11 +232,11 @@ private double arcLengthRecursive(int index, double remainderLeft, double remain @Override public int getSegment(double position) { - if(coeffA == null) { + if (coeffA == null) { throw new IllegalStateException("Must call setNodes first."); } - if(position > 1) { + if (position > 1) { return Integer.MAX_VALUE; } diff --git a/src/main/java/com/volmit/iris/util/math/M.java b/src/main/java/com/volmit/iris/util/math/M.java index 648d52966..7dc527d4e 100644 --- a/src/main/java/com/volmit/iris/util/math/M.java +++ b/src/main/java/com/volmit/iris/util/math/M.java @@ -35,7 +35,7 @@ public class M { public static int tick = 0; static { - for(int i = 0; i < sin.length; i++) { + for (int i = 0; i < sin.length; i++) { sin[i] = (float) Math.sin((i * Math.PI) / (precision * 180)); } } @@ -52,16 +52,11 @@ public class M { *
* would return 10 * - * @param amin - * the resulting minimum - * @param amax - * the resulting maximum - * @param bmin - * the initial minimum - * @param bmax - * the initial maximum - * @param b - * the initial value + * @param amin the resulting minimum + * @param amax the resulting maximum + * @param bmin the initial minimum + * @param bmax the initial maximum + * @param b the initial value * @return the resulting value */ public static double rangeScale(double amin, double amax, double bmin, double bmax, double b) { @@ -73,12 +68,9 @@ public static double rangeScale(double amin, double amax, double bmin, double bm *

* If from = 0 and to = 100 and at = 25 then it would return 0.25 * - * @param from - * the from - * @param to - * the to - * @param at - * the at + * @param from the from + * @param to the to + * @param at the at * @return the percent */ public static double lerpInverse(double from, double to, double at) { @@ -88,12 +80,9 @@ public static double lerpInverse(double from, double to, double at) { /** * Linear interpolation from a to b where f is the percent across * - * @param a - * the first pos (0) - * @param b - * the second pos (1) - * @param f - * the percent + * @param a the first pos (0) + * @param b the second pos (1) + * @param f the percent * @return the value */ public static double lerp(double a, double b, double f) { @@ -103,14 +92,10 @@ public static double lerp(double a, double b, double f) { /** * Bilinear interpolation * - * @param a - * the first point (0, 0) - * @param b - * the second point (1, 0) - * @param c - * the third point (0, 1) - * @param d - * the fourth point (1, 1) + * @param a the first point (0, 0) + * @param b the second point (1, 0) + * @param c the third point (0, 1) + * @param d the fourth point (1, 1) * @return the bilerped value */ public static double bilerp(double a, double b, double c, double d, double x, double y) { @@ -120,28 +105,17 @@ public static double bilerp(double a, double b, double c, double d, double x, do /** * Trilinear interpolation * - * @param a - * the first point (0, 0, 0) - * @param b - * the second point (1, 0, 0) - * @param c - * the third point (0, 0, 1) - * @param d - * the fourth point (1, 0, 1) - * @param e - * the fifth point (0, 1, 0) - * @param f - * the sixth point (1, 1, 0) - * @param g - * the seventh point (0, 1, 1) - * @param h - * the eighth point (1, 1, 1) - * @param x - * the x - * @param y - * the y - * @param z - * the z + * @param a the first point (0, 0, 0) + * @param b the second point (1, 0, 0) + * @param c the third point (0, 0, 1) + * @param d the fourth point (1, 0, 1) + * @param e the fifth point (0, 1, 0) + * @param f the sixth point (1, 1, 0) + * @param g the seventh point (0, 1, 1) + * @param h the eighth point (1, 1, 1) + * @param x the x + * @param y the y + * @param z the z * @return the trilerped value */ public static double trilerp(double a, double b, double c, double d, double e, double f, double g, double h, double x, double y, double z) { @@ -151,12 +125,9 @@ public static double trilerp(double a, double b, double c, double d, double e, d /** * Clip a value * - * @param value - * the value - * @param min - * the min - * @param max - * the max + * @param value the value + * @param min the min + * @param max the max * @return the clipped value */ @SuppressWarnings("unchecked") @@ -167,13 +138,12 @@ public static T clip(T value, T min, T max) { /** * Get true or false based on random percent * - * @param d - * between 0 and 1 + * @param d between 0 and 1 * @return true if true */ public static boolean r(Double d) { //noinspection ReplaceNullCheck - if(d == null) { + if (d == null) { return Math.random() < 0.5; } @@ -184,10 +154,8 @@ public static boolean r(Double d) { * Get the ticks per second from a time in nanoseconds, the rad can be used for * multiple ticks * - * @param ns - * the time in nanoseconds - * @param rad - * the radius of the time + * @param ns the time in nanoseconds + * @param rad the radius of the time * @return the ticks per second in double form */ public static double tps(long ns, int rad) { @@ -197,8 +165,7 @@ public static double tps(long ns, int rad) { /** * Get the number of ticks from a time in nanoseconds * - * @param ns - * the nanoseconds + * @param ns the nanoseconds * @return the amount of ticks */ public static double ticksFromNS(long ns) { @@ -208,10 +175,8 @@ public static double ticksFromNS(long ns) { /** * Get a random int from to (inclusive) * - * @param f - * the from - * @param t - * the to + * @param f the from + * @param t the to * @return the value */ public static int irand(int f, int t) { @@ -221,10 +186,8 @@ public static int irand(int f, int t) { /** * Get a random float from to (inclusive) * - * @param f - * the from - * @param t - * the to + * @param f the from + * @param t the to * @return the value */ public static float frand(float f, float t) { @@ -234,10 +197,8 @@ public static float frand(float f, float t) { /** * Get a random double from to (inclusive) * - * @param f - * the from - * @param t - * the to + * @param f the from + * @param t the to * @return the value */ public static double drand(double f, double t) { @@ -265,8 +226,7 @@ public static long ms() { /** * Fast sin function * - * @param a - * the number + * @param a the number * @return the sin */ public static float sin(float a) { @@ -276,8 +236,7 @@ public static float sin(float a) { /** * Fast cos function * - * @param a - * the number + * @param a the number * @return the cos */ public static float cos(float a) { @@ -287,8 +246,7 @@ public static float cos(float a) { /** * Fast tan function * - * @param a - * the number + * @param a the number * @return the tan */ public static float tan(float a) { @@ -305,8 +263,8 @@ public static float tan(float a) { public static T max(T... doubles) { double max = Double.MIN_VALUE; - for(T i : doubles) { - if(i.doubleValue() > max) { + for (T i : doubles) { + if (i.doubleValue() > max) { max = i.doubleValue(); } } @@ -317,16 +275,15 @@ public static T max(T... doubles) { /** * Smallest number * - * @param doubles - * the numbers + * @param doubles the numbers * @return the smallest one */ @SuppressWarnings("unchecked") public static T min(T... doubles) { double min = Double.MAX_VALUE; - for(T i : doubles) { - if(i.doubleValue() < min) { + for (T i : doubles) { + if (i.doubleValue() < min) { min = i.doubleValue(); } } @@ -341,21 +298,17 @@ public static T min(T... doubles) { * makes the expression (4x1)/2 == 2. Keep note that you must use 0-9, you * cannot skip, or start at a number other than 0. * - * @param expression - * the expression with variables - * @param args - * the arguments/variables + * @param expression the expression with variables + * @param args the arguments/variables * @return the resulting double value - * @throws ScriptException - * ... gg - * @throws IndexOutOfBoundsException - * learn to count + * @throws ScriptException ... gg + * @throws IndexOutOfBoundsException learn to count */ public static double evaluate(String expression, Double... args) throws ScriptException, IndexOutOfBoundsException { - for(int i = 0; i < args.length; i++) { + for (int i = 0; i < args.length; i++) { String current = "$" + i; - if(expression.contains(current)) { + if (expression.contains(current)) { expression = expression.replaceAll(Matcher.quoteReplacement(current), args[i] + ""); } } @@ -366,11 +319,9 @@ public static double evaluate(String expression, Double... args) throws ScriptEx /** * Evaluates an expression using javascript engine and returns the double * - * @param expression - * the mathimatical expression + * @param expression the mathimatical expression * @return the double result - * @throws ScriptException - * ... gg + * @throws ScriptException ... gg */ public static double evaluate(String expression) throws ScriptException { ScriptEngineManager mgr = new ScriptEngineManager(); @@ -382,12 +333,9 @@ public static double evaluate(String expression) throws ScriptException { /** * is the number "is" within from-to * - * @param from - * the lower end - * @param to - * the upper end - * @param is - * the check + * @param from the lower end + * @param to the upper end + * @param is the check * @return true if its within */ public static boolean within(int from, int to, int is) { @@ -406,8 +354,7 @@ public static long epochDays() { /** * Get the amount of days past since the epoch time (1970 jan 1 utc) * - * @param ms - * the time in milliseconds + * @param ms the time in milliseconds * @return the epoch days */ private static long epochDays(long ms) { diff --git a/src/main/java/com/volmit/iris/util/math/MathHelper.java b/src/main/java/com/volmit/iris/util/math/MathHelper.java index 924b58419..e38338a83 100644 --- a/src/main/java/com/volmit/iris/util/math/MathHelper.java +++ b/src/main/java/com/volmit/iris/util/math/MathHelper.java @@ -38,7 +38,7 @@ public class MathHelper { private static final long m = -9223372036854775808L; private static final float n = 10430.378F; private static final Random p = new Random(); - private static final int[] q = new int[] {0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9}; + private static final int[] q = new int[]{0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9}; private static final double r = 0.16666666666666666D; private static final int s = 8; private static final int t = 257; @@ -47,7 +47,7 @@ public class MathHelper { private static final double[] w = new double[257]; static { - for(int var0 = 0; var0 < 257; ++var0) { + for (int var0 = 0; var0 < 257; ++var0) { double var1 = (double) var0 / 256.0D; double var3 = Math.asin(var1); w[var0] = Math.cos(var3); @@ -105,7 +105,7 @@ public static int e(double var0) { } public static byte a(byte var0, byte var1, byte var2) { - if(var0 < var1) { + if (var0 < var1) { return var1; } else { return var0 > var2 ? var2 : var0; @@ -113,7 +113,7 @@ public static byte a(byte var0, byte var1, byte var2) { } public static int clamp(int var0, int var1, int var2) { - if(var0 < var1) { + if (var0 < var1) { return var1; } else { return Math.min(var0, var2); @@ -121,7 +121,7 @@ public static int clamp(int var0, int var1, int var2) { } public static long a(long var0, long var2, long var4) { - if(var0 < var2) { + if (var0 < var2) { return var2; } else { return Math.min(var0, var4); @@ -129,7 +129,7 @@ public static long a(long var0, long var2, long var4) { } public static float a(float var0, float var1, float var2) { - if(var0 < var1) { + if (var0 < var1) { return var1; } else { return Math.min(var0, var2); @@ -137,7 +137,7 @@ public static float a(float var0, float var1, float var2) { } public static double a(double var0, double var2, double var4) { - if(var0 < var2) { + if (var0 < var2) { return var2; } else { return Math.min(var0, var4); @@ -145,7 +145,7 @@ public static double a(double var0, double var2, double var4) { } public static double b(double var0, double var2, double var4) { - if(var4 < 0.0D) { + if (var4 < 0.0D) { return var0; } else { return var4 > 1.0D ? var2 : d(var4, var0, var2); @@ -153,7 +153,7 @@ public static double b(double var0, double var2, double var4) { } public static float b(float var0, float var1, float var2) { - if(var2 < 0.0F) { + if (var2 < 0.0F) { return var0; } else { return var2 > 1.0F ? var1 : h(var2, var0, var1); @@ -161,11 +161,11 @@ public static float b(float var0, float var1, float var2) { } public static double a(double var0, double var2) { - if(var0 < 0.0D) { + if (var0 < 0.0D) { var0 = -var0; } - if(var2 < 0.0D) { + if (var2 < 0.0D) { var2 = -var2; } @@ -193,7 +193,7 @@ public static double a(long[] var0) { long[] var3 = var0; int var4 = var0.length; - for(int var5 = 0; var5 < var4; ++var5) { + for (int var5 = 0; var5 < var4; ++var5) { long var6 = var3[var5]; var1 += var6; } @@ -223,11 +223,11 @@ public static double c(double var0, double var2) { public static int b(int var0) { int var1 = var0 % 360; - if(var1 >= 180) { + if (var1 >= 180) { var1 -= 360; } - if(var1 < -180) { + if (var1 < -180) { var1 += 360; } @@ -236,11 +236,11 @@ public static int b(int var0) { public static float g(float var0) { float var1 = var0 % 360.0F; - if(var1 >= 180.0F) { + if (var1 >= 180.0F) { var1 -= 360.0F; } - if(var1 < -180.0F) { + if (var1 < -180.0F) { var1 += 360.0F; } @@ -249,11 +249,11 @@ public static float g(float var0) { public static double f(double var0) { double var2 = var0 % 360.0D; - if(var2 >= 180.0D) { + if (var2 >= 180.0D) { var2 -= 360.0D; } - if(var2 < -180.0D) { + if (var2 < -180.0D) { var2 += 360.0D; } @@ -287,7 +287,7 @@ public static float e(float var0, float var1, float var2) { public static double a(String var0, double var1) { try { return Double.parseDouble(var0); - } catch(Throwable var4) { + } catch (Throwable var4) { return var1; } } @@ -382,22 +382,22 @@ public static double c(double var0, double var2, double var4) { public static double d(double var0, double var2) { double var4 = var2 * var2 + var0 * var0; - if(Double.isNaN(var4)) { + if (Double.isNaN(var4)) { return 0.0D; } else { boolean var6 = var0 < 0.0D; - if(var6) { + if (var6) { var0 = -var0; } boolean var7 = var2 < 0.0D; - if(var7) { + if (var7) { var2 = -var2; } boolean var8 = var0 > var2; double var9; - if(var8) { + if (var8) { var9 = var2; var2 = var0; var0 = var9; @@ -414,15 +414,15 @@ public static double d(double var0, double var2) { double var20 = var0 * var16 - var2 * var18; double var22 = (6.0D + var20 * var20) * var20 * 0.16666666666666666D; double var24 = var14 + var22; - if(var8) { + if (var8) { var24 = 1.5707963267948966D - var24; } - if(var7) { + if (var7) { var24 = 3.141592653589793D - var24; } - if(var6) { + if (var6) { var24 = -var24; } @@ -466,7 +466,7 @@ public static int g(float var0, float var1, float var2) { float var8; float var9; float var10; - switch(var3) { + switch (var3) { case 0: var8 = var2; var9 = var7; @@ -530,17 +530,17 @@ public static double[] a(double... var0) { double[] var2f = var0; int var3 = var0.length; - for(int var4 = 0; var4 < var3; ++var4) { + for (int var4 = 0; var4 < var3; ++var4) { double var5 = var2f[var4]; var1 = (float) ((double) var1 + var5); } int var2; - for(var2 = 0; var2 < var0.length; ++var2) { + for (var2 = 0; var2 < var0.length; ++var2) { var0[var2] /= var1; } - for(var2 = 0; var2 < var0.length; ++var2) { + for (var2 = 0; var2 < var0.length; ++var2) { var0[var2] += var2 == 0 ? 0.0D : var0[var2 - 1]; } @@ -550,8 +550,8 @@ public static double[] a(double... var0) { public static int a(Random var0, double[] var1) { double var2 = var0.nextDouble(); - for(int var4 = 0; var4 < var1.length; ++var4) { - if(var2 < var1[var4]) { + for (int var4 = 0; var4 < var1.length; ++var4) { + if (var2 < var1[var4]) { return var4; } } @@ -563,7 +563,7 @@ public static double[] a(double var0, double var2, double var4, int var6, int va double[] var8 = new double[var7 - var6 + 1]; int var9 = 0; - for(int var10 = var6; var10 <= var7; ++var10) { + for (int var10 = var6; var10 <= var7; ++var10) { var8[var9] = Math.max(0.0D, var0 * StrictMath.exp(-((double) var10 - var4) * ((double) var10 - var4) / (2.0D * var2 * var2))); ++var9; } @@ -575,7 +575,7 @@ public static double[] a(double var0, double var2, double var4, double var6, dou double[] var14 = new double[var13 - var12 + 1]; int var15 = 0; - for(int var16 = var12; var16 <= var13; ++var16) { + for (int var16 = var12; var16 <= var13; ++var16) { var14[var15] = Math.max(0.0D, var0 * StrictMath.exp(-((double) var16 - var4) * ((double) var16 - var4) / (2.0D * var2 * var2)) + var6 * StrictMath.exp(-((double) var16 - var10) * ((double) var16 - var10) / (2.0D * var8 * var8))); ++var15; } @@ -587,7 +587,7 @@ public static double[] a(double var0, double var2, int var4, int var5) { double[] var6 = new double[var5 - var4 + 1]; int var7 = 0; - for(int var8 = var4; var8 <= var5; ++var8) { + for (int var8 = var4; var8 <= var5; ++var8) { var6[var7] = Math.max(var0 * StrictMath.log(var8) + var2, 0.0D); ++var7; } @@ -598,10 +598,10 @@ public static double[] a(double var0, double var2, int var4, int var5) { public static int a(int var0, int var1, IntPredicate var2) { int var3 = var1 - var0; - while(var3 > 0) { + while (var3 > 0) { int var4 = var3 / 2; int var5 = var0 + var4; - if(var2.test(var5)) { + if (var2.test(var5)) { var3 = var4; } else { var0 = var5 + 1; @@ -637,7 +637,7 @@ public static double j(double var0) { } public static int k(double var0) { - if(var0 == 0.0D) { + if (var0 == 0.0D) { return 0; } else { return var0 > 0.0D ? 1 : -1; @@ -655,10 +655,10 @@ public static float j(float var0, float var1, float var2) { @Deprecated public static float k(float var0, float var1, float var2) { float var3; - for(var3 = var1 - var0; var3 < -180.0F; var3 += 360.0F) { + for (var3 = var1 - var0; var3 < -180.0F; var3 += 360.0F) { } - while(var3 >= 180.0F) { + while (var3 >= 180.0F) { var3 -= 360.0F; } @@ -667,11 +667,11 @@ public static float k(float var0, float var1, float var2) { @Deprecated public static float l(double var0) { - while(var0 >= 180.0D) { + while (var0 >= 180.0D) { var0 -= 360.0D; } - while(var0 < -180.0D) { + while (var0 < -180.0D) { var0 += 360.0D; } diff --git a/src/main/java/com/volmit/iris/util/math/PathInterpolation.java b/src/main/java/com/volmit/iris/util/math/PathInterpolation.java index 03f84f696..6deea6b48 100644 --- a/src/main/java/com/volmit/iris/util/math/PathInterpolation.java +++ b/src/main/java/com/volmit/iris/util/math/PathInterpolation.java @@ -28,16 +28,14 @@ public interface PathInterpolation { * Sets nodes to be used by subsequent calls to * {@link #getPosition(double)} and the other methods. * - * @param nodes - * the nodes + * @param nodes the nodes */ void setNodes(List nodes); /** * Gets the result of f(position). * - * @param position - * the position to interpolate + * @param position the position to interpolate * @return the result */ Vector getPosition(double position); @@ -45,8 +43,7 @@ public interface PathInterpolation { /** * Gets the result of f'(position). * - * @param position - * the position to interpolate + * @param position the position to interpolate * @return the result */ Vector get1stDerivative(double position); @@ -56,10 +53,8 @@ public interface PathInterpolation { * That means it calculates the arc length (in meters) between positionA * and positionB. * - * @param positionA - * lower limit - * @param positionB - * upper limit + * @param positionA lower limit + * @param positionB upper limit * @return the arc length */ double arcLength(double positionA, double positionB); @@ -67,8 +62,7 @@ public interface PathInterpolation { /** * Get the segment position. * - * @param position - * the position + * @param position the position * @return the segment position */ int getSegment(double position); diff --git a/src/main/java/com/volmit/iris/util/math/Point3d.java b/src/main/java/com/volmit/iris/util/math/Point3d.java index d1743a59f..e3b934ada 100644 --- a/src/main/java/com/volmit/iris/util/math/Point3d.java +++ b/src/main/java/com/volmit/iris/util/math/Point3d.java @@ -30,12 +30,9 @@ public class Point3d extends Tuple3d implements java.io.Serializable { /** * Constructs and initializes a Point3d from the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public Point3d(double x, double y, double z) { super(x, y, z); @@ -45,8 +42,7 @@ public Point3d(double x, double y, double z) { /** * Constructs and initializes a Point3d from the array of length 3. * - * @param p - * the array of length 3 containing xyz in order + * @param p the array of length 3 containing xyz in order */ public Point3d(double[] p) { super(p); @@ -56,8 +52,7 @@ public Point3d(double[] p) { /** * Constructs and initializes a Point3d from the specified Point3d. * - * @param p1 - * the Point3d containing the initialization x y z data + * @param p1 the Point3d containing the initialization x y z data */ public Point3d(Point3d p1) { super(p1); @@ -67,8 +62,7 @@ public Point3d(Point3d p1) { /** * Constructs and initializes a Point3d from the specified Point3f. * - * @param p1 - * the Point3f containing the initialization x y z data + * @param p1 the Point3f containing the initialization x y z data */ public Point3d(Point3f p1) { super(p1); @@ -78,8 +72,7 @@ public Point3d(Point3f p1) { /** * Constructs and initializes a Point3d from the specified Tuple3f. * - * @param t1 - * the Tuple3f containing the initialization x y z data + * @param t1 the Tuple3f containing the initialization x y z data */ public Point3d(Tuple3f t1) { super(t1); @@ -89,8 +82,7 @@ public Point3d(Tuple3f t1) { /** * Constructs and initializes a Point3d from the specified Tuple3d. * - * @param t1 - * the Tuple3d containing the initialization x y z data + * @param t1 the Tuple3d containing the initialization x y z data */ public Point3d(Tuple3d t1) { super(t1); @@ -108,8 +100,7 @@ public Point3d() { /** * Returns the square of the distance between this point and point p1. * - * @param p1 - * the other point + * @param p1 the other point * @return the square of the distance */ public final double distanceSquared(Point3d p1) { @@ -125,8 +116,7 @@ public final double distanceSquared(Point3d p1) { /** * Returns the distance between this point and point p1. * - * @param p1 - * the other point + * @param p1 the other point * @return the distance */ public final double distance(Point3d p1) { @@ -144,13 +134,12 @@ public final double distance(Point3d p1) { * point p1. The L-1 distance is equal to: * abs(x1-x2) + abs(y1-y2) + abs(z1-z2). * - * @param p1 - * the other point + * @param p1 the other point * @return the L-1 distance */ public final double distanceL1(Point3d p1) { return Math.abs(this.x - p1.x) + Math.abs(this.y - p1.y) + - Math.abs(this.z - p1.z); + Math.abs(this.z - p1.z); } @@ -159,8 +148,7 @@ public final double distanceL1(Point3d p1) { * point p1. The L-infinite distance is equal to * MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)]. * - * @param p1 - * the other point + * @param p1 the other point * @return the L-infinite distance */ public final double distanceLinf(Point3d p1) { @@ -175,8 +163,7 @@ public final double distanceLinf(Point3d p1) { * Multiplies each of the x,y,z components of the Point4d parameter * by 1/w and places the projected values into this point. * - * @param p1 - * the source Point4d, which is not modified + * @param p1 the source Point4d, which is not modified */ public final void project(Point4d p1) { double oneOw; diff --git a/src/main/java/com/volmit/iris/util/math/Point3f.java b/src/main/java/com/volmit/iris/util/math/Point3f.java index 78ef274b5..1c82b7e6d 100644 --- a/src/main/java/com/volmit/iris/util/math/Point3f.java +++ b/src/main/java/com/volmit/iris/util/math/Point3f.java @@ -31,12 +31,9 @@ public class Point3f extends Tuple3f implements java.io.Serializable { /** * Constructs and initializes a Point3f from the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public Point3f(float x, float y, float z) { super(x, y, z); @@ -46,8 +43,7 @@ public Point3f(float x, float y, float z) { /** * Constructs and initializes a Point3f from the array of length 3. * - * @param p - * the array of length 3 containing xyz in order + * @param p the array of length 3 containing xyz in order */ public Point3f(float[] p) { super(p); @@ -57,8 +53,7 @@ public Point3f(float[] p) { /** * Constructs and initializes a Point3f from the specified Point3f. * - * @param p1 - * the Point3f containing the initialization x y z data + * @param p1 the Point3f containing the initialization x y z data */ public Point3f(Point3f p1) { super(p1); @@ -68,8 +63,7 @@ public Point3f(Point3f p1) { /** * Constructs and initializes a Point3f from the specified Point3d. * - * @param p1 - * the Point3d containing the initialization x y z data + * @param p1 the Point3d containing the initialization x y z data */ public Point3f(Point3d p1) { super(p1); @@ -79,8 +73,7 @@ public Point3f(Point3d p1) { /** * Constructs and initializes a Point3f from the specified Tuple3f. * - * @param t1 - * the Tuple3f containing the initialization x y z data + * @param t1 the Tuple3f containing the initialization x y z data */ public Point3f(Tuple3f t1) { super(t1); @@ -90,8 +83,7 @@ public Point3f(Tuple3f t1) { /** * Constructs and initializes a Point3f from the specified Tuple3d. * - * @param t1 - * the Tuple3d containing the initialization x y z data + * @param t1 the Tuple3d containing the initialization x y z data */ public Point3f(Tuple3d t1) { super(t1); @@ -110,8 +102,7 @@ public Point3f() { * Computes the square of the distance between this point and * point p1. * - * @param p1 - * the other point + * @param p1 the other point * @return the square of the distance */ public final float distanceSquared(Point3f p1) { @@ -127,8 +118,7 @@ public final float distanceSquared(Point3f p1) { /** * Computes the distance between this point and point p1. * - * @param p1 - * the other point + * @param p1 the other point * @return the distance */ public final float distance(Point3f p1) { @@ -146,8 +136,7 @@ public final float distance(Point3f p1) { * point p1. The L-1 distance is equal to: * abs(x1-x2) + abs(y1-y2) + abs(z1-z2). * - * @param p1 - * the other point + * @param p1 the other point * @return the L-1 distance */ public final float distanceL1(Point3f p1) { @@ -160,8 +149,7 @@ public final float distanceL1(Point3f p1) { * point p1. The L-infinite distance is equal to * MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)]. * - * @param p1 - * the other point + * @param p1 the other point * @return the L-infinite distance */ public final float distanceLinf(Point3f p1) { @@ -176,8 +164,7 @@ public final float distanceLinf(Point3f p1) { * Multiplies each of the x,y,z components of the Point4f parameter * by 1/w and places the projected values into this point. * - * @param p1 - * the source Point4f, which is not modified + * @param p1 the source Point4f, which is not modified */ public final void project(Point4f p1) { float oneOw; diff --git a/src/main/java/com/volmit/iris/util/math/Point4d.java b/src/main/java/com/volmit/iris/util/math/Point4d.java index 79ba4e246..fdfb72551 100644 --- a/src/main/java/com/volmit/iris/util/math/Point4d.java +++ b/src/main/java/com/volmit/iris/util/math/Point4d.java @@ -31,14 +31,10 @@ public class Point4d extends Tuple4d implements java.io.Serializable { /** * Constructs and initializes a Point4d from the specified xyzw coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate - * @param w - * the w coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @param w the w coordinate */ public Point4d(double x, double y, double z, double w) { super(x, y, z, w); @@ -48,8 +44,7 @@ public Point4d(double x, double y, double z, double w) { * Constructs and initializes a Point4d from the coordinates contained * in the array. * - * @param p - * the array of length 4 containing xyzw in order + * @param p the array of length 4 containing xyzw in order */ public Point4d(double[] p) { super(p); @@ -59,8 +54,7 @@ public Point4d(double[] p) { /** * Constructs and initializes a Point4d from the specified Point4d. * - * @param p1 - * the Point4d containing the initialization x y z w data + * @param p1 the Point4d containing the initialization x y z w data */ public Point4d(Point4d p1) { super(p1); @@ -70,8 +64,7 @@ public Point4d(Point4d p1) { /** * Constructs and initializes a Point4d from the specified Point4f. * - * @param p1 - * the Point4f containing the initialization x y z w data + * @param p1 the Point4f containing the initialization x y z w data */ public Point4d(Point4f p1) { super(p1); @@ -81,8 +74,7 @@ public Point4d(Point4f p1) { /** * Constructs and initializes a Point4d from the specified Tuple4f. * - * @param t1 - * the Tuple4f containing the initialization x y z w data + * @param t1 the Tuple4f containing the initialization x y z w data */ public Point4d(Tuple4f t1) { super(t1); @@ -92,8 +84,7 @@ public Point4d(Tuple4f t1) { /** * Constructs and initializes a Point4d from the specified Tuple4d. * - * @param t1 - * the Tuple4d containing the initialization x y z w data + * @param t1 the Tuple4d containing the initialization x y z w data */ public Point4d(Tuple4d t1) { super(t1); @@ -106,8 +97,7 @@ public Point4d(Tuple4d t1) { * components of tuple t1. The w component of this point * is set to 1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied * @since vecmath 1.2 */ public Point4d(Tuple3d t1) { @@ -128,8 +118,7 @@ public Point4d() { * components of tuple t1. The w component of this point * is set to 1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied * @since vecmath 1.2 */ public final void set(Tuple3d t1) { @@ -143,8 +132,7 @@ public final void set(Tuple3d t1) { /** * Returns the square of the distance between this point and point p1. * - * @param p1 - * the first point + * @param p1 the first point * @return the square of distance between this point and point p1 */ public final double distanceSquared(Point4d p1) { @@ -161,8 +149,7 @@ public final double distanceSquared(Point4d p1) { /** * Returns the distance between this point and point p1. * - * @param p1 - * the first point + * @param p1 the first point * @return the distance between these this point and point p1. */ public final double distance(Point4d p1) { @@ -181,13 +168,12 @@ public final double distance(Point4d p1) { * point p1. The L-1 distance is equal to: * abs(x1-x2) + abs(y1-y2) + abs(z1-z2) + abs(w1-w2). * - * @param p1 - * the other point + * @param p1 the other point * @return the L-1 distance */ public final double distanceL1(Point4d p1) { return Math.abs(this.x - p1.x) + Math.abs(this.y - p1.y) + - Math.abs(this.z - p1.z) + Math.abs(this.w - p1.w); + Math.abs(this.z - p1.z) + Math.abs(this.w - p1.w); } /** @@ -195,8 +181,7 @@ public final double distanceL1(Point4d p1) { * point p1. The L-infinite distance is equal to * MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2), abs(w1-w2)]. * - * @param p1 - * the other point + * @param p1 the other point * @return the L-infinite distance */ public final double distanceLinf(Point4d p1) { @@ -212,8 +197,7 @@ public final double distanceLinf(Point4d p1) { * by 1/w, places the projected values into this point, and places * a 1 as the w parameter of this point. * - * @param p1 - * the source Point4d, which is not modified + * @param p1 the source Point4d, which is not modified */ public final void project(Point4d p1) { double oneOw; diff --git a/src/main/java/com/volmit/iris/util/math/Point4f.java b/src/main/java/com/volmit/iris/util/math/Point4f.java index ab4fc954f..df98cbe08 100644 --- a/src/main/java/com/volmit/iris/util/math/Point4f.java +++ b/src/main/java/com/volmit/iris/util/math/Point4f.java @@ -31,14 +31,10 @@ public class Point4f extends Tuple4f implements java.io.Serializable { /** * Constructs and initializes a Point4f from the specified xyzw coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate - * @param w - * the w coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @param w the w coordinate */ public Point4f(float x, float y, float z, float w) { super(x, y, z, w); @@ -48,8 +44,7 @@ public Point4f(float x, float y, float z, float w) { /** * Constructs and initializes a Point4f from the array of length 4. * - * @param p - * the array of length 4 containing xyzw in order + * @param p the array of length 4 containing xyzw in order */ public Point4f(float[] p) { super(p); @@ -59,8 +54,7 @@ public Point4f(float[] p) { /** * Constructs and initializes a Point4f from the specified Point4f. * - * @param p1 - * the Point4f containing the initialization x y z w data + * @param p1 the Point4f containing the initialization x y z w data */ public Point4f(Point4f p1) { super(p1); @@ -70,8 +64,7 @@ public Point4f(Point4f p1) { /** * Constructs and initializes a Point4f from the specified Point4d. * - * @param p1 - * the Point4d containing the initialization x y z w data + * @param p1 the Point4d containing the initialization x y z w data */ public Point4f(Point4d p1) { super(p1); @@ -81,8 +74,7 @@ public Point4f(Point4d p1) { /** * Constructs and initializes a Point4f from the specified Tuple4f. * - * @param t1 - * the Tuple4f containing the initialization x y z w data + * @param t1 the Tuple4f containing the initialization x y z w data */ public Point4f(Tuple4f t1) { super(t1); @@ -92,8 +84,7 @@ public Point4f(Tuple4f t1) { /** * Constructs and initializes a Point4f from the specified Tuple4d. * - * @param t1 - * the Tuple4d containing the initialization x y z w data + * @param t1 the Tuple4d containing the initialization x y z w data */ public Point4f(Tuple4d t1) { super(t1); @@ -106,8 +97,7 @@ public Point4f(Tuple4d t1) { * components of tuple t1. The w component of this point * is set to 1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied * @since vecmath 1.2 */ public Point4f(Tuple3f t1) { @@ -128,8 +118,7 @@ public Point4f() { * components of tuple t1. The w component of this point * is set to 1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied * @since vecmath 1.2 */ public final void set(Tuple3f t1) { @@ -143,8 +132,7 @@ public final void set(Tuple3f t1) { /** * Computes the square of the distance between this point and point p1. * - * @param p1 - * the other point + * @param p1 the other point * @return the square of distance between these two points as a float */ public final float distanceSquared(Point4f p1) { @@ -161,8 +149,7 @@ public final float distanceSquared(Point4f p1) { /** * Computes the distance between this point and point p1. * - * @param p1 - * the other point + * @param p1 the other point * @return the distance between the two points */ public final float distance(Point4f p1) { @@ -181,8 +168,7 @@ public final float distance(Point4f p1) { * point p1. The L-1 distance is equal to: * abs(x1-x2) + abs(y1-y2) + abs(z1-z2) + abs(w1-w2). * - * @param p1 - * the other point + * @param p1 the other point * @return the L-1 distance */ public final float distanceL1(Point4f p1) { @@ -195,8 +181,7 @@ public final float distanceL1(Point4f p1) { * point p1. The L-infinite distance is equal to * MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2), abs(w1-w2)]. * - * @param p1 - * the other point + * @param p1 the other point * @return the L-infinite distance */ public final float distanceLinf(Point4f p1) { @@ -213,8 +198,7 @@ public final float distanceLinf(Point4f p1) { * by 1/w, places the projected values into this point, and places * a 1 as the w parameter of this point. * - * @param p1 - * the source Point4f, which is not modified + * @param p1 the source Point4f, which is not modified */ public final void project(Point4f p1) { float oneOw; diff --git a/src/main/java/com/volmit/iris/util/math/Position2.java b/src/main/java/com/volmit/iris/util/math/Position2.java index d30e4e8b5..2175118ee 100644 --- a/src/main/java/com/volmit/iris/util/math/Position2.java +++ b/src/main/java/com/volmit/iris/util/math/Position2.java @@ -70,10 +70,10 @@ public Position2 regionToChunk() { @Override public boolean equals(Object obj) { - if(this == obj) { + if (this == obj) { return true; } - if(!(obj instanceof Position2 other)) { + if (!(obj instanceof Position2 other)) { return false; } return x == other.x && z == other.z; diff --git a/src/main/java/com/volmit/iris/util/math/RNG.java b/src/main/java/com/volmit/iris/util/math/RNG.java index 02fb804ab..d74680b09 100644 --- a/src/main/java/com/volmit/iris/util/math/RNG.java +++ b/src/main/java/com/volmit/iris/util/math/RNG.java @@ -42,8 +42,7 @@ public RNG(long seed) { /** * Creates a seed (long) from the hash of the seed string * - * @param seed - * the seed (string) + * @param seed the seed (string) */ public RNG(String seed) { this(UUID.nameUUIDFromBytes(seed.getBytes(StandardCharsets.UTF_8)).getLeastSignificantBits() + UUID.nameUUIDFromBytes(seed.getBytes(StandardCharsets.UTF_8)).getMostSignificantBits() + (seed.length() * 32564L)); @@ -60,7 +59,7 @@ public RNG nextParallelRNG(long signature) { public String s(int length) { StringBuilder sb = new StringBuilder(); - for(int i = 0; i < length; i++) { + for (int i = 0; i < length; i++) { sb.append(c()); } @@ -74,8 +73,7 @@ public char c() { /** * Pick a random enum * - * @param t - * the enum class + * @param t the enum class * @return the enum */ public T e(Class t) { @@ -116,7 +114,7 @@ public float f() { } public double d(double lowerBound, double upperBound) { - if(lowerBound > upperBound) { + if (lowerBound > upperBound) { return M.lerp(upperBound, lowerBound, nextDouble()); } @@ -172,11 +170,11 @@ public boolean chance(double chance) { } public T pick(List pieces) { - if(pieces.isEmpty()) { + if (pieces.isEmpty()) { return null; } - if(pieces.size() == 1) { + if (pieces.size() == 1) { return pieces.get(0); } diff --git a/src/main/java/com/volmit/iris/util/math/RollingSequence.java b/src/main/java/com/volmit/iris/util/math/RollingSequence.java index 116bbe6af..777a51955 100644 --- a/src/main/java/com/volmit/iris/util/math/RollingSequence.java +++ b/src/main/java/com/volmit/iris/util/math/RollingSequence.java @@ -39,7 +39,7 @@ public RollingSequence(int size) { public double addLast(int amt) { double f = 0; - for(int i = 0; i < Math.min(values.length, amt); i++) { + for (int i = 0; i < Math.min(values.length, amt); i++) { f += values[i]; } @@ -55,7 +55,7 @@ public void setPrecision(boolean p) { } public double getMin() { - if(dirtyExtremes > (isPrecision() ? 0 : values.length)) { + if (dirtyExtremes > (isPrecision() ? 0 : values.length)) { resetExtremes(); } @@ -63,7 +63,7 @@ public double getMin() { } public double getMax() { - if(dirtyExtremes > (isPrecision() ? 0 : values.length)) { + if (dirtyExtremes > (isPrecision() ? 0 : values.length)) { resetExtremes(); } @@ -71,7 +71,7 @@ public double getMax() { } public double getMedian() { - if(dirtyMedian) { + if (dirtyMedian) { recalculateMedian(); } @@ -87,7 +87,7 @@ public void resetExtremes() { max = Integer.MIN_VALUE; min = Integer.MAX_VALUE; - for(double i : values) { + for (double i : values) { max = M.max(max, i); min = M.min(min, i); } diff --git a/src/main/java/com/volmit/iris/util/math/Spiral.java b/src/main/java/com/volmit/iris/util/math/Spiral.java index c3aed05d1..a405880c7 100644 --- a/src/main/java/com/volmit/iris/util/math/Spiral.java +++ b/src/main/java/com/volmit/iris/util/math/Spiral.java @@ -41,20 +41,20 @@ public static Position2 next(Position2 p) { int ax = Math.abs(x); int az = Math.abs(z); - if(x == 0 && z == 0) { + if (x == 0 && z == 0) { return p.add(1, 0); } - if(ax == az) { - if(x > 0 && z > 0) return left(p); - else if(x < 0 && z > 0) return down(p); - else if(x < 0 && z < 0) return right(p); - else if(x > 0 && z < 0) return up(p); + if (ax == az) { + if (x > 0 && z > 0) return left(p); + else if (x < 0 && z > 0) return down(p); + else if (x < 0 && z < 0) return right(p); + else if (x > 0 && z < 0) return up(p); } else { - if(x > z && ax > az) return up(p); - else if(x < z && ax < az) return left(p); - else if(x < z && ax > az) return down(p); - else if(x > z && ax < az) return right(p); + if (x > z && ax > az) return up(p); + else if (x < z && ax < az) return left(p); + else if (x < z && ax > az) return down(p); + else if (x > z && ax < az) return right(p); } return p; @@ -83,13 +83,13 @@ private static Position2 right(Position2 p) { @NotNull @Override public Iterator iterator() { - return new SpiralIterator(0, this, start); + return new SpiralIterator( this, 0, start); } @AllArgsConstructor static class SpiralIterator implements Iterator { - private long itr = 0; private final Spiral s; + private long itr = 0; private Position2 cursor; @Override diff --git a/src/main/java/com/volmit/iris/util/math/Spiraler.java b/src/main/java/com/volmit/iris/util/math/Spiraler.java index 9da139cf4..fc8716bb7 100644 --- a/src/main/java/com/volmit/iris/util/math/Spiraler.java +++ b/src/main/java/com/volmit/iris/util/math/Spiraler.java @@ -36,7 +36,7 @@ static void Spiral(int X, int Y) { } public void drain() { - while(hasNext()) { + while (hasNext()) { next(); } } @@ -62,11 +62,11 @@ public boolean hasNext() { } public void next() { - if((-sizeX / 2 <= x) && (x <= sizeX / 2) && (-sizeZ / 2 <= z) && (z <= sizeZ / 2)) { + if ((-sizeX / 2 <= x) && (x <= sizeX / 2) && (-sizeZ / 2 <= z) && (z <= sizeZ / 2)) { spiraled.on(x + ox, z + ox); } - if((x == z) || ((x < 0) && (x == -z)) || ((x > 0) && (x == 1 - z))) { + if ((x == z) || ((x < 0) && (x == -z)) || ((x > 0) && (x == 1 - z))) { t = dx; dx = -dz; dz = t; @@ -78,7 +78,7 @@ public void next() { public int count() { int c = 0; - while(hasNext()) { + while (hasNext()) { next(); c++; } diff --git a/src/main/java/com/volmit/iris/util/math/Tuple2d.java b/src/main/java/com/volmit/iris/util/math/Tuple2d.java index 937298d01..e6b02d5c1 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple2d.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple2d.java @@ -42,10 +42,8 @@ public abstract class Tuple2d implements java.io.Serializable, Cloneable { /** * Constructs and initializes a Tuple2d from the specified xy coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate + * @param x the x coordinate + * @param y the y coordinate */ public Tuple2d(double x, double y) { this.x = x; @@ -56,8 +54,7 @@ public Tuple2d(double x, double y) { /** * Constructs and initializes a Tuple2d from the specified array. * - * @param t - * the array of length 2 containing xy in order + * @param t the array of length 2 containing xy in order */ public Tuple2d(double[] t) { this.x = t[0]; @@ -68,8 +65,7 @@ public Tuple2d(double[] t) { /** * Constructs and initializes a Tuple2d from the specified Tuple2d. * - * @param t1 - * the Tuple2d containing the initialization x y data + * @param t1 the Tuple2d containing the initialization x y data */ public Tuple2d(Tuple2d t1) { this.x = t1.x; @@ -80,8 +76,7 @@ public Tuple2d(Tuple2d t1) { /** * Constructs and initializes a Tuple2d from the specified Tuple2f. * - * @param t1 - * the Tuple2f containing the initialization x y data + * @param t1 the Tuple2f containing the initialization x y data */ public Tuple2d(Tuple2f t1) { this.x = t1.x; @@ -100,10 +95,8 @@ public Tuple2d() { /** * Sets the value of this tuple to the specified xy coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate + * @param x the x coordinate + * @param y the y coordinate */ public final void set(double x, double y) { this.x = x; @@ -115,8 +108,7 @@ public final void set(double x, double y) { * Sets the value of this tuple from the 2 values specified in * the array. * - * @param t - * the array of length 2 containing xy in order + * @param t the array of length 2 containing xy in order */ public final void set(double[] t) { this.x = t[0]; @@ -127,8 +119,7 @@ public final void set(double[] t) { /** * Sets the value of this tuple to the value of the Tuple2d argument. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple2d t1) { this.x = t1.x; @@ -139,8 +130,7 @@ public final void set(Tuple2d t1) { /** * Sets the value of this tuple to the value of Tuple2f t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple2f t1) { this.x = t1.x; @@ -150,8 +140,7 @@ public final void set(Tuple2f t1) { /** * Copies the value of the elements of this tuple into the array t. * - * @param t - * the array that will contain the values of the vector + * @param t the array that will contain the values of the vector */ public final void get(double[] t) { t[0] = this.x; @@ -162,10 +151,8 @@ public final void get(double[] t) { /** * Sets the value of this tuple to the vector sum of tuples t1 and t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void add(Tuple2d t1, Tuple2d t2) { this.x = t1.x + t2.x; @@ -176,8 +163,7 @@ public final void add(Tuple2d t1, Tuple2d t2) { /** * Sets the value of this tuple to the vector sum of itself and tuple t1. * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void add(Tuple2d t1) { this.x += t1.x; @@ -189,10 +175,8 @@ public final void add(Tuple2d t1) { * Sets the value of this tuple to the vector difference of * tuple t1 and t2 (this = t1 - t2). * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void sub(Tuple2d t1, Tuple2d t2) { this.x = t1.x - t2.x; @@ -204,8 +188,7 @@ public final void sub(Tuple2d t1, Tuple2d t2) { * Sets the value of this tuple to the vector difference of * itself and tuple t1 (this = this - t1). * - * @param t1 - * the other vector + * @param t1 the other vector */ public final void sub(Tuple2d t1) { this.x -= t1.x; @@ -216,8 +199,7 @@ public final void sub(Tuple2d t1) { /** * Sets the value of this tuple to the negation of tuple t1. * - * @param t1 - * the source vector + * @param t1 the source vector */ public final void negate(Tuple2d t1) { this.x = -t1.x; @@ -238,10 +220,8 @@ public final void negate() { * Sets the value of this tuple to the scalar multiplication * of tuple t1. * - * @param s - * the scalar value - * @param t1 - * the source tuple + * @param s the scalar value + * @param t1 the source tuple */ public final void scale(double s, Tuple2d t1) { this.x = s * t1.x; @@ -253,8 +233,7 @@ public final void scale(double s, Tuple2d t1) { * Sets the value of this tuple to the scalar multiplication * of itself. * - * @param s - * the scalar value + * @param s the scalar value */ public final void scale(double s) { this.x *= s; @@ -266,12 +245,9 @@ public final void scale(double s) { * Sets the value of this tuple to the scalar multiplication * of tuple t1 and then adds tuple t2 (this = s*t1 + t2). * - * @param s - * the scalar value - * @param t1 - * the tuple to be multipled - * @param t2 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be multipled + * @param t2 the tuple to be added */ public final void scaleAdd(double s, Tuple2d t1, Tuple2d t2) { this.x = s * t1.x + t2.x; @@ -283,10 +259,8 @@ public final void scaleAdd(double s, Tuple2d t1, Tuple2d t2) { * Sets the value of this tuple to the scalar multiplication * of itself and then adds tuple t1 (this = s*this + t1). * - * @param s - * the scalar value - * @param t1 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be added */ public final void scaleAdd(double s, Tuple2d t1) { this.x = s * this.x + t1.x; @@ -315,14 +289,13 @@ public int hashCode() { * Returns true if all of the data members of Tuple2d t1 are * equal to the corresponding data members in this Tuple2d. * - * @param t1 - * the vector with which the comparison is made + * @param t1 the vector with which the comparison is made * @return true or false */ public boolean equals(Tuple2d t1) { try { return (this.x == t1.x && this.y == t1.y); - } catch(NullPointerException e2) { + } catch (NullPointerException e2) { Iris.reportError(e2); return false; } @@ -334,15 +307,14 @@ public boolean equals(Tuple2d t1) { * data members of t1 are equal to the corresponding data members in * this Tuple2d. * - * @param t1 - * the object with which the comparison is made + * @param t1 the object with which the comparison is made * @return true or false */ public boolean equals(Object t1) { try { Tuple2d t2 = (Tuple2d) t1; return (this.x == t2.x && this.y == t2.y); - } catch(NullPointerException | ClassCastException e2) { + } catch (NullPointerException | ClassCastException e2) { Iris.reportError(e2); return false; } @@ -355,21 +327,19 @@ public boolean equals(Object t1) { * otherwise returns false. The L-infinite * distance is equal to MAX[abs(x1-x2), abs(y1-y2)]. * - * @param t1 - * the tuple to be compared to this tuple - * @param epsilon - * the threshold value + * @param t1 the tuple to be compared to this tuple + * @param epsilon the threshold value * @return true or false */ public boolean epsilonEquals(Tuple2d t1, double epsilon) { double diff; diff = x - t1.x; - if(Double.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Double.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = y - t1.y; - if(Double.isNaN(diff)) return false; + if (Double.isNaN(diff)) return false; return !((diff < 0 ? -diff : diff) > epsilon); } @@ -388,19 +358,16 @@ public String toString() { * Clamps the tuple parameter to the range [low, high] and * places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clamp(double min, double max, Tuple2d t) { - if(t.x > max) { + if (t.x > max) { x = max; } else x = Math.max(t.x, min); - if(t.y > max) { + if (t.y > max) { y = max; } else y = Math.max(t.y, min); @@ -411,10 +378,8 @@ public final void clamp(double min, double max, Tuple2d t) { * Clamps the minimum value of the tuple parameter to the min * parameter and places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMin(double min, Tuple2d t) { x = Math.max(t.x, min); @@ -428,10 +393,8 @@ public final void clampMin(double min, Tuple2d t) { * Clamps the maximum value of the tuple parameter to the max * parameter and places the values into this tuple. * - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMax(double max, Tuple2d t) { x = Math.min(t.x, max); @@ -445,8 +408,7 @@ public final void clampMax(double max, Tuple2d t) { * Sets each component of the tuple parameter to its absolute * value and places the modified values into this tuple. * - * @param t - * the source tuple, which will not be modified + * @param t the source tuple, which will not be modified */ public final void absolute(Tuple2d t) { x = Math.abs(t.x); @@ -457,21 +419,19 @@ public final void absolute(Tuple2d t) { /** * Clamps this tuple to the range [low, high]. * - * @param min - * the lowest value in this tuple after clamping - * @param max - * the highest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping + * @param max the highest value in this tuple after clamping */ public final void clamp(double min, double max) { - if(x > max) { + if (x > max) { x = max; - } else if(x < min) { + } else if (x < min) { x = min; } - if(y > max) { + if (y > max) { y = max; - } else if(y < min) { + } else if (y < min) { y = min; } @@ -481,24 +441,22 @@ public final void clamp(double min, double max) { /** * Clamps the minimum value of this tuple to the min parameter. * - * @param min - * the lowest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping */ public final void clampMin(double min) { - if(x < min) x = min; - if(y < min) y = min; + if (x < min) x = min; + if (y < min) y = min; } /** * Clamps the maximum value of this tuple to the max parameter. * - * @param max - * the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping */ public final void clampMax(double max) { - if(x > max) x = max; - if(y > max) y = max; + if (x > max) x = max; + if (y > max) y = max; } @@ -515,12 +473,9 @@ public final void absolute() { * Linearly interpolates between tuples t1 and t2 and places the * result into this tuple: this = (1-alpha)*t1 + alpha*t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param t2 the second tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple2d t1, Tuple2d t2, double alpha) { this.x = (1 - alpha) * t1.x + alpha * t2.x; @@ -532,10 +487,8 @@ public final void interpolate(Tuple2d t1, Tuple2d t2, double alpha) { * Linearly interpolates between this tuple and tuple t1 and * places the result into this tuple: this = (1-alpha)*this + alpha*t1. * - * @param t1 - * the first tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple2d t1, double alpha) { this.x = (1 - alpha) * this.x + alpha * t1.x; @@ -547,8 +500,7 @@ public final void interpolate(Tuple2d t1, double alpha) { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @throws OutOfMemoryError - * if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since vecmath 1.3 */ @@ -556,7 +508,7 @@ public Object clone() { // Since there are no arrays we can just use Object.clone() try { return super.clone(); - } catch(CloneNotSupportedException e) { + } catch (CloneNotSupportedException e) { Iris.reportError(e); // this shouldn't happen, since we are Cloneable throw new InternalError(); @@ -578,8 +530,7 @@ public final double getX() { /** * Set the x coordinate. * - * @param x - * value to x coordinate. + * @param x value to x coordinate. * @since vecmath 1.5 */ public final void setX(double x) { @@ -601,8 +552,7 @@ public final double getY() { /** * Set the y coordinate. * - * @param y - * value to y coordinate. + * @param y value to y coordinate. * @since vecmath 1.5 */ public final void setY(double y) { diff --git a/src/main/java/com/volmit/iris/util/math/Tuple2f.java b/src/main/java/com/volmit/iris/util/math/Tuple2f.java index a96f65c81..1fd2da63d 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple2f.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple2f.java @@ -42,10 +42,8 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** * Constructs and initializes a Tuple2f from the specified xy coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate + * @param x the x coordinate + * @param y the y coordinate */ public Tuple2f(float x, float y) { this.x = x; @@ -56,8 +54,7 @@ public Tuple2f(float x, float y) { /** * Constructs and initializes a Tuple2f from the specified array. * - * @param t - * the array of length 2 containing xy in order + * @param t the array of length 2 containing xy in order */ public Tuple2f(float[] t) { this.x = t[0]; @@ -68,8 +65,7 @@ public Tuple2f(float[] t) { /** * Constructs and initializes a Tuple2f from the specified Tuple2f. * - * @param t1 - * the Tuple2f containing the initialization x y data + * @param t1 the Tuple2f containing the initialization x y data */ public Tuple2f(Tuple2f t1) { this.x = t1.x; @@ -80,8 +76,7 @@ public Tuple2f(Tuple2f t1) { /** * Constructs and initializes a Tuple2f from the specified Tuple2d. * - * @param t1 - * the Tuple2d containing the initialization x y data + * @param t1 the Tuple2d containing the initialization x y data */ public Tuple2f(Tuple2d t1) { this.x = (float) t1.x; @@ -101,10 +96,8 @@ public Tuple2f() { /** * Sets the value of this tuple to the specified xy coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate + * @param x the x coordinate + * @param y the y coordinate */ public final void set(float x, float y) { this.x = x; @@ -116,8 +109,7 @@ public final void set(float x, float y) { * Sets the value of this tuple from the 2 values specified in * the array. * - * @param t - * the array of length 2 containing xy in order + * @param t the array of length 2 containing xy in order */ public final void set(float[] t) { this.x = t[0]; @@ -128,8 +120,7 @@ public final void set(float[] t) { /** * Sets the value of this tuple to the value of the Tuple2f argument. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple2f t1) { this.x = t1.x; @@ -140,8 +131,7 @@ public final void set(Tuple2f t1) { /** * Sets the value of this tuple to the value of the Tuple2d argument. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple2d t1) { this.x = (float) t1.x; @@ -152,8 +142,7 @@ public final void set(Tuple2d t1) { /** * Copies the value of the elements of this tuple into the array t. * - * @param t - * the array that will contain the values of the vector + * @param t the array that will contain the values of the vector */ public final void get(float[] t) { t[0] = this.x; @@ -164,10 +153,8 @@ public final void get(float[] t) { /** * Sets the value of this tuple to the vector sum of tuples t1 and t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void add(Tuple2f t1, Tuple2f t2) { this.x = t1.x + t2.x; @@ -178,8 +165,7 @@ public final void add(Tuple2f t1, Tuple2f t2) { /** * Sets the value of this tuple to the vector sum of itself and tuple t1. * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void add(Tuple2f t1) { this.x += t1.x; @@ -191,10 +177,8 @@ public final void add(Tuple2f t1) { * Sets the value of this tuple to the vector difference of * tuple t1 and t2 (this = t1 - t2). * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void sub(Tuple2f t1, Tuple2f t2) { this.x = t1.x - t2.x; @@ -206,8 +190,7 @@ public final void sub(Tuple2f t1, Tuple2f t2) { * Sets the value of this tuple to the vector difference of * itself and tuple t1 (this = this - t1). * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void sub(Tuple2f t1) { this.x -= t1.x; @@ -218,8 +201,7 @@ public final void sub(Tuple2f t1) { /** * Sets the value of this tuple to the negation of tuple t1. * - * @param t1 - * the source tuple + * @param t1 the source tuple */ public final void negate(Tuple2f t1) { this.x = -t1.x; @@ -240,10 +222,8 @@ public final void negate() { * Sets the value of this tuple to the scalar multiplication * of tuple t1. * - * @param s - * the scalar value - * @param t1 - * the source tuple + * @param s the scalar value + * @param t1 the source tuple */ public final void scale(float s, Tuple2f t1) { this.x = s * t1.x; @@ -255,8 +235,7 @@ public final void scale(float s, Tuple2f t1) { * Sets the value of this tuple to the scalar multiplication * of itself. * - * @param s - * the scalar value + * @param s the scalar value */ public final void scale(float s) { this.x *= s; @@ -268,12 +247,9 @@ public final void scale(float s) { * Sets the value of this tuple to the scalar multiplication * of tuple t1 and then adds tuple t2 (this = s*t1 + t2). * - * @param s - * the scalar value - * @param t1 - * the tuple to be multipled - * @param t2 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be multipled + * @param t2 the tuple to be added */ public final void scaleAdd(float s, Tuple2f t1, Tuple2f t2) { this.x = s * t1.x + t2.x; @@ -285,10 +261,8 @@ public final void scaleAdd(float s, Tuple2f t1, Tuple2f t2) { * Sets the value of this tuple to the scalar multiplication * of itself and then adds tuple t1 (this = s*this + t1). * - * @param s - * the scalar value - * @param t1 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be added */ public final void scaleAdd(float s, Tuple2f t1) { this.x = s * this.x + t1.x; @@ -317,14 +291,13 @@ public int hashCode() { * Returns true if all of the data members of Tuple2f t1 are * equal to the corresponding data members in this Tuple2f. * - * @param t1 - * the vector with which the comparison is made + * @param t1 the vector with which the comparison is made * @return true or false */ public boolean equals(Tuple2f t1) { try { return (this.x == t1.x && this.y == t1.y); - } catch(NullPointerException e2) { + } catch (NullPointerException e2) { Iris.reportError(e2); return false; } @@ -336,15 +309,14 @@ public boolean equals(Tuple2f t1) { * data members of t1 are equal to the corresponding data members in * this Tuple2f. * - * @param t1 - * the object with which the comparison is made + * @param t1 the object with which the comparison is made * @return true or false */ public boolean equals(Object t1) { try { Tuple2f t2 = (Tuple2f) t1; return (this.x == t2.x && this.y == t2.y); - } catch(NullPointerException | ClassCastException e2) { + } catch (NullPointerException | ClassCastException e2) { Iris.reportError(e2); return false; } @@ -357,21 +329,19 @@ public boolean equals(Object t1) { * otherwise returns false. The L-infinite * distance is equal to MAX[abs(x1-x2), abs(y1-y2)]. * - * @param t1 - * the tuple to be compared to this tuple - * @param epsilon - * the threshold value + * @param t1 the tuple to be compared to this tuple + * @param epsilon the threshold value * @return true or false */ public boolean epsilonEquals(Tuple2f t1, float epsilon) { float diff; diff = x - t1.x; - if(Float.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Float.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = y - t1.y; - if(Float.isNaN(diff)) return false; + if (Float.isNaN(diff)) return false; return !((diff < 0 ? -diff : diff) > epsilon); } @@ -390,19 +360,16 @@ public String toString() { * Clamps the tuple parameter to the range [low, high] and * places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clamp(float min, float max, Tuple2f t) { - if(t.x > max) { + if (t.x > max) { x = max; } else x = Math.max(t.x, min); - if(t.y > max) { + if (t.y > max) { y = max; } else y = Math.max(t.y, min); @@ -413,10 +380,8 @@ public final void clamp(float min, float max, Tuple2f t) { * Clamps the minimum value of the tuple parameter to the min * parameter and places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMin(float min, Tuple2f t) { x = Math.max(t.x, min); @@ -430,10 +395,8 @@ public final void clampMin(float min, Tuple2f t) { * Clamps the maximum value of the tuple parameter to the max * parameter and places the values into this tuple. * - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMax(float max, Tuple2f t) { x = Math.min(t.x, max); @@ -447,8 +410,7 @@ public final void clampMax(float max, Tuple2f t) { * Sets each component of the tuple parameter to its absolute * value and places the modified values into this tuple. * - * @param t - * the source tuple, which will not be modified + * @param t the source tuple, which will not be modified */ public final void absolute(Tuple2f t) { x = Math.abs(t.x); @@ -459,21 +421,19 @@ public final void absolute(Tuple2f t) { /** * Clamps this tuple to the range [low, high]. * - * @param min - * the lowest value in this tuple after clamping - * @param max - * the highest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping + * @param max the highest value in this tuple after clamping */ public final void clamp(float min, float max) { - if(x > max) { + if (x > max) { x = max; - } else if(x < min) { + } else if (x < min) { x = min; } - if(y > max) { + if (y > max) { y = max; - } else if(y < min) { + } else if (y < min) { y = min; } @@ -483,24 +443,22 @@ public final void clamp(float min, float max) { /** * Clamps the minimum value of this tuple to the min parameter. * - * @param min - * the lowest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping */ public final void clampMin(float min) { - if(x < min) x = min; - if(y < min) y = min; + if (x < min) x = min; + if (y < min) y = min; } /** * Clamps the maximum value of this tuple to the max parameter. * - * @param max - * the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping */ public final void clampMax(float max) { - if(x > max) x = max; - if(y > max) y = max; + if (x > max) x = max; + if (y > max) y = max; } @@ -517,12 +475,9 @@ public final void absolute() { * Linearly interpolates between tuples t1 and t2 and places the * result into this tuple: this = (1-alpha)*t1 + alpha*t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param t2 the second tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple2f t1, Tuple2f t2, float alpha) { this.x = (1 - alpha) * t1.x + alpha * t2.x; @@ -535,10 +490,8 @@ public final void interpolate(Tuple2f t1, Tuple2f t2, float alpha) { * Linearly interpolates between this tuple and tuple t1 and * places the result into this tuple: this = (1-alpha)*this + alpha*t1. * - * @param t1 - * the first tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple2f t1, float alpha) { @@ -551,8 +504,7 @@ public final void interpolate(Tuple2f t1, float alpha) { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @throws OutOfMemoryError - * if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since vecmath 1.3 */ @@ -560,7 +512,7 @@ public Object clone() { // Since there are no arrays we can just use Object.clone() try { return super.clone(); - } catch(CloneNotSupportedException e) { + } catch (CloneNotSupportedException e) { Iris.reportError(e); // this shouldn't happen, since we are Cloneable throw new InternalError(); @@ -582,8 +534,7 @@ public final float getX() { /** * Set the x coordinate. * - * @param x - * value to x coordinate. + * @param x value to x coordinate. * @since vecmath 1.5 */ public final void setX(float x) { @@ -605,8 +556,7 @@ public final float getY() { /** * Set the y coordinate. * - * @param y - * value to y coordinate. + * @param y value to y coordinate. * @since vecmath 1.5 */ public final void setY(float y) { diff --git a/src/main/java/com/volmit/iris/util/math/Tuple3d.java b/src/main/java/com/volmit/iris/util/math/Tuple3d.java index e033e7382..ea4415335 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple3d.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple3d.java @@ -47,12 +47,9 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * Constructs and initializes a Tuple3d from the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public Tuple3d(double x, double y, double z) { this.x = x; @@ -63,8 +60,7 @@ public Tuple3d(double x, double y, double z) { /** * Constructs and initializes a Tuple3d from the array of length 3. * - * @param t - * the array of length 3 containing xyz in order + * @param t the array of length 3 containing xyz in order */ public Tuple3d(double[] t) { this.x = t[0]; @@ -75,8 +71,7 @@ public Tuple3d(double[] t) { /** * Constructs and initializes a Tuple3d from the specified Tuple3d. * - * @param t1 - * the Tuple3d containing the initialization x y z data + * @param t1 the Tuple3d containing the initialization x y z data */ public Tuple3d(Tuple3d t1) { this.x = t1.x; @@ -87,8 +82,7 @@ public Tuple3d(Tuple3d t1) { /** * Constructs and initializes a Tuple3d from the specified Tuple3f. * - * @param t1 - * the Tuple3f containing the initialization x y z data + * @param t1 the Tuple3f containing the initialization x y z data */ public Tuple3d(Tuple3f t1) { this.x = t1.x; @@ -108,12 +102,9 @@ public Tuple3d() { /** * Sets the value of this tuple to the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public final void set(double x, double y, double z) { this.x = x; @@ -125,8 +116,7 @@ public final void set(double x, double y, double z) { * Sets the value of this tuple to the value of the xyz coordinates * located in the array of length 3. * - * @param t - * the array of length 3 containing xyz in order + * @param t the array of length 3 containing xyz in order */ public final void set(double[] t) { this.x = t[0]; @@ -137,8 +127,7 @@ public final void set(double[] t) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple3d t1) { this.x = t1.x; @@ -149,8 +138,7 @@ public final void set(Tuple3d t1) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple3f t1) { this.x = t1.x; @@ -162,8 +150,7 @@ public final void set(Tuple3f t1) { * Copies the x,y,z coordinates of this tuple into the array t * of length 3. * - * @param t - * the target array + * @param t the target array */ public final void get(double[] t) { t[0] = this.x; @@ -175,8 +162,7 @@ public final void get(double[] t) { /** * Copies the x,y,z coordinates of this tuple into the tuple t. * - * @param t - * the Tuple3d object into which the values of this object are copied + * @param t the Tuple3d object into which the values of this object are copied */ public final void get(Tuple3d t) { t.x = this.x; @@ -188,10 +174,8 @@ public final void get(Tuple3d t) { /** * Sets the value of this tuple to the sum of tuples t1 and t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void add(Tuple3d t1, Tuple3d t2) { this.x = t1.x + t2.x; @@ -203,8 +187,7 @@ public final void add(Tuple3d t1, Tuple3d t2) { /** * Sets the value of this tuple to the sum of itself and t1. * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void add(Tuple3d t1) { this.x += t1.x; @@ -216,10 +199,8 @@ public final void add(Tuple3d t1) { * Sets the value of this tuple to the difference of tuples * t1 and t2 (this = t1 - t2). * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void sub(Tuple3d t1, Tuple3d t2) { this.x = t1.x - t2.x; @@ -231,8 +212,7 @@ public final void sub(Tuple3d t1, Tuple3d t2) { * Sets the value of this tuple to the difference * of itself and t1 (this = this - t1). * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void sub(Tuple3d t1) { this.x -= t1.x; @@ -244,8 +224,7 @@ public final void sub(Tuple3d t1) { /** * Sets the value of this tuple to the negation of tuple t1. * - * @param t1 - * the source tuple + * @param t1 the source tuple */ public final void negate(Tuple3d t1) { this.x = -t1.x; @@ -268,10 +247,8 @@ public final void negate() { * Sets the value of this tuple to the scalar multiplication * of tuple t1. * - * @param s - * the scalar value - * @param t1 - * the source tuple + * @param s the scalar value + * @param t1 the source tuple */ public final void scale(double s, Tuple3d t1) { this.x = s * t1.x; @@ -284,8 +261,7 @@ public final void scale(double s, Tuple3d t1) { * Sets the value of this tuple to the scalar multiplication * of itself. * - * @param s - * the scalar value + * @param s the scalar value */ public final void scale(double s) { this.x *= s; @@ -298,12 +274,9 @@ public final void scale(double s) { * Sets the value of this tuple to the scalar multiplication * of tuple t1 and then adds tuple t2 (this = s*t1 + t2). * - * @param s - * the scalar value - * @param t1 - * the tuple to be multipled - * @param t2 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be multipled + * @param t2 the tuple to be added */ public final void scaleAdd(double s, Tuple3d t1, Tuple3d t2) { this.x = s * t1.x + t2.x; @@ -325,10 +298,8 @@ public final void scaleAdd(double s, Tuple3f t1) { * Sets the value of this tuple to the scalar multiplication * of itself and then adds tuple t1 (this = s*this + t1). * - * @param s - * the scalar value - * @param t1 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be added */ public final void scaleAdd(double s, Tuple3d t1) { this.x = s * this.x + t1.x; @@ -370,14 +341,13 @@ public int hashCode() { * Returns true if all of the data members of Tuple3d t1 are * equal to the corresponding data members in this Tuple3d. * - * @param t1 - * the tuple with which the comparison is made + * @param t1 the tuple with which the comparison is made * @return true or false */ public boolean equals(Tuple3d t1) { try { return (this.x == t1.x && this.y == t1.y && this.z == t1.z); - } catch(NullPointerException e2) { + } catch (NullPointerException e2) { Iris.reportError(e2); return false; } @@ -388,15 +358,14 @@ public boolean equals(Tuple3d t1) { * data members of t1 are equal to the corresponding data members in * this Tuple3d. * - * @param t1 - * the Object with which the comparison is made + * @param t1 the Object with which the comparison is made * @return true or false */ public boolean equals(Object t1) { try { Tuple3d t2 = (Tuple3d) t1; return (this.x == t2.x && this.y == t2.y && this.z == t2.z); - } catch(ClassCastException | NullPointerException e1) { + } catch (ClassCastException | NullPointerException e1) { Iris.reportError(e1); return false; } @@ -409,25 +378,23 @@ public boolean equals(Object t1) { * otherwise returns false. The L-infinite * distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)]. * - * @param t1 - * the tuple to be compared to this tuple - * @param epsilon - * the threshold value + * @param t1 the tuple to be compared to this tuple + * @param epsilon the threshold value * @return true or false */ public boolean epsilonEquals(Tuple3d t1, double epsilon) { double diff; diff = x - t1.x; - if(Double.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Double.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = y - t1.y; - if(Double.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Double.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = z - t1.z; - if(Double.isNaN(diff)) return false; + if (Double.isNaN(diff)) return false; return !((diff < 0 ? -diff : diff) > epsilon); } @@ -446,23 +413,20 @@ public final void clamp(float min, float max, Tuple3d t) { * Clamps the tuple parameter to the range [low, high] and * places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clamp(double min, double max, Tuple3d t) { - if(t.x > max) { + if (t.x > max) { x = max; } else x = Math.max(t.x, min); - if(t.y > max) { + if (t.y > max) { y = max; } else y = Math.max(t.y, min); - if(t.z > max) { + if (t.z > max) { z = max; } else z = Math.max(t.z, min); @@ -482,10 +446,8 @@ public final void clampMin(float min, Tuple3d t) { * Clamps the minimum value of the tuple parameter to the min * parameter and places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMin(double min, Tuple3d t) { x = Math.max(t.x, min); @@ -510,10 +472,8 @@ public final void clampMax(float max, Tuple3d t) { * Clamps the maximum value of the tuple parameter to the max * parameter and places the values into this tuple. * - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMax(double max, Tuple3d t) { x = Math.min(t.x, max); @@ -529,8 +489,7 @@ public final void clampMax(double max, Tuple3d t) { * Sets each component of the tuple parameter to its absolute * value and places the modified values into this tuple. * - * @param t - * the source tuple, which will not be modified + * @param t the source tuple, which will not be modified */ public final void absolute(Tuple3d t) { x = Math.abs(t.x); @@ -552,27 +511,25 @@ public final void clamp(float min, float max) { /** * Clamps this tuple to the range [low, high]. * - * @param min - * the lowest value in this tuple after clamping - * @param max - * the highest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping + * @param max the highest value in this tuple after clamping */ public final void clamp(double min, double max) { - if(x > max) { + if (x > max) { x = max; - } else if(x < min) { + } else if (x < min) { x = min; } - if(y > max) { + if (y > max) { y = max; - } else if(y < min) { + } else if (y < min) { y = min; } - if(z > max) { + if (z > max) { z = max; - } else if(z < min) { + } else if (z < min) { z = min; } @@ -591,13 +548,12 @@ public final void clampMin(float min) { /** * Clamps the minimum value of this tuple to the min parameter. * - * @param min - * the lowest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping */ public final void clampMin(double min) { - if(x < min) x = min; - if(y < min) y = min; - if(z < min) z = min; + if (x < min) x = min; + if (y < min) y = min; + if (z < min) z = min; } @@ -613,13 +569,12 @@ public final void clampMax(float max) { /** * Clamps the maximum value of this tuple to the max parameter. * - * @param max - * the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping */ public final void clampMax(double max) { - if(x > max) x = max; - if(y > max) y = max; - if(z > max) z = max; + if (x > max) x = max; + if (y > max) y = max; + if (z > max) z = max; } @@ -646,12 +601,9 @@ public final void interpolate(Tuple3d t1, Tuple3d t2, float alpha) { * Linearly interpolates between tuples t1 and t2 and places the * result into this tuple: this = (1-alpha)*t1 + alpha*t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param t2 the second tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple3d t1, Tuple3d t2, double alpha) { this.x = (1 - alpha) * t1.x + alpha * t2.x; @@ -673,10 +625,8 @@ public final void interpolate(Tuple3d t1, float alpha) { * Linearly interpolates between this tuple and tuple t1 and * places the result into this tuple: this = (1-alpha)*this + alpha*t1. * - * @param t1 - * the first tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple3d t1, double alpha) { this.x = (1 - alpha) * this.x + alpha * t1.x; @@ -688,8 +638,7 @@ public final void interpolate(Tuple3d t1, double alpha) { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @throws OutOfMemoryError - * if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since vecmath 1.3 */ @@ -697,7 +646,7 @@ public Object clone() { // Since there are no arrays we can just use Object.clone() try { return super.clone(); - } catch(CloneNotSupportedException e) { + } catch (CloneNotSupportedException e) { Iris.reportError(e); // this shouldn't happen, since we are Cloneable throw new InternalError(); @@ -718,8 +667,7 @@ public final double getX() { /** * Set the x coordinate. * - * @param x - * value to x coordinate. + * @param x value to x coordinate. * @since vecmath 1.5 */ public final void setX(double x) { @@ -741,8 +689,7 @@ public final double getY() { /** * Set the y coordinate. * - * @param y - * value to y coordinate. + * @param y value to y coordinate. * @since vecmath 1.5 */ public final void setY(double y) { @@ -763,8 +710,7 @@ public final double getZ() { /** * Set the z coordinate. * - * @param z - * value to z coordinate. + * @param z value to z coordinate. * @since vecmath 1.5 */ public final void setZ(double z) { diff --git a/src/main/java/com/volmit/iris/util/math/Tuple3f.java b/src/main/java/com/volmit/iris/util/math/Tuple3f.java index 44deb8a9a..51c2d0fe4 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple3f.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple3f.java @@ -47,12 +47,9 @@ public abstract class Tuple3f implements java.io.Serializable, Cloneable { /** * Constructs and initializes a Tuple3f from the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public Tuple3f(float x, float y, float z) { this.x = x; @@ -64,8 +61,7 @@ public Tuple3f(float x, float y, float z) { /** * Constructs and initializes a Tuple3f from the array of length 3. * - * @param t - * the array of length 3 containing xyz in order + * @param t the array of length 3 containing xyz in order */ public Tuple3f(float[] t) { this.x = t[0]; @@ -77,8 +73,7 @@ public Tuple3f(float[] t) { /** * Constructs and initializes a Tuple3f from the specified Tuple3f. * - * @param t1 - * the Tuple3f containing the initialization x y z data + * @param t1 the Tuple3f containing the initialization x y z data */ public Tuple3f(Tuple3f t1) { this.x = t1.x; @@ -90,8 +85,7 @@ public Tuple3f(Tuple3f t1) { /** * Constructs and initializes a Tuple3f from the specified Tuple3d. * - * @param t1 - * the Tuple3d containing the initialization x y z data + * @param t1 the Tuple3d containing the initialization x y z data */ public Tuple3f(Tuple3d t1) { this.x = (float) t1.x; @@ -124,12 +118,9 @@ public String toString() { /** * Sets the value of this tuple to the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public final void set(float x, float y, float z) { this.x = x; @@ -142,8 +133,7 @@ public final void set(float x, float y, float z) { * Sets the value of this tuple to the xyz coordinates specified in * the array of length 3. * - * @param t - * the array of length 3 containing xyz in order + * @param t the array of length 3 containing xyz in order */ public final void set(float[] t) { this.x = t[0]; @@ -155,8 +145,7 @@ public final void set(float[] t) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple3f t1) { this.x = t1.x; @@ -168,8 +157,7 @@ public final void set(Tuple3f t1) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple3d t1) { this.x = (float) t1.x; @@ -181,8 +169,7 @@ public final void set(Tuple3d t1) { /** * Gets the value of this tuple and copies the values into t. * - * @param t - * the array of length 3 into which the values are copied + * @param t the array of length 3 into which the values are copied */ public final void get(float[] t) { t[0] = this.x; @@ -194,8 +181,7 @@ public final void get(float[] t) { /** * Gets the value of this tuple and copies the values into t. * - * @param t - * the Tuple3f object into which the values of this object are copied + * @param t the Tuple3f object into which the values of this object are copied */ public final void get(Tuple3f t) { t.x = this.x; @@ -207,10 +193,8 @@ public final void get(Tuple3f t) { /** * Sets the value of this tuple to the vector sum of tuples t1 and t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void add(Tuple3f t1, Tuple3f t2) { this.x = t1.x + t2.x; @@ -222,8 +206,7 @@ public final void add(Tuple3f t1, Tuple3f t2) { /** * Sets the value of this tuple to the vector sum of itself and tuple t1. * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void add(Tuple3f t1) { this.x += t1.x; @@ -236,10 +219,8 @@ public final void add(Tuple3f t1) { * Sets the value of this tuple to the vector difference * of tuples t1 and t2 (this = t1 - t2). * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void sub(Tuple3f t1, Tuple3f t2) { this.x = t1.x - t2.x; @@ -252,8 +233,7 @@ public final void sub(Tuple3f t1, Tuple3f t2) { * Sets the value of this tuple to the vector difference of * itself and tuple t1 (this = this - t1) . * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void sub(Tuple3f t1) { this.x -= t1.x; @@ -265,8 +245,7 @@ public final void sub(Tuple3f t1) { /** * Sets the value of this tuple to the negation of tuple t1. * - * @param t1 - * the source tuple + * @param t1 the source tuple */ public final void negate(Tuple3f t1) { this.x = -t1.x; @@ -289,10 +268,8 @@ public final void negate() { * Sets the value of this vector to the scalar multiplication * of tuple t1. * - * @param s - * the scalar value - * @param t1 - * the source tuple + * @param s the scalar value + * @param t1 the source tuple */ public final void scale(float s, Tuple3f t1) { this.x = s * t1.x; @@ -305,8 +282,7 @@ public final void scale(float s, Tuple3f t1) { * Sets the value of this tuple to the scalar multiplication * of the scale factor with this. * - * @param s - * the scalar value + * @param s the scalar value */ public final void scale(float s) { this.x *= s; @@ -319,12 +295,9 @@ public final void scale(float s) { * Sets the value of this tuple to the scalar multiplication * of tuple t1 and then adds tuple t2 (this = s*t1 + t2). * - * @param s - * the scalar value - * @param t1 - * the tuple to be scaled and added - * @param t2 - * the tuple to be added without a scale + * @param s the scalar value + * @param t1 the tuple to be scaled and added + * @param t2 the tuple to be added without a scale */ public final void scaleAdd(float s, Tuple3f t1, Tuple3f t2) { this.x = s * t1.x + t2.x; @@ -337,10 +310,8 @@ public final void scaleAdd(float s, Tuple3f t1, Tuple3f t2) { * Sets the value of this tuple to the scalar multiplication * of itself and then adds tuple t1 (this = s*this + t1). * - * @param s - * the scalar value - * @param t1 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be added */ public final void scaleAdd(float s, Tuple3f t1) { this.x = s * this.x + t1.x; @@ -354,14 +325,13 @@ public final void scaleAdd(float s, Tuple3f t1) { * data members of t1 are equal to the corresponding data members in * this Tuple3f. * - * @param t1 - * the vector with which the comparison is made + * @param t1 the vector with which the comparison is made * @return true or false */ public boolean equals(Tuple3f t1) { try { return (this.x == t1.x && this.y == t1.y && this.z == t1.z); - } catch(NullPointerException e2) { + } catch (NullPointerException e2) { Iris.reportError(e2); return false; } @@ -372,15 +342,14 @@ public boolean equals(Tuple3f t1) { * data members of t1 are equal to the corresponding data members in * this Tuple3f. * - * @param t1 - * the Object with which the comparison is made + * @param t1 the Object with which the comparison is made * @return true or false */ public boolean equals(Object t1) { try { Tuple3f t2 = (Tuple3f) t1; return (this.x == t2.x && this.y == t2.y && this.z == t2.z); - } catch(NullPointerException | ClassCastException e2) { + } catch (NullPointerException | ClassCastException e2) { Iris.reportError(e2); return false; } @@ -393,25 +362,23 @@ public boolean equals(Object t1) { * otherwise returns false. The L-infinite * distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)]. * - * @param t1 - * the tuple to be compared to this tuple - * @param epsilon - * the threshold value + * @param t1 the tuple to be compared to this tuple + * @param epsilon the threshold value * @return true or false */ public boolean epsilonEquals(Tuple3f t1, float epsilon) { float diff; diff = x - t1.x; - if(Float.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Float.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = y - t1.y; - if(Float.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Float.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = z - t1.z; - if(Float.isNaN(diff)) return false; + if (Float.isNaN(diff)) return false; return !((diff < 0 ? -diff : diff) > epsilon); } @@ -439,23 +406,20 @@ public int hashCode() { * Clamps the tuple parameter to the range [low, high] and * places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clamp(float min, float max, Tuple3f t) { - if(t.x > max) { + if (t.x > max) { x = max; } else x = Math.max(t.x, min); - if(t.y > max) { + if (t.y > max) { y = max; } else y = Math.max(t.y, min); - if(t.z > max) { + if (t.z > max) { z = max; } else z = Math.max(t.z, min); @@ -466,10 +430,8 @@ public final void clamp(float min, float max, Tuple3f t) { * Clamps the minimum value of the tuple parameter to the min * parameter and places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMin(float min, Tuple3f t) { x = Math.max(t.x, min); @@ -485,10 +447,8 @@ public final void clampMin(float min, Tuple3f t) { * Clamps the maximum value of the tuple parameter to the max * parameter and places the values into this tuple. * - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMax(float max, Tuple3f t) { x = Math.min(t.x, max); @@ -504,8 +464,7 @@ public final void clampMax(float max, Tuple3f t) { * Sets each component of the tuple parameter to its absolute * value and places the modified values into this tuple. * - * @param t - * the source tuple, which will not be modified + * @param t the source tuple, which will not be modified */ public final void absolute(Tuple3f t) { x = Math.abs(t.x); @@ -517,27 +476,25 @@ public final void absolute(Tuple3f t) { /** * Clamps this tuple to the range [low, high]. * - * @param min - * the lowest value in this tuple after clamping - * @param max - * the highest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping + * @param max the highest value in this tuple after clamping */ public final void clamp(float min, float max) { - if(x > max) { + if (x > max) { x = max; - } else if(x < min) { + } else if (x < min) { x = min; } - if(y > max) { + if (y > max) { y = max; - } else if(y < min) { + } else if (y < min) { y = min; } - if(z > max) { + if (z > max) { z = max; - } else if(z < min) { + } else if (z < min) { z = min; } @@ -547,13 +504,12 @@ public final void clamp(float min, float max) { /** * Clamps the minimum value of this tuple to the min parameter. * - * @param min - * the lowest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping */ public final void clampMin(float min) { - if(x < min) x = min; - if(y < min) y = min; - if(z < min) z = min; + if (x < min) x = min; + if (y < min) y = min; + if (z < min) z = min; } @@ -561,13 +517,12 @@ public final void clampMin(float min) { /** * Clamps the maximum value of this tuple to the max parameter. * - * @param max - * the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping */ public final void clampMax(float max) { - if(x > max) x = max; - if(y > max) y = max; - if(z > max) z = max; + if (x > max) x = max; + if (y > max) y = max; + if (z > max) z = max; } @@ -587,12 +542,9 @@ public final void absolute() { * Linearly interpolates between tuples t1 and t2 and places the * result into this tuple: this = (1-alpha)*t1 + alpha*t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param t2 the second tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple3f t1, Tuple3f t2, float alpha) { this.x = (1 - alpha) * t1.x + alpha * t2.x; @@ -607,10 +559,8 @@ public final void interpolate(Tuple3f t1, Tuple3f t2, float alpha) { * Linearly interpolates between this tuple and tuple t1 and * places the result into this tuple: this = (1-alpha)*this + alpha*t1. * - * @param t1 - * the first tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param alpha the alpha interpolation parameter */ public final void interpolate(Tuple3f t1, float alpha) { this.x = (1 - alpha) * this.x + alpha * t1.x; @@ -624,8 +574,7 @@ public final void interpolate(Tuple3f t1, float alpha) { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @throws OutOfMemoryError - * if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since vecmath 1.3 */ @@ -633,7 +582,7 @@ public Object clone() { // Since there are no arrays we can just use Object.clone() try { return super.clone(); - } catch(CloneNotSupportedException e) { + } catch (CloneNotSupportedException e) { Iris.reportError(e); // this shouldn't happen, since we are Cloneable throw new InternalError(); @@ -655,8 +604,7 @@ public final float getX() { /** * Set the x coordinate. * - * @param x - * value to x coordinate. + * @param x value to x coordinate. * @since vecmath 1.5 */ public final void setX(float x) { @@ -678,8 +626,7 @@ public final float getY() { /** * Set the y coordinate. * - * @param y - * value to y coordinate. + * @param y value to y coordinate. * @since vecmath 1.5 */ public final void setY(float y) { @@ -700,8 +647,7 @@ public final float getZ() { /** * Set the Z coordinate. * - * @param z - * value to z coordinate. + * @param z value to z coordinate. * @since vecmath 1.5 */ public final void setZ(float z) { diff --git a/src/main/java/com/volmit/iris/util/math/Tuple4d.java b/src/main/java/com/volmit/iris/util/math/Tuple4d.java index b056932f9..e3d30fe90 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple4d.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple4d.java @@ -52,14 +52,10 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * Constructs and initializes a Tuple4d from the specified xyzw coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate - * @param w - * the w coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @param w the w coordinate */ public Tuple4d(double x, double y, double z, double w) { this.x = x; @@ -73,8 +69,7 @@ public Tuple4d(double x, double y, double z, double w) { * Constructs and initializes a Tuple4d from the coordinates contained * in the array. * - * @param t - * the array of length 4 containing xyzw in order + * @param t the array of length 4 containing xyzw in order */ public Tuple4d(double[] t) { this.x = t[0]; @@ -87,8 +82,7 @@ public Tuple4d(double[] t) { /** * Constructs and initializes a Tuple4d from the specified Tuple4d. * - * @param t1 - * the Tuple4d containing the initialization x y z w data + * @param t1 the Tuple4d containing the initialization x y z w data */ public Tuple4d(Tuple4d t1) { this.x = t1.x; @@ -101,8 +95,7 @@ public Tuple4d(Tuple4d t1) { /** * Constructs and initializes a Tuple4d from the specified Tuple4f. * - * @param t1 - * the Tuple4f containing the initialization x y z w data + * @param t1 the Tuple4f containing the initialization x y z w data */ public Tuple4d(Tuple4f t1) { this.x = t1.x; @@ -126,14 +119,10 @@ public Tuple4d() { /** * Sets the value of this tuple to the specified xyzw coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate - * @param w - * the w coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @param w the w coordinate */ public final void set(double x, double y, double z, double w) { this.x = x; @@ -146,8 +135,7 @@ public final void set(double x, double y, double z, double w) { /** * Sets the value of this tuple to the specified xyzw coordinates. * - * @param t - * the array of length 4 containing xyzw in order + * @param t the array of length 4 containing xyzw in order */ public final void set(double[] t) { this.x = t[0]; @@ -160,8 +148,7 @@ public final void set(double[] t) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple4d t1) { this.x = t1.x; @@ -174,8 +161,7 @@ public final void set(Tuple4d t1) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple4f t1) { this.x = t1.x; @@ -189,8 +175,7 @@ public final void set(Tuple4f t1) { * Gets the value of this tuple and places it into the array t of * length four in x,y,z,w order. * - * @param t - * the array of length four + * @param t the array of length four */ public final void get(double[] t) { t[0] = this.x; @@ -205,8 +190,7 @@ public final void get(double[] t) { * argument of * length four in x,y,z,w order. * - * @param t - * the Tuple into which the values will be copied + * @param t the Tuple into which the values will be copied */ public final void get(Tuple4d t) { t.x = this.x; @@ -219,10 +203,8 @@ public final void get(Tuple4d t) { /** * Sets the value of this tuple to the tuple sum of tuples t1 and t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void add(Tuple4d t1, Tuple4d t2) { this.x = t1.x + t2.x; @@ -235,8 +217,7 @@ public final void add(Tuple4d t1, Tuple4d t2) { /** * Sets the value of this tuple to the sum of itself and tuple t1. * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void add(Tuple4d t1) { this.x += t1.x; @@ -250,10 +231,8 @@ public final void add(Tuple4d t1) { * Sets the value of this tuple to the difference * of tuples t1 and t2 (this = t1 - t2). * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void sub(Tuple4d t1, Tuple4d t2) { this.x = t1.x - t2.x; @@ -267,8 +246,7 @@ public final void sub(Tuple4d t1, Tuple4d t2) { * Sets the value of this tuple to the difference of itself * and tuple t1 (this = this - t1). * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void sub(Tuple4d t1) { this.x -= t1.x; @@ -281,8 +259,7 @@ public final void sub(Tuple4d t1) { /** * Sets the value of this tuple to the negation of tuple t1. * - * @param t1 - * the source tuple + * @param t1 the source tuple */ public final void negate(Tuple4d t1) { this.x = -t1.x; @@ -307,10 +284,8 @@ public final void negate() { * Sets the value of this tuple to the scalar multiplication * of the scale factor with the tuple t1. * - * @param s - * the scalar value - * @param t1 - * the source tuple + * @param s the scalar value + * @param t1 the source tuple */ public final void scale(double s, Tuple4d t1) { this.x = s * t1.x; @@ -324,8 +299,7 @@ public final void scale(double s, Tuple4d t1) { * Sets the value of this tuple to the scalar multiplication * of the scale factor with this. * - * @param s - * the scalar value + * @param s the scalar value */ public final void scale(double s) { this.x *= s; @@ -339,12 +313,9 @@ public final void scale(double s) { * Sets the value of this tuple to the scalar multiplication by s * of tuple t1 plus tuple t2 (this = s*t1 + t2). * - * @param s - * the scalar value - * @param t1 - * the tuple to be multipled - * @param t2 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be multipled + * @param t2 the tuple to be added */ public final void scaleAdd(double s, Tuple4d t1, Tuple4d t2) { this.x = s * t1.x + t2.x; @@ -367,10 +338,8 @@ public final void scaleAdd(float s, Tuple4d t1) { * Sets the value of this tuple to the scalar multiplication * of itself and then adds tuple t1 (this = s*this + t1). * - * @param s - * the scalar value - * @param t1 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be added */ public final void scaleAdd(double s, Tuple4d t1) { this.x = s * this.x + t1.x; @@ -395,15 +364,14 @@ public String toString() { * Returns true if all of the data members of Tuple4d t1 are * equal to the corresponding data members in this Tuple4d. * - * @param t1 - * the tuple with which the comparison is made + * @param t1 the tuple with which the comparison is made * @return true or false */ public boolean equals(Tuple4d t1) { try { return (this.x == t1.x && this.y == t1.y && this.z == t1.z - && this.w == t1.w); - } catch(NullPointerException e2) { + && this.w == t1.w); + } catch (NullPointerException e2) { Iris.reportError(e2); return false; } @@ -414,8 +382,7 @@ public boolean equals(Tuple4d t1) { * data members of t1 are equal to the corresponding data members in * this Tuple4d. * - * @param t1 - * the object with which the comparison is made + * @param t1 the object with which the comparison is made * @return true or false */ public boolean equals(Object t1) { @@ -423,8 +390,8 @@ public boolean equals(Object t1) { Tuple4d t2 = (Tuple4d) t1; return (this.x == t2.x && this.y == t2.y && - this.z == t2.z && this.w == t2.w); - } catch(NullPointerException | ClassCastException e2) { + this.z == t2.z && this.w == t2.w); + } catch (NullPointerException | ClassCastException e2) { Iris.reportError(e2); return false; } @@ -438,29 +405,27 @@ public boolean equals(Object t1) { * distance is equal to * MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2), abs(w1-w2)]. * - * @param t1 - * the tuple to be compared to this tuple - * @param epsilon - * the threshold value + * @param t1 the tuple to be compared to this tuple + * @param epsilon the threshold value * @return true or false */ public boolean epsilonEquals(Tuple4d t1, double epsilon) { double diff; diff = x - t1.x; - if(Double.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Double.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = y - t1.y; - if(Double.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Double.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = z - t1.z; - if(Double.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Double.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = w - t1.w; - if(Double.isNaN(diff)) return false; + if (Double.isNaN(diff)) return false; return !((diff < 0 ? -diff : diff) > epsilon); } @@ -498,27 +463,24 @@ public final void clamp(float min, float max, Tuple4d t) { * Clamps the tuple parameter to the range [low, high] and * places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clamp(double min, double max, Tuple4d t) { - if(t.x > max) { + if (t.x > max) { x = max; } else x = Math.max(t.x, min); - if(t.y > max) { + if (t.y > max) { y = max; } else y = Math.max(t.y, min); - if(t.z > max) { + if (t.z > max) { z = max; } else z = Math.max(t.z, min); - if(t.w > max) { + if (t.w > max) { w = max; } else w = Math.max(t.w, min); @@ -538,10 +500,8 @@ public final void clampMin(float min, Tuple4d t) { * Clamps the minimum value of the tuple parameter to the min * parameter and places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMin(double min, Tuple4d t) { x = Math.max(t.x, min); @@ -568,10 +528,8 @@ public final void clampMax(float max, Tuple4d t) { * Clamps the maximum value of the tuple parameter to the max * parameter and places the values into this tuple. * - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMax(double max, Tuple4d t) { x = Math.min(t.x, max); @@ -580,7 +538,7 @@ public final void clampMax(double max, Tuple4d t) { z = Math.min(t.z, max); - if(t.w > max) { + if (t.w > max) { w = max; } else { w = t.z; @@ -593,8 +551,7 @@ public final void clampMax(double max, Tuple4d t) { * Sets each component of the tuple parameter to its absolute * value and places the modified values into this tuple. * - * @param t - * the source tuple, which will not be modified + * @param t the source tuple, which will not be modified */ public final void absolute(Tuple4d t) { x = Math.abs(t.x); @@ -617,33 +574,31 @@ public final void clamp(float min, float max) { /** * Clamps this tuple to the range [low, high]. * - * @param min - * the lowest value in this tuple after clamping - * @param max - * the highest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping + * @param max the highest value in this tuple after clamping */ public final void clamp(double min, double max) { - if(x > max) { + if (x > max) { x = max; - } else if(x < min) { + } else if (x < min) { x = min; } - if(y > max) { + if (y > max) { y = max; - } else if(y < min) { + } else if (y < min) { y = min; } - if(z > max) { + if (z > max) { z = max; - } else if(z < min) { + } else if (z < min) { z = min; } - if(w > max) { + if (w > max) { w = max; - } else if(w < min) { + } else if (w < min) { w = min; } @@ -662,14 +617,13 @@ public final void clampMin(float min) { /** * Clamps the minimum value of this tuple to the min parameter. * - * @param min - * the lowest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping */ public final void clampMin(double min) { - if(x < min) x = min; - if(y < min) y = min; - if(z < min) z = min; - if(w < min) w = min; + if (x < min) x = min; + if (y < min) y = min; + if (z < min) z = min; + if (w < min) w = min; } @@ -685,14 +639,13 @@ public final void clampMax(float max) { /** * Clamps the maximum value of this tuple to the max parameter. * - * @param max - * the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping */ public final void clampMax(double max) { - if(x > max) x = max; - if(y > max) y = max; - if(z > max) z = max; - if(w > max) w = max; + if (x > max) x = max; + if (y > max) y = max; + if (z > max) z = max; + if (w > max) w = max; } @@ -722,12 +675,9 @@ public void interpolate(Tuple4d t1, Tuple4d t2, float alpha) { * Linearly interpolates between tuples t1 and t2 and places the * result into this tuple: this = (1-alpha)*t1 + alpha*t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param t2 the second tuple + * @param alpha the alpha interpolation parameter */ public void interpolate(Tuple4d t1, Tuple4d t2, double alpha) { this.x = (1 - alpha) * t1.x + alpha * t2.x; @@ -750,10 +700,8 @@ public void interpolate(Tuple4d t1, float alpha) { * Linearly interpolates between this tuple and tuple t1 and * places the result into this tuple: this = (1-alpha)*this + alpha*t1. * - * @param t1 - * the first tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param alpha the alpha interpolation parameter */ public void interpolate(Tuple4d t1, double alpha) { this.x = (1 - alpha) * this.x + alpha * t1.x; @@ -766,8 +714,7 @@ public void interpolate(Tuple4d t1, double alpha) { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @throws OutOfMemoryError - * if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since vecmath 1.3 */ @@ -775,7 +722,7 @@ public Object clone() { // Since there are no arrays we can just use Object.clone() try { return super.clone(); - } catch(CloneNotSupportedException e) { + } catch (CloneNotSupportedException e) { Iris.reportError(e); // this shouldn't happen, since we are Cloneable throw new InternalError(); @@ -796,8 +743,7 @@ public final double getX() { /** * Set the x coordinate. * - * @param x - * value to x coordinate. + * @param x value to x coordinate. * @since vecmath 1.5 */ public final void setX(double x) { @@ -819,8 +765,7 @@ public final double getY() { /** * Set the y coordinate. * - * @param y - * value to y coordinate. + * @param y value to y coordinate. * @since vecmath 1.5 */ public final void setY(double y) { @@ -841,8 +786,7 @@ public final double getZ() { /** * Set the z coordinate. * - * @param z - * value to z coordinate. + * @param z value to z coordinate. * @since vecmath 1.5 */ public final void setZ(double z) { @@ -864,8 +808,7 @@ public final double getW() { /** * Set the w coordinate. * - * @param w - * value to w coordinate. + * @param w value to w coordinate. * @since vecmath 1.5 */ public final void setW(double w) { diff --git a/src/main/java/com/volmit/iris/util/math/Tuple4f.java b/src/main/java/com/volmit/iris/util/math/Tuple4f.java index d345a62df..6f8e90155 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple4f.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple4f.java @@ -52,14 +52,10 @@ public abstract class Tuple4f implements java.io.Serializable, Cloneable { /** * Constructs and initializes a Tuple4f from the specified xyzw coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate - * @param w - * the w coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @param w the w coordinate */ public Tuple4f(float x, float y, float z, float w) { this.x = x; @@ -72,8 +68,7 @@ public Tuple4f(float x, float y, float z, float w) { /** * Constructs and initializes a Tuple4f from the array of length 4. * - * @param t - * the array of length 4 containing xyzw in order + * @param t the array of length 4 containing xyzw in order */ public Tuple4f(float[] t) { this.x = t[0]; @@ -86,8 +81,7 @@ public Tuple4f(float[] t) { /** * Constructs and initializes a Tuple4f from the specified Tuple4f. * - * @param t1 - * the Tuple4f containing the initialization x y z w data + * @param t1 the Tuple4f containing the initialization x y z w data */ public Tuple4f(Tuple4f t1) { this.x = t1.x; @@ -100,8 +94,7 @@ public Tuple4f(Tuple4f t1) { /** * Constructs and initializes a Tuple4f from the specified Tuple4d. * - * @param t1 - * the Tuple4d containing the initialization x y z w data + * @param t1 the Tuple4d containing the initialization x y z w data */ public Tuple4f(Tuple4d t1) { this.x = (float) t1.x; @@ -125,14 +118,10 @@ public Tuple4f() { /** * Sets the value of this tuple to the specified xyzw coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate - * @param w - * the w coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @param w the w coordinate */ public final void set(float x, float y, float z, float w) { this.x = x; @@ -146,8 +135,7 @@ public final void set(float x, float y, float z, float w) { * Sets the value of this tuple to the specified coordinates in the * array of length 4. * - * @param t - * the array of length 4 containing xyzw in order + * @param t the array of length 4 containing xyzw in order */ public final void set(float[] t) { this.x = t[0]; @@ -160,8 +148,7 @@ public final void set(float[] t) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple4f t1) { this.x = t1.x; @@ -174,8 +161,7 @@ public final void set(Tuple4f t1) { /** * Sets the value of this tuple to the value of tuple t1. * - * @param t1 - * the tuple to be copied + * @param t1 the tuple to be copied */ public final void set(Tuple4d t1) { this.x = (float) t1.x; @@ -188,8 +174,7 @@ public final void set(Tuple4d t1) { /** * Copies the values of this tuple into the array t. * - * @param t - * the array + * @param t the array */ public final void get(float[] t) { t[0] = this.x; @@ -202,8 +187,7 @@ public final void get(float[] t) { /** * Copies the values of this tuple into the tuple t. * - * @param t - * the target tuple + * @param t the target tuple */ public final void get(Tuple4f t) { t.x = this.x; @@ -216,10 +200,8 @@ public final void get(Tuple4f t) { /** * Sets the value of this tuple to the sum of tuples t1 and t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void add(Tuple4f t1, Tuple4f t2) { this.x = t1.x + t2.x; @@ -232,8 +214,7 @@ public final void add(Tuple4f t1, Tuple4f t2) { /** * Sets the value of this tuple to the sum of itself and t1. * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void add(Tuple4f t1) { this.x += t1.x; @@ -247,10 +228,8 @@ public final void add(Tuple4f t1) { * Sets the value of this tuple to the difference * of tuples t1 and t2 (this = t1 - t2). * - * @param t1 - * the first tuple - * @param t2 - * the second tuple + * @param t1 the first tuple + * @param t2 the second tuple */ public final void sub(Tuple4f t1, Tuple4f t2) { this.x = t1.x - t2.x; @@ -264,8 +243,7 @@ public final void sub(Tuple4f t1, Tuple4f t2) { * Sets the value of this tuple to the difference * of itself and t1 (this = this - t1). * - * @param t1 - * the other tuple + * @param t1 the other tuple */ public final void sub(Tuple4f t1) { this.x -= t1.x; @@ -278,8 +256,7 @@ public final void sub(Tuple4f t1) { /** * Sets the value of this tuple to the negation of tuple t1. * - * @param t1 - * the source tuple + * @param t1 the source tuple */ public final void negate(Tuple4f t1) { this.x = -t1.x; @@ -304,10 +281,8 @@ public final void negate() { * Sets the value of this tuple to the scalar multiplication * of tuple t1. * - * @param s - * the scalar value - * @param t1 - * the source tuple + * @param s the scalar value + * @param t1 the source tuple */ public final void scale(float s, Tuple4f t1) { this.x = s * t1.x; @@ -321,8 +296,7 @@ public final void scale(float s, Tuple4f t1) { * Sets the value of this tuple to the scalar multiplication * of the scale factor with this. * - * @param s - * the scalar value + * @param s the scalar value */ public final void scale(float s) { this.x *= s; @@ -336,12 +310,9 @@ public final void scale(float s) { * Sets the value of this tuple to the scalar multiplication * of tuple t1 plus tuple t2 (this = s*t1 + t2). * - * @param s - * the scalar value - * @param t1 - * the tuple to be multipled - * @param t2 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be multipled + * @param t2 the tuple to be added */ public final void scaleAdd(float s, Tuple4f t1, Tuple4f t2) { this.x = s * t1.x + t2.x; @@ -355,10 +326,8 @@ public final void scaleAdd(float s, Tuple4f t1, Tuple4f t2) { * Sets the value of this tuple to the scalar multiplication * of itself and then adds tuple t1 (this = s*this + t1). * - * @param s - * the scalar value - * @param t1 - * the tuple to be added + * @param s the scalar value + * @param t1 the tuple to be added */ public final void scaleAdd(float s, Tuple4f t1) { this.x = s * this.x + t1.x; @@ -382,15 +351,14 @@ public String toString() { * Returns true if all of the data members of Tuple4f t1 are * equal to the corresponding data members in this Tuple4f. * - * @param t1 - * the vector with which the comparison is made + * @param t1 the vector with which the comparison is made * @return true or false */ public boolean equals(Tuple4f t1) { try { return (this.x == t1.x && this.y == t1.y && this.z == t1.z - && this.w == t1.w); - } catch(NullPointerException e2) { + && this.w == t1.w); + } catch (NullPointerException e2) { Iris.reportError(e2); return false; } @@ -401,16 +369,15 @@ public boolean equals(Tuple4f t1) { * data members of t1 are equal to the corresponding data members in * this Tuple4f. * - * @param t1 - * the object with which the comparison is made + * @param t1 the object with which the comparison is made * @return true or false */ public boolean equals(Object t1) { try { Tuple4f t2 = (Tuple4f) t1; return (this.x == t2.x && this.y == t2.y && - this.z == t2.z && this.w == t2.w); - } catch(NullPointerException | ClassCastException e2) { + this.z == t2.z && this.w == t2.w); + } catch (NullPointerException | ClassCastException e2) { Iris.reportError(e2); return false; } @@ -424,29 +391,27 @@ public boolean equals(Object t1) { * distance is equal to * MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2), abs(w1-w2)]. * - * @param t1 - * the tuple to be compared to this tuple - * @param epsilon - * the threshold value + * @param t1 the tuple to be compared to this tuple + * @param epsilon the threshold value * @return true or false */ public boolean epsilonEquals(Tuple4f t1, float epsilon) { float diff; diff = x - t1.x; - if(Float.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Float.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = y - t1.y; - if(Float.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Float.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = z - t1.z; - if(Float.isNaN(diff)) return false; - if((diff < 0 ? -diff : diff) > epsilon) return false; + if (Float.isNaN(diff)) return false; + if ((diff < 0 ? -diff : diff) > epsilon) return false; diff = w - t1.w; - if(Float.isNaN(diff)) return false; + if (Float.isNaN(diff)) return false; return !((diff < 0 ? -diff : diff) > epsilon); } @@ -474,27 +439,24 @@ public int hashCode() { * Clamps the tuple parameter to the range [low, high] and * places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clamp(float min, float max, Tuple4f t) { - if(t.x > max) { + if (t.x > max) { x = max; } else x = Math.max(t.x, min); - if(t.y > max) { + if (t.y > max) { y = max; } else y = Math.max(t.y, min); - if(t.z > max) { + if (t.z > max) { z = max; } else z = Math.max(t.z, min); - if(t.w > max) { + if (t.w > max) { w = max; } else w = Math.max(t.w, min); @@ -505,10 +467,8 @@ public final void clamp(float min, float max, Tuple4f t) { * Clamps the minimum value of the tuple parameter to the min * parameter and places the values into this tuple. * - * @param min - * the lowest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param min the lowest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMin(float min, Tuple4f t) { x = Math.max(t.x, min); @@ -527,10 +487,8 @@ public final void clampMin(float min, Tuple4f t) { * Clamps the maximum value of the tuple parameter to the max * parameter and places the values into this tuple. * - * @param max - * the highest value in the tuple after clamping - * @param t - * the source tuple, which will not be modified + * @param max the highest value in the tuple after clamping + * @param t the source tuple, which will not be modified */ public final void clampMax(float max, Tuple4f t) { x = Math.min(t.x, max); @@ -539,7 +497,7 @@ public final void clampMax(float max, Tuple4f t) { z = Math.min(t.z, max); - if(t.w > max) { + if (t.w > max) { w = max; } else { w = t.z; @@ -552,8 +510,7 @@ public final void clampMax(float max, Tuple4f t) { * Sets each component of the tuple parameter to its absolute * value and places the modified values into this tuple. * - * @param t - * the source tuple, which will not be modified + * @param t the source tuple, which will not be modified */ public final void absolute(Tuple4f t) { x = Math.abs(t.x); @@ -566,33 +523,31 @@ public final void absolute(Tuple4f t) { /** * Clamps this tuple to the range [low, high]. * - * @param min - * the lowest value in this tuple after clamping - * @param max - * the highest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping + * @param max the highest value in this tuple after clamping */ public final void clamp(float min, float max) { - if(x > max) { + if (x > max) { x = max; - } else if(x < min) { + } else if (x < min) { x = min; } - if(y > max) { + if (y > max) { y = max; - } else if(y < min) { + } else if (y < min) { y = min; } - if(z > max) { + if (z > max) { z = max; - } else if(z < min) { + } else if (z < min) { z = min; } - if(w > max) { + if (w > max) { w = max; - } else if(w < min) { + } else if (w < min) { w = min; } @@ -602,14 +557,13 @@ public final void clamp(float min, float max) { /** * Clamps the minimum value of this tuple to the min parameter. * - * @param min - * the lowest value in this tuple after clamping + * @param min the lowest value in this tuple after clamping */ public final void clampMin(float min) { - if(x < min) x = min; - if(y < min) y = min; - if(z < min) z = min; - if(w < min) w = min; + if (x < min) x = min; + if (y < min) y = min; + if (z < min) z = min; + if (w < min) w = min; } @@ -617,14 +571,13 @@ public final void clampMin(float min) { /** * Clamps the maximum value of this tuple to the max parameter. * - * @param max - * the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping */ public final void clampMax(float max) { - if(x > max) x = max; - if(y > max) y = max; - if(z > max) z = max; - if(w > max) w = max; + if (x > max) x = max; + if (y > max) y = max; + if (z > max) z = max; + if (w > max) w = max; } @@ -644,12 +597,9 @@ public final void absolute() { * Linearly interpolates between tuples t1 and t2 and places the * result into this tuple: this = (1-alpha)*t1 + alpha*t2. * - * @param t1 - * the first tuple - * @param t2 - * the second tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param t2 the second tuple + * @param alpha the alpha interpolation parameter */ public void interpolate(Tuple4f t1, Tuple4f t2, float alpha) { this.x = (1 - alpha) * t1.x + alpha * t2.x; @@ -664,10 +614,8 @@ public void interpolate(Tuple4f t1, Tuple4f t2, float alpha) { * Linearly interpolates between this tuple and tuple t1 and * places the result into this tuple: this = (1-alpha)*this + alpha*t1. * - * @param t1 - * the first tuple - * @param alpha - * the alpha interpolation parameter + * @param t1 the first tuple + * @param alpha the alpha interpolation parameter */ public void interpolate(Tuple4f t1, float alpha) { this.x = (1 - alpha) * this.x + alpha * t1.x; @@ -681,8 +629,7 @@ public void interpolate(Tuple4f t1, float alpha) { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @throws OutOfMemoryError - * if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since vecmath 1.3 */ @@ -690,7 +637,7 @@ public Object clone() { // Since there are no arrays we can just use Object.clone() try { return super.clone(); - } catch(CloneNotSupportedException e) { + } catch (CloneNotSupportedException e) { Iris.reportError(e); // this shouldn't happen, since we are Cloneable throw new InternalError(); @@ -711,8 +658,7 @@ public final float getX() { /** * Set the x coordinate. * - * @param x - * value to x coordinate. + * @param x value to x coordinate. * @since vecmath 1.5 */ public final void setX(float x) { @@ -734,8 +680,7 @@ public final float getY() { /** * Set the y coordinate. * - * @param y - * value to y coordinate. + * @param y value to y coordinate. * @since vecmath 1.5 */ public final void setY(float y) { @@ -756,8 +701,7 @@ public final float getZ() { /** * Set the z coordinate. * - * @param z - * value to z coordinate. + * @param z value to z coordinate. * @since vecmath 1.5 */ public final void setZ(float z) { @@ -779,8 +723,7 @@ public final float getW() { /** * Set the w coordinate. * - * @param w - * value to w coordinate. + * @param w value to w coordinate. * @since vecmath 1.5 */ public final void setW(float w) { diff --git a/src/main/java/com/volmit/iris/util/math/VecMathUtil.java b/src/main/java/com/volmit/iris/util/math/VecMathUtil.java index cc0e20551..8c3a23e0a 100644 --- a/src/main/java/com/volmit/iris/util/math/VecMathUtil.java +++ b/src/main/java/com/volmit/iris/util/math/VecMathUtil.java @@ -44,14 +44,13 @@ private VecMathUtil() { * which has a field with a value of -0.0f and the other of which * has a cooresponding field with a value of 0.0f. * - * @param f - * an input floating-point number + * @param f an input floating-point number * @return the integer bits representing that floating-point * number, after first mapping -0.0f to 0.0f */ static int floatToIntBits(float f) { // Check for +0 or -0 - if(f == 0.0f) { + if (f == 0.0f) { return 0; } else { return Float.floatToIntBits(f); @@ -73,14 +72,13 @@ static int floatToIntBits(float f) { * which has a field with a value of -0.0 and the other of which * has a cooresponding field with a value of 0.0. * - * @param d - * an input double precision floating-point number + * @param d an input double precision floating-point number * @return the integer bits representing that floating-point * number, after first mapping -0.0f to 0.0f */ static long doubleToLongBits(double d) { // Check for +0 or -0 - if(d == 0.0) { + if (d == 0.0) { return 0L; } else { return Double.doubleToLongBits(d); diff --git a/src/main/java/com/volmit/iris/util/math/Vector2d.java b/src/main/java/com/volmit/iris/util/math/Vector2d.java index 099fad899..ac09bd107 100644 --- a/src/main/java/com/volmit/iris/util/math/Vector2d.java +++ b/src/main/java/com/volmit/iris/util/math/Vector2d.java @@ -30,10 +30,8 @@ public class Vector2d extends Tuple2d implements java.io.Serializable { /** * Constructs and initializes a Vector2d from the specified xy coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate + * @param x the x coordinate + * @param y the y coordinate */ public Vector2d(double x, double y) { super(x, y); @@ -43,8 +41,7 @@ public Vector2d(double x, double y) { /** * Constructs and initializes a Vector2d from the specified array. * - * @param v - * the array of length 2 containing xy in order + * @param v the array of length 2 containing xy in order */ public Vector2d(double[] v) { super(v); @@ -54,8 +51,7 @@ public Vector2d(double[] v) { /** * Constructs and initializes a Vector2d from the specified Vector2d. * - * @param v1 - * the Vector2d containing the initialization x y data + * @param v1 the Vector2d containing the initialization x y data */ public Vector2d(Vector2d v1) { super(v1); @@ -65,8 +61,7 @@ public Vector2d(Vector2d v1) { /** * Constructs and initializes a Vector2d from the specified Vector2f. * - * @param v1 - * the Vector2f containing the initialization x y data + * @param v1 the Vector2f containing the initialization x y data */ public Vector2d(Vector2f v1) { super(v1); @@ -76,8 +71,7 @@ public Vector2d(Vector2f v1) { /** * Constructs and initializes a Vector2d from the specified Tuple2d. * - * @param t1 - * the Tuple2d containing the initialization x y data + * @param t1 the Tuple2d containing the initialization x y data */ public Vector2d(Tuple2d t1) { super(t1); @@ -87,8 +81,7 @@ public Vector2d(Tuple2d t1) { /** * Constructs and initializes a Vector2d from the specified Tuple2f. * - * @param t1 - * the Tuple2f containing the initialization x y data + * @param t1 the Tuple2f containing the initialization x y data */ public Vector2d(Tuple2f t1) { super(t1); @@ -106,8 +99,7 @@ public Vector2d() { /** * Computes the dot product of the this vector and vector v1. * - * @param v1 - * the other vector + * @param v1 the other vector */ public final double dot(Vector2d v1) { return (this.x * v1.x + this.y * v1.y); @@ -135,8 +127,7 @@ public final double lengthSquared() { /** * Sets the value of this vector to the normalization of vector v1. * - * @param v1 - * the un-normalized vector + * @param v1 the un-normalized vector */ public final void normalize(Vector2d v1) { double norm; @@ -162,14 +153,13 @@ public final void normalize() { * Returns the angle in radians between this vector and the vector * parameter; the return value is constrained to the range [0,PI]. * - * @param v1 - * the other vector + * @param v1 the other vector * @return the angle in radians in the range [0,PI] */ public final double angle(Vector2d v1) { double vDot = this.dot(v1) / (this.length() * v1.length()); - if(vDot < -1.0) vDot = -1.0; - if(vDot > 1.0) vDot = 1.0; + if (vDot < -1.0) vDot = -1.0; + if (vDot > 1.0) vDot = 1.0; return Math.acos(vDot); } diff --git a/src/main/java/com/volmit/iris/util/math/Vector2f.java b/src/main/java/com/volmit/iris/util/math/Vector2f.java index 83c7685d8..823fe1234 100644 --- a/src/main/java/com/volmit/iris/util/math/Vector2f.java +++ b/src/main/java/com/volmit/iris/util/math/Vector2f.java @@ -30,10 +30,8 @@ public class Vector2f extends Tuple2f implements java.io.Serializable { /** * Constructs and initializes a Vector2f from the specified xy coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate + * @param x the x coordinate + * @param y the y coordinate */ public Vector2f(float x, float y) { super(x, y); @@ -43,8 +41,7 @@ public Vector2f(float x, float y) { /** * Constructs and initializes a Vector2f from the specified array. * - * @param v - * the array of length 2 containing xy in order + * @param v the array of length 2 containing xy in order */ public Vector2f(float[] v) { super(v); @@ -54,8 +51,7 @@ public Vector2f(float[] v) { /** * Constructs and initializes a Vector2f from the specified Vector2f. * - * @param v1 - * the Vector2f containing the initialization x y data + * @param v1 the Vector2f containing the initialization x y data */ public Vector2f(Vector2f v1) { super(v1); @@ -65,8 +61,7 @@ public Vector2f(Vector2f v1) { /** * Constructs and initializes a Vector2f from the specified Vector2d. * - * @param v1 - * the Vector2d containing the initialization x y data + * @param v1 the Vector2d containing the initialization x y data */ public Vector2f(Vector2d v1) { super(v1); @@ -76,8 +71,7 @@ public Vector2f(Vector2d v1) { /** * Constructs and initializes a Vector2f from the specified Tuple2f. * - * @param t1 - * the Tuple2f containing the initialization x y data + * @param t1 the Tuple2f containing the initialization x y data */ public Vector2f(Tuple2f t1) { super(t1); @@ -87,8 +81,7 @@ public Vector2f(Tuple2f t1) { /** * Constructs and initializes a Vector2f from the specified Tuple2d. * - * @param t1 - * the Tuple2d containing the initialization x y data + * @param t1 the Tuple2d containing the initialization x y data */ public Vector2f(Tuple2d t1) { super(t1); @@ -106,8 +99,7 @@ public Vector2f() { /** * Computes the dot product of the this vector and vector v1. * - * @param v1 - * the other vector + * @param v1 the other vector */ public final float dot(Vector2f v1) { return (this.x * v1.x + this.y * v1.y); @@ -135,8 +127,7 @@ public final float lengthSquared() { /** * Sets the value of this vector to the normalization of vector v1. * - * @param v1 - * the un-normalized vector + * @param v1 the un-normalized vector */ public final void normalize(Vector2f v1) { float norm; @@ -153,7 +144,7 @@ public final void normalize() { float norm; norm = (float) - (1.0 / Math.sqrt(this.x * this.x + this.y * this.y)); + (1.0 / Math.sqrt(this.x * this.x + this.y * this.y)); this.x *= norm; this.y *= norm; } @@ -163,14 +154,13 @@ public final void normalize() { * Returns the angle in radians between this vector and the vector * parameter; the return value is constrained to the range [0,PI]. * - * @param v1 - * the other vector + * @param v1 the other vector * @return the angle in radians in the range [0,PI] */ public final float angle(Vector2f v1) { double vDot = this.dot(v1) / (this.length() * v1.length()); - if(vDot < -1.0) vDot = -1.0; - if(vDot > 1.0) vDot = 1.0; + if (vDot < -1.0) vDot = -1.0; + if (vDot > 1.0) vDot = 1.0; return ((float) (Math.acos(vDot))); } diff --git a/src/main/java/com/volmit/iris/util/math/Vector3d.java b/src/main/java/com/volmit/iris/util/math/Vector3d.java index bf51a6ff1..cfc39b52a 100644 --- a/src/main/java/com/volmit/iris/util/math/Vector3d.java +++ b/src/main/java/com/volmit/iris/util/math/Vector3d.java @@ -31,12 +31,9 @@ public class Vector3d extends Tuple3d implements java.io.Serializable { /** * Constructs and initializes a Vector3d from the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public Vector3d(double x, double y, double z) { super(x, y, z); @@ -46,8 +43,7 @@ public Vector3d(double x, double y, double z) { /** * Constructs and initializes a Vector3d from the array of length 3. * - * @param v - * the array of length 3 containing xyz in order + * @param v the array of length 3 containing xyz in order */ public Vector3d(double[] v) { super(v); @@ -57,8 +53,7 @@ public Vector3d(double[] v) { /** * Constructs and initializes a Vector3d from the specified Vector3d. * - * @param v1 - * the Vector3d containing the initialization x y z data + * @param v1 the Vector3d containing the initialization x y z data */ public Vector3d(Vector3d v1) { super(v1); @@ -68,8 +63,7 @@ public Vector3d(Vector3d v1) { /** * Constructs and initializes a Vector3d from the specified Vector3f. * - * @param v1 - * the Vector3f containing the initialization x y z data + * @param v1 the Vector3f containing the initialization x y z data */ public Vector3d(Vector3f v1) { super(v1); @@ -79,8 +73,7 @@ public Vector3d(Vector3f v1) { /** * Constructs and initializes a Vector3d from the specified Tuple3f. * - * @param t1 - * the Tuple3f containing the initialization x y z data + * @param t1 the Tuple3f containing the initialization x y z data */ public Vector3d(Tuple3f t1) { super(t1); @@ -90,8 +83,7 @@ public Vector3d(Tuple3f t1) { /** * Constructs and initializes a Vector3d from the specified Tuple3d. * - * @param t1 - * the Tuple3d containing the initialization x y z data + * @param t1 the Tuple3d containing the initialization x y z data */ public Vector3d(Tuple3d t1) { super(t1); @@ -109,10 +101,8 @@ public Vector3d() { /** * Sets this vector to the vector cross product of vectors v1 and v2. * - * @param v1 - * the first vector - * @param v2 - * the second vector + * @param v1 the first vector + * @param v2 the second vector */ public final void cross(Vector3d v1, Vector3d v2) { double x, y; @@ -128,8 +118,7 @@ public final void cross(Vector3d v1, Vector3d v2) { /** * Sets the value of this vector to the normalization of vector v1. * - * @param v1 - * the un-normalized vector + * @param v1 the un-normalized vector */ public final void normalize(Vector3d v1) { double norm; @@ -157,8 +146,7 @@ public final void normalize() { /** * Returns the dot product of this vector and vector v1. * - * @param v1 - * the other vector + * @param v1 the other vector * @return the dot product of this and v1 */ public final double dot(Vector3d v1) { @@ -190,14 +178,13 @@ public final double length() { * Returns the angle in radians between this vector and the vector * parameter; the return value is constrained to the range [0,PI]. * - * @param v1 - * the other vector + * @param v1 the other vector * @return the angle in radians in the range [0,PI] */ public final double angle(Vector3d v1) { double vDot = this.dot(v1) / (this.length() * v1.length()); - if(vDot < -1.0) vDot = -1.0; - if(vDot > 1.0) vDot = 1.0; + if (vDot < -1.0) vDot = -1.0; + if (vDot > 1.0) vDot = 1.0; return Math.acos(vDot); } diff --git a/src/main/java/com/volmit/iris/util/math/Vector3f.java b/src/main/java/com/volmit/iris/util/math/Vector3f.java index 0bd55fb10..0640acfd3 100644 --- a/src/main/java/com/volmit/iris/util/math/Vector3f.java +++ b/src/main/java/com/volmit/iris/util/math/Vector3f.java @@ -31,12 +31,9 @@ public class Vector3f extends Tuple3f implements java.io.Serializable { /** * Constructs and initializes a Vector3f from the specified xyz coordinates. * - * @param x - * the x coordinate - * @param y - * the y coordinate - * @param z - * the z coordinate + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate */ public Vector3f(float x, float y, float z) { super(x, y, z); @@ -46,8 +43,7 @@ public Vector3f(float x, float y, float z) { /** * Constructs and initializes a Vector3f from the array of length 3. * - * @param v - * the array of length 3 containing xyz in order + * @param v the array of length 3 containing xyz in order */ public Vector3f(float[] v) { super(v); @@ -57,8 +53,7 @@ public Vector3f(float[] v) { /** * Constructs and initializes a Vector3f from the specified Vector3f. * - * @param v1 - * the Vector3f containing the initialization x y z data + * @param v1 the Vector3f containing the initialization x y z data */ public Vector3f(Vector3f v1) { super(v1); @@ -68,8 +63,7 @@ public Vector3f(Vector3f v1) { /** * Constructs and initializes a Vector3f from the specified Vector3d. * - * @param v1 - * the Vector3d containing the initialization x y z data + * @param v1 the Vector3d containing the initialization x y z data */ public Vector3f(Vector3d v1) { super(v1); @@ -79,8 +73,7 @@ public Vector3f(Vector3d v1) { /** * Constructs and initializes a Vector3f from the specified Tuple3f. * - * @param t1 - * the Tuple3f containing the initialization x y z data + * @param t1 the Tuple3f containing the initialization x y z data */ public Vector3f(Tuple3f t1) { super(t1); @@ -90,8 +83,7 @@ public Vector3f(Tuple3f t1) { /** * Constructs and initializes a Vector3f from the specified Tuple3d. * - * @param t1 - * the Tuple3d containing the initialization x y z data + * @param t1 the Tuple3d containing the initialization x y z data */ public Vector3f(Tuple3d t1) { super(t1); @@ -122,17 +114,15 @@ public final float lengthSquared() { */ public final float length() { return (float) - Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); } /** * Sets this vector to be the vector cross product of vectors v1 and v2. * - * @param v1 - * the first vector - * @param v2 - * the second vector + * @param v1 the first vector + * @param v2 the second vector */ public final void cross(Vector3f v1, Vector3f v2) { float x, y; @@ -147,8 +137,7 @@ public final void cross(Vector3f v1, Vector3f v2) { /** * Computes the dot product of this vector and vector v1. * - * @param v1 - * the other vector + * @param v1 the other vector * @return the dot product of this vector and v1 */ public final float dot(Vector3f v1) { @@ -158,8 +147,7 @@ public final float dot(Vector3f v1) { /** * Sets the value of this vector to the normalization of vector v1. * - * @param v1 - * the un-normalized vector + * @param v1 the un-normalized vector */ public final void normalize(Vector3f v1) { float norm; @@ -177,7 +165,7 @@ public final void normalize() { float norm; norm = (float) - (1.0 / Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z)); + (1.0 / Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z)); this.x *= norm; this.y *= norm; this.z *= norm; @@ -188,14 +176,13 @@ public final void normalize() { * Returns the angle in radians between this vector and the vector * parameter; the return value is constrained to the range [0,PI]. * - * @param v1 - * the other vector + * @param v1 the other vector * @return the angle in radians in the range [0,PI] */ public final float angle(Vector3f v1) { double vDot = this.dot(v1) / (this.length() * v1.length()); - if(vDot < -1.0) vDot = -1.0; - if(vDot > 1.0) vDot = 1.0; + if (vDot < -1.0) vDot = -1.0; + if (vDot > 1.0) vDot = 1.0; return ((float) (Math.acos(vDot))); } diff --git a/src/main/java/com/volmit/iris/util/math/VectorMath.java b/src/main/java/com/volmit/iris/util/math/VectorMath.java index ec6de00ce..7716f5ee9 100644 --- a/src/main/java/com/volmit/iris/util/math/VectorMath.java +++ b/src/main/java/com/volmit/iris/util/math/VectorMath.java @@ -35,7 +35,7 @@ */ public class VectorMath { public static Vector scaleStatic(Axis x, Vector v, double amt) { - return switch(x) { + return switch (x) { case X -> scaleX(v, amt); case Y -> scaleY(v, amt); case Z -> scaleZ(v, amt); @@ -84,10 +84,10 @@ public static boolean isLookingNear(Location a, Location b, double maxOff) { } public static Vector rotate(Direction current, Direction to, Vector v) { - if(current.equals(to)) { + if (current.equals(to)) { return v; - } else if(current.equals(to.reverse())) { - if(current.isVertical()) { + } else if (current.equals(to.reverse())) { + if (current.isVertical()) { return new Vector(v.getX(), -v.getY(), v.getZ()); } else { return new Vector(-v.getX(), v.getY(), -v.getZ()); @@ -95,20 +95,20 @@ public static Vector rotate(Direction current, Direction to, Vector v) { } else { Vector c = current.toVector().clone().add(to.toVector()); - if(c.getX() == 0) { - if(c.getY() != c.getZ()) { + if (c.getX() == 0) { + if (c.getY() != c.getZ()) { return rotate90CX(v); } return rotate90CCX(v); - } else if(c.getY() == 0) { - if(c.getX() != c.getZ()) { + } else if (c.getY() == 0) { + if (c.getX() != c.getZ()) { return rotate90CY(v); } return rotate90CCY(v); - } else if(c.getZ() == 0) { - if(c.getX() != c.getY()) { + } else if (c.getZ() == 0) { + if (c.getX() != c.getY()) { return rotate90CZ(v); } @@ -126,10 +126,10 @@ public static Vector rotate(Direction current, Direction to, Vector v) { // 0 Z X 0 public static Vector rotate(Direction current, Direction to, Vector v, int w, int h, int d) { - if(current.equals(to)) { + if (current.equals(to)) { return v; - } else if(current.equals(to.reverse())) { - if(current.isVertical()) { + } else if (current.equals(to.reverse())) { + if (current.isVertical()) { return new Vector(v.getX(), -v.getY() + h, v.getZ()); } else { return new Vector(-v.getX() + w, v.getY(), -v.getZ() + d); @@ -137,20 +137,20 @@ public static Vector rotate(Direction current, Direction to, Vector v, int w, in } else { Vector c = current.toVector().clone().add(to.toVector()); - if(c.getX() == 0) { - if(c.getY() != c.getZ()) { + if (c.getX() == 0) { + if (c.getY() != c.getZ()) { return rotate90CX(v, d); } return rotate90CCX(v, h); - } else if(c.getY() == 0) { - if(c.getX() != c.getZ()) { + } else if (c.getY() == 0) { + if (c.getX() != c.getZ()) { return rotate90CY(v, d); } return rotate90CCY(v, w); - } else if(c.getZ() == 0) { - if(c.getX() != c.getY()) { + } else if (c.getZ() == 0) { + if (c.getX() != c.getY()) { return rotate90CZ(v, w); } @@ -210,11 +210,11 @@ public static Vector rotate90CCZ(Vector v, int s) { } public static Vector getAxis(Direction current, Direction to) { - if(current.equals(Direction.U) || current.equals(Direction.D)) { - if(to.equals(Direction.U) || to.equals(Direction.D)) { + if (current.equals(Direction.U) || current.equals(Direction.D)) { + if (to.equals(Direction.U) || to.equals(Direction.D)) { return new Vector(1, 0, 0); } else { - if(current.equals(Direction.N) || current.equals(Direction.S)) { + if (current.equals(Direction.N) || current.equals(Direction.S)) { return Direction.E.toVector(); } else { return Direction.S.toVector(); @@ -258,14 +258,13 @@ public static Vector rotateVectorCC(Vector vec, Vector axis, double deg) { * Get all SIMPLE block faces from a more specific block face (SOUTH_EAST) = * (south, east) * - * @param f - * the block face + * @param f the block face * @return multiple faces, or one if the face is already simple */ public static KList split(BlockFace f) { KList faces = new KList<>(); - switch(f) { + switch (f) { case DOWN: faces.add(BlockFace.DOWN); break; @@ -353,10 +352,8 @@ public static KList split(BlockFace f) { /** * Get a normalized vector going from a location to another * - * @param from - * from here - * @param to - * to here + * @param from from here + * @param to to here * @return the normalized vector direction */ public static Vector direction(Location from, Location to) { @@ -370,10 +367,8 @@ public static Vector directionNoNormal(Location from, Location to) { /** * Get the vector direction from the yaw and pitch * - * @param yaw - * the yaw - * @param pitch - * the pitch + * @param yaw the yaw + * @param pitch the pitch * @return the vector */ public static Vector toVector(float yaw, float pitch) { @@ -383,10 +378,8 @@ public static Vector toVector(float yaw, float pitch) { /** * Add an impulse (force) to an entity * - * @param e - * the entity - * @param v - * the vector + * @param e the entity + * @param v the vector */ public static void impulse(Entity e, Vector v) { impulse(e, v, 1.0); @@ -395,12 +388,9 @@ public static void impulse(Entity e, Vector v) { /** * Add an impulse (force) on an entity * - * @param e - * the entity - * @param v - * the vector - * @param effectiveness - * the effectiveness + * @param e the entity + * @param v the vector + * @param effectiveness the effectiveness */ public static void impulse(Entity e, Vector v, double effectiveness) { Vector vx = e.getVelocity(); @@ -411,20 +401,19 @@ public static void impulse(Entity e, Vector v, double effectiveness) { /** * Reverse a direction * - * @param v - * the direction + * @param v the direction * @return the reversed direction */ public static Vector reverse(Vector v) { - if(v.getX() != 0) { + if (v.getX() != 0) { v.setX(-v.getX()); } - if(v.getY() != 0) { + if (v.getY() != 0) { v.setY(-v.getY()); } - if(v.getZ() != 0) { + if (v.getZ() != 0) { v.setZ(-v.getZ()); } @@ -434,8 +423,7 @@ public static Vector reverse(Vector v) { /** * Get a speed value from a vector (velocity) * - * @param v - * the vector + * @param v the vector * @return the speed */ public static double getSpeed(Vector v) { @@ -448,10 +436,8 @@ public static double getSpeed(Vector v) { /** * Shift all vectors based on the given vector * - * @param vector - * the vector direction to shift the vectors - * @param vectors - * the vectors to be shifted + * @param vector the vector direction to shift the vectors + * @param vectors the vectors to be shifted * @return the shifted vectors */ public static KList shift(Vector vector, KList vectors) { @@ -466,39 +452,38 @@ public Vector onAdapt(Vector from) { /** * Attempt to get the blockFace for the vector (will be tri-normalized) * - * @param v - * the vector + * @param v the vector * @return the block face or null */ public static BlockFace getBlockFace(Vector v) { Vector p = triNormalize(v); - for(BlockFace i : BlockFace.values()) { - if(p.getX() == i.getModX() && p.getY() == i.getModY() && p.getZ() == i.getModZ()) { + for (BlockFace i : BlockFace.values()) { + if (p.getX() == i.getModX() && p.getY() == i.getModY() && p.getZ() == i.getModZ()) { return i; } } - for(BlockFace i : BlockFace.values()) { - if(p.getX() == i.getModX() && p.getZ() == i.getModZ()) { + for (BlockFace i : BlockFace.values()) { + if (p.getX() == i.getModX() && p.getZ() == i.getModZ()) { return i; } } - for(BlockFace i : BlockFace.values()) { - if(p.getY() == i.getModY() && p.getZ() == i.getModZ()) { + for (BlockFace i : BlockFace.values()) { + if (p.getY() == i.getModY() && p.getZ() == i.getModZ()) { return i; } } - for(BlockFace i : BlockFace.values()) { - if(p.getX() == i.getModX() || p.getY() == i.getModY()) { + for (BlockFace i : BlockFace.values()) { + if (p.getX() == i.getModX() || p.getY() == i.getModY()) { return i; } } - for(BlockFace i : BlockFace.values()) { - if(p.getX() == i.getModX() || p.getY() == i.getModY() || p.getZ() == i.getModZ()) { + for (BlockFace i : BlockFace.values()) { + if (p.getX() == i.getModX() || p.getY() == i.getModY() || p.getZ() == i.getModZ()) { return i; } } @@ -509,10 +494,8 @@ public static BlockFace getBlockFace(Vector v) { /** * Angle the vector in a self relative direction * - * @param v - * the initial direction - * @param amt - * the amount to shift in the direction + * @param v the initial direction + * @param amt the amount to shift in the direction * @return the shifted direction */ public static Vector angleLeft(Vector v, float amt) { @@ -534,10 +517,8 @@ public static Vector angleLeft(Vector v, float amt) { /** * Angle the vector in a self relative direction * - * @param v - * the initial direction - * @param amt - * the amount to shift in the direction + * @param v the initial direction + * @param amt the amount to shift in the direction * @return the shifted direction */ public static Vector angleRight(Vector v, float amt) { @@ -559,10 +540,8 @@ public static Vector angleRight(Vector v, float amt) { /** * Angle the vector in a self relative direction * - * @param v - * the initial direction - * @param amt - * the amount to shift in the direction + * @param v the initial direction + * @param amt the amount to shift in the direction * @return the shifted direction */ public static Vector angleUp(Vector v, float amt) { @@ -581,10 +560,8 @@ public static Vector angleUp(Vector v, float amt) { /** * Angle the vector in a self relative direction * - * @param v - * the initial direction - * @param amt - * the amount to shift in the direction + * @param v the initial direction + * @param amt the amount to shift in the direction * @return the shifted direction */ public static Vector angleDown(Vector v, float amt) { @@ -604,33 +581,32 @@ public static Vector angleDown(Vector v, float amt) { * (clone) Force normalize the vector into three points, 1, 0, or -1. If the * value is > 0.333 (1) if the value is less than -0.333 (-1) else 0 * - * @param direction - * the direction + * @param direction the direction * @return the vector */ public static Vector triNormalize(Vector direction) { Vector v = direction.clone(); v.normalize(); - if(v.getX() > 0.333) { + if (v.getX() > 0.333) { v.setX(1); - } else if(v.getX() < -0.333) { + } else if (v.getX() < -0.333) { v.setX(-1); } else { v.setX(0); } - if(v.getY() > 0.333) { + if (v.getY() > 0.333) { v.setY(1); - } else if(v.getY() < -0.333) { + } else if (v.getY() < -0.333) { v.setY(-1); } else { v.setY(0); } - if(v.getZ() > 0.333) { + if (v.getZ() > 0.333) { v.setZ(1); - } else if(v.getZ() < -0.333) { + } else if (v.getZ() < -0.333) { v.setZ(-1); } else { v.setZ(0); diff --git a/src/main/java/com/volmit/iris/util/matter/IrisMatter.java b/src/main/java/com/volmit/iris/util/matter/IrisMatter.java index f5fac9bda..d645df076 100644 --- a/src/main/java/com/volmit/iris/util/matter/IrisMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/IrisMatter.java @@ -44,7 +44,7 @@ public class IrisMatter extends IrisRegistrant implements Matter { private final KMap, MatterSlice> sliceMap; public IrisMatter(int width, int height, int depth) { - if(width < 1 || height < 1 || depth < 1) { + if (width < 1 || height < 1 || depth < 1) { throw new RuntimeException("Invalid Matter Size " + width + "x" + height + "x" + depth); } @@ -57,7 +57,7 @@ public IrisMatter(int width, int height, int depth) { private static KMap, MatterSlice> buildSlicers() { KMap, MatterSlice> c = new KMap<>(); - for(Object i : Iris.initialize("com.volmit.iris.util.matter.slices", Sliced.class)) { + for (Object i : Iris.initialize("com.volmit.iris.util.matter.slices", Sliced.class)) { MatterSlice s = (MatterSlice) i; c.put(s.getType(), s); } @@ -69,13 +69,13 @@ private static KMap, MatterSlice> buildSlicers() { public MatterSlice createSlice(Class type, Matter m) { MatterSlice slice = slicers.get(type); - if(slice == null) { + if (slice == null) { return null; } try { return slice.getClass().getConstructor(int.class, int.class, int.class).newInstance(getWidth(), getHeight(), getDepth()); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/matter/Matter.java b/src/main/java/com/volmit/iris/util/matter/Matter.java index 5d9c65aca..9c07feaf6 100644 --- a/src/main/java/com/volmit/iris/util/matter/Matter.java +++ b/src/main/java/com/volmit/iris/util/matter/Matter.java @@ -52,29 +52,23 @@ public interface Matter { int VERSION = 1; - static long convert(File folder) - { - if(folder.isDirectory()) - { + static long convert(File folder) { + if (folder.isDirectory()) { long v = 0; - for(File i : folder.listFiles()) - { + for (File i : folder.listFiles()) { v += convert(i); } return v; - } - - else - { - IrisObject object = new IrisObject(1,1,1); + } else { + IrisObject object = new IrisObject(1, 1, 1); try { long fs = folder.length(); object.read(folder); Matter.from(object).write(folder); Iris.info("Converted " + folder.getPath() + " Saved " + (fs - folder.length())); - } catch(Throwable e) { + } catch (Throwable e) { Iris.error("Failed to convert " + folder.getPath()); e.printStackTrace(); } @@ -87,15 +81,15 @@ static Matter from(IrisObject object) { object.clean(); object.shrinkwrap(); BlockVector min = new BlockVector(); - Matter m = new IrisMatter(Math.max(object.getW(), 1)+1, Math.max( object.getH(), 1)+1, Math.max( object.getD(), 1)+1); + Matter m = new IrisMatter(Math.max(object.getW(), 1) + 1, Math.max(object.getH(), 1) + 1, Math.max(object.getD(), 1) + 1); - for(BlockVector i : object.getBlocks().keySet()) { + for (BlockVector i : object.getBlocks().keySet()) { min.setX(Math.min(min.getX(), i.getX())); min.setY(Math.min(min.getY(), i.getY())); min.setZ(Math.min(min.getZ(), i.getZ())); } - for(BlockVector i : object.getBlocks().keySet()) { + for (BlockVector i : object.getBlocks().keySet()) { m.slice(BlockData.class).set(i.getBlockX() - min.getBlockX(), i.getBlockY() - min.getBlockY(), i.getBlockZ() - min.getBlockZ(), object.getBlocks().get(i)); } @@ -109,12 +103,6 @@ static Matter read(File f) throws IOException, ClassNotFoundException { return m; } - default Matter copy() { - Matter m = new IrisMatter(getWidth(), getHeight(), getDepth()); - getSliceMap().forEach((k, v) -> m.slice(k).forceInject(v)); - return m; - } - static Matter read(InputStream in) throws IOException, ClassNotFoundException { return read(in, (b) -> new IrisMatter(b.getX(), b.getY(), b.getZ())); } @@ -127,13 +115,10 @@ static Matter readDin(DataInputStream in) throws IOException, ClassNotFoundExcep * Reads the input stream into a matter object using a matter factory. * Does not close the input stream. Be a man, close it yourself. * - * @param in - * the input stream - * @param matterFactory - * the matter factory (size) -> new MatterImpl(size); + * @param in the input stream + * @param matterFactory the matter factory (size) -> new MatterImpl(size); * @return the matter object - * @throws IOException - * shit happens yo + * @throws IOException shit happens yo */ static Matter read(InputStream in, Function matterFactory) throws IOException, ClassNotFoundException { return readDin(new DataInputStream(in), matterFactory); @@ -141,9 +126,9 @@ static Matter read(InputStream in, Function matterFactory static Matter readDin(DataInputStream din, Function matterFactory) throws IOException, ClassNotFoundException { Matter matter = matterFactory.apply(new BlockPosition( - din.readInt(), - din.readInt(), - din.readInt())); + din.readInt(), + din.readInt(), + din.readInt())); Iris.addPanic("read.matter.size", matter.getWidth() + "x" + matter.getHeight() + "x" + matter.getDepth()); int sliceCount = din.readByte(); Iris.addPanic("read.matter.slicecount", sliceCount + ""); @@ -151,7 +136,7 @@ static Matter readDin(DataInputStream din, Function matte matter.getHeader().read(din); Iris.addPanic("read.matter.header", matter.getHeader().toString()); - for(int i = 0; i < sliceCount; i++) { + for (int i = 0; i < sliceCount; i++) { Iris.addPanic("read.matter.slice", i + ""); String cn = din.readUTF(); Iris.addPanic("read.matter.slice.class", cn); @@ -160,7 +145,7 @@ static Matter readDin(DataInputStream din, Function matte MatterSlice slice = matter.createSlice(type, matter); slice.read(din); matter.putSlice(type, slice); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); throw new IOException("Can't read class '" + cn + "' (slice count reverse at " + sliceCount + ")"); } @@ -169,6 +154,12 @@ static Matter readDin(DataInputStream din, Function matte return matter; } + default Matter copy() { + Matter m = new IrisMatter(getWidth(), getHeight(), getDepth()); + getSliceMap().forEach((k, v) -> m.slice(k).forceInject(v)); + return m; + } + /** * Get the header information * @@ -209,12 +200,9 @@ default BlockPosition getCenter() { /** * Create a slice from the given type (full is false) * - * @param type - * the type class - * @param matter - * the matter this slice will go into (size provider) - * @param - * the type + * @param type the type class + * @param matter the matter this slice will go into (size provider) + * @param the type * @return the slice (or null if not supported) */ MatterSlice createSlice(Class type, Matter matter); @@ -258,10 +246,8 @@ default int getCenterZ() { /** * Return the slice for the given type * - * @param t - * the type class - * @param - * the type + * @param t the type class + * @param the type * @return the slice or null */ default MatterSlice getSlice(Class t) { @@ -271,10 +257,8 @@ default MatterSlice getSlice(Class t) { /** * Delete the slice for the given type * - * @param c - * the type class - * @param - * the type + * @param c the type class + * @param the type * @return the deleted slice, or null if it diddn't exist */ default MatterSlice deleteSlice(Class c) { @@ -284,12 +268,9 @@ default MatterSlice deleteSlice(Class c) { /** * Put a given slice type * - * @param c - * the slice type class - * @param slice - * the slice to assign to the type - * @param - * the slice type + * @param c the slice type class + * @param slice the slice to assign to the type + * @param the slice type * @return the overwritten slice if there was an existing slice of that type */ default MatterSlice putSlice(Class c, MatterSlice slice) { @@ -299,11 +280,11 @@ default MatterSlice putSlice(Class c, MatterSlice slice) { default Class getClass(Object w) { Class c = w.getClass(); - if(w instanceof World) { + if (w instanceof World) { c = World.class; - } else if(w instanceof BlockData) { + } else if (w instanceof BlockData) { c = BlockData.class; - } else if(w instanceof Entity) { + } else if (w instanceof Entity) { c = Entity.class; } @@ -312,13 +293,13 @@ default Class getClass(Object w) { default MatterSlice slice(Class c) { MatterSlice slice = (MatterSlice) getSlice(c); - if(slice == null) { + if (slice == null) { slice = (MatterSlice) createSlice(c, this); - if(slice == null) { + if (slice == null) { try { throw new RuntimeException("Bad slice " + c.getCanonicalName()); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); } @@ -334,12 +315,9 @@ default MatterSlice slice(Class c) { /** * Rotate a matter object into a new object * - * @param x - * the x rotation (degrees) - * @param y - * the y rotation (degrees) - * @param z - * the z rotation (degrees) + * @param x the x rotation (degrees) + * @param y the y rotation (degrees) + * @param z the z rotation (degrees) * @return the new rotated matter object */ default Matter rotate(double x, double y, double z) { @@ -348,7 +326,7 @@ default Matter rotate(double x, double y, double z) { n.getHeader().setAuthor(getHeader().getAuthor()); n.getHeader().setCreatedAt(getHeader().getCreatedAt()); - for(Class i : getSliceTypes()) { + for (Class i : getSliceTypes()) { getSlice(i).rotateSliceInto(n, x, y, z); } @@ -358,8 +336,7 @@ default Matter rotate(double x, double y, double z) { /** * Check if a slice exists for a given type * - * @param c - * the slice class type + * @param c the slice class type * @return true if it exists */ default boolean hasSlice(Class c) { @@ -401,9 +378,9 @@ default void write(File f) throws IOException { default void trimSlices() { Set> drop = null; - for(Class i : getSliceTypes()) { - if(getSlice(i).getEntryCount() == 0) { - if(drop == null) { + for (Class i : getSliceTypes()) { + if (getSlice(i).getEntryCount() == 0) { + if (drop == null) { drop = new KSet<>(); } @@ -411,8 +388,8 @@ default void trimSlices() { } } - if(drop != null) { - for(Class i : drop) { + if (drop != null) { + for (Class i : drop) { deleteSlice(i); } } @@ -422,10 +399,8 @@ default void trimSlices() { * Writes the data to the output stream. The data will be flushed to the provided output * stream however the provided stream will NOT BE CLOSED, so be sure to actually close it * - * @param out - * the output stream - * @throws IOException - * shit happens yo + * @param out the output stream + * @throws IOException shit happens yo */ default void write(OutputStream out) throws IOException { writeDos(new DataOutputStream(out)); @@ -439,7 +414,7 @@ default void writeDos(DataOutputStream dos) throws IOException { dos.writeByte(getSliceTypes().size()); getHeader().write(dos); - for(Class i : getSliceTypes()) { + for (Class i : getSliceTypes()) { getSlice(i).write(dos); } } @@ -447,7 +422,7 @@ default void writeDos(DataOutputStream dos) throws IOException { default int getTotalCount() { int m = 0; - for(MatterSlice i : getSliceMap().values()) { + for (MatterSlice i : getSliceMap().values()) { m += i.getEntryCount(); } diff --git a/src/main/java/com/volmit/iris/util/matter/MatterPlacer.java b/src/main/java/com/volmit/iris/util/matter/MatterPlacer.java index 808a3ad9b..55b9b1b13 100644 --- a/src/main/java/com/volmit/iris/util/matter/MatterPlacer.java +++ b/src/main/java/com/volmit/iris/util/matter/MatterPlacer.java @@ -34,7 +34,7 @@ default T get(int x, int y, int z, Class t) { } default void set(int x, int y, int z, Matter matter) { - for(MatterSlice i : matter.getSliceMap().values()) { + for (MatterSlice i : matter.getSliceMap().values()) { set(x, y, z, i); } } diff --git a/src/main/java/com/volmit/iris/util/matter/MatterSlice.java b/src/main/java/com/volmit/iris/util/matter/MatterSlice.java index f3d416db0..9f77edc86 100644 --- a/src/main/java/com/volmit/iris/util/matter/MatterSlice.java +++ b/src/main/java/com/volmit/iris/util/matter/MatterSlice.java @@ -84,11 +84,11 @@ default void forceInject(MatterSlice slice) { default Class getClass(Object w) { Class c = w.getClass(); - if(w instanceof World) { + if (w instanceof World) { c = World.class; - } else if(w instanceof BlockData) { + } else if (w instanceof BlockData) { c = BlockData.class; - } else if(w instanceof Entity) { + } else if (w instanceof Entity) { c = Entity.class; } @@ -102,7 +102,7 @@ default boolean writeInto(Location location) { default boolean writeInto(W w, int x, int y, int z) { MatterWriter injector = (MatterWriter) writeInto(getClass(w)); - if(injector == null) { + if (injector == null) { return false; } @@ -118,16 +118,16 @@ default boolean readFrom(Location location) { default boolean readFrom(W w, int x, int y, int z) { MatterReader ejector = (MatterReader) readFrom(getClass(w)); - if(ejector == null) { + if (ejector == null) { return false; } - for(int i = x; i < x + getWidth(); i++) { - for(int j = y; j < y + getHeight(); j++) { - for(int k = z; k < z + getDepth(); k++) { + for (int i = x; i < x + getWidth(); i++) { + for (int j = y; j < y + getHeight(); j++) { + for (int k = z; k < z + getDepth(); k++) { T v = ejector.readMatter(w, i, j, k); - if(v != null) { + if (v != null) { set(i - x, j - y, k - z, v); } } @@ -147,8 +147,8 @@ default boolean canRead(Class mediumType) { default int getBitsPer(int needed) { int target = 1; - for(int i = 1; i < 8; i++) { - if(Math.pow(2, i) > needed) { + for (int i = 1; i < 8; i++) { + if (Math.pow(2, i) > needed) { target = i; break; } @@ -160,7 +160,7 @@ default int getBitsPer(int needed) { default void write(DataOutputStream dos) throws IOException { dos.writeUTF(getType().getCanonicalName()); - if((this instanceof PaletteOrHunk f && f.isPalette())) { + if ((this instanceof PaletteOrHunk f && f.isPalette())) { f.palette().writeDos(dos); return; } @@ -172,7 +172,7 @@ default void write(DataOutputStream dos) throws IOException { palette.writePalette(dos); dos.writeBoolean(isMapped()); - if(isMapped()) { + if (isMapped()) { Varint.writeUnsignedVarInt(getEntryCount(), dos); iterateSyncIO((x, y, z, b) -> { Varint.writeUnsignedVarInt(Cache.to1D(x, y, z, w, h), dos); @@ -184,7 +184,7 @@ default void write(DataOutputStream dos) throws IOException { } default void read(DataInputStream din) throws IOException { - if((this instanceof PaletteOrHunk f && f.isPalette())) { + if ((this instanceof PaletteOrHunk f && f.isPalette())) { f.setPalette(new DataContainer<>(din, this)); return; } @@ -192,11 +192,11 @@ default void read(DataInputStream din) throws IOException { int w = getWidth(); int h = getHeight(); MatterPalette palette = new MatterPalette(this, din); - if(din.readBoolean()) { + if (din.readBoolean()) { int nodes = Varint.readUnsignedVarInt(din); int[] pos; - while(nodes-- > 0) { + while (nodes-- > 0) { pos = Cache.to3D(Varint.readUnsignedVarInt(din), w, h); setRaw(pos[0], pos[1], pos[2], palette.readNode(din)); } diff --git a/src/main/java/com/volmit/iris/util/matter/MatterStructurePOI.java b/src/main/java/com/volmit/iris/util/matter/MatterStructurePOI.java index 8c69d3f65..45f844fc7 100644 --- a/src/main/java/com/volmit/iris/util/matter/MatterStructurePOI.java +++ b/src/main/java/com/volmit/iris/util/matter/MatterStructurePOI.java @@ -1,7 +1,6 @@ package com.volmit.iris.util.matter; import lombok.Data; -import org.bukkit.generator.structure.StructureType; import java.util.Map; diff --git a/src/main/java/com/volmit/iris/util/matter/WorldMatter.java b/src/main/java/com/volmit/iris/util/matter/WorldMatter.java index 8b3185ea5..4b5eb59fe 100644 --- a/src/main/java/com/volmit/iris/util/matter/WorldMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/WorldMatter.java @@ -25,15 +25,15 @@ public class WorldMatter { public static void placeMatter(Matter matter, Location at) { - if(matter.hasSlice(BlockData.class)) { + if (matter.hasSlice(BlockData.class)) { matter.slice(BlockData.class).writeInto(at); } - if(matter.hasSlice(MatterEntityGroup.class)) { + if (matter.hasSlice(MatterEntityGroup.class)) { matter.slice(MatterEntityGroup.class).writeInto(at); } - if(matter.hasSlice(TileWrapper.class)) { + if (matter.hasSlice(TileWrapper.class)) { matter.slice(TileWrapper.class).writeInto(at); } } diff --git a/src/main/java/com/volmit/iris/util/matter/slices/BiomeInjectMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/BiomeInjectMatter.java index ec36a60ab..68879a545 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/BiomeInjectMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/BiomeInjectMatter.java @@ -33,17 +33,11 @@ public BiomeInjectMatter() { this(1, 1, 1); } - @Override - public Palette getGlobalPalette() { - return null; - } - public BiomeInjectMatter(int width, int height, int depth) { super(width, height, depth, MatterBiomeInject.class); } - public static MatterBiomeInject get(Biome biome) - { + public static MatterBiomeInject get(Biome biome) { return get(false, 0, biome); } @@ -55,15 +49,18 @@ public static MatterBiomeInject get(boolean custom, int customBiome, Biome biome return new MatterBiomeInject(custom, customBiome, biome); } + @Override + public Palette getGlobalPalette() { + return null; + } + @Override public void writeNode(MatterBiomeInject b, DataOutputStream dos) throws IOException { dos.writeBoolean(b.isCustom()); - if(b.isCustom()) { + if (b.isCustom()) { dos.writeShort(b.getBiomeId()); - } - - else { + } else { dos.writeByte(b.getBiome().ordinal()); } } diff --git a/src/main/java/com/volmit/iris/util/matter/slices/BlockMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/BlockMatter.java index 6e98c3e37..9a0de90ba 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/BlockMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/BlockMatter.java @@ -37,11 +37,6 @@ public BlockMatter() { this(1, 1, 1); } - @Override - public Palette getGlobalPalette() { - return null; - } - public BlockMatter(int width, int height, int depth) { super(width, height, depth, BlockData.class); registerWriter(World.class, ((w, d, x, y, z) -> w.getBlockAt(x, y, z).setBlockData(d))); @@ -51,6 +46,11 @@ public BlockMatter(int width, int height, int depth) { }); } + @Override + public Palette getGlobalPalette() { + return null; + } + @Override public void writeNode(BlockData b, DataOutputStream dos) throws IOException { dos.writeUTF(b.getAsString(true)); diff --git a/src/main/java/com/volmit/iris/util/matter/slices/BooleanMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/BooleanMatter.java index 7f1ee1410..643c953a5 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/BooleanMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/BooleanMatter.java @@ -31,15 +31,15 @@ public BooleanMatter() { this(1, 1, 1); } + public BooleanMatter(int width, int height, int depth) { + super(width, height, depth, Boolean.class); + } + @Override public Palette getGlobalPalette() { return null; } - public BooleanMatter(int width, int height, int depth) { - super(width, height, depth, Boolean.class); - } - @Override public void writeNode(Boolean b, DataOutputStream dos) throws IOException { dos.writeBoolean(b); diff --git a/src/main/java/com/volmit/iris/util/matter/slices/CavernMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/CavernMatter.java index 66a00c916..eb0acfd81 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/CavernMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/CavernMatter.java @@ -35,11 +35,6 @@ public CavernMatter() { this(1, 1, 1); } - @Override - public Palette getGlobalPalette() { - return null; - } - public CavernMatter(int width, int height, int depth) { super(width, height, depth, MatterCavern.class); } @@ -48,6 +43,11 @@ public static MatterCavern get(String customBiome, int liquid) { return new MatterCavern(true, customBiome, (byte) liquid); } + @Override + public Palette getGlobalPalette() { + return null; + } + @Override public void writeNode(MatterCavern b, DataOutputStream dos) throws IOException { dos.writeBoolean(b.isCavern()); diff --git a/src/main/java/com/volmit/iris/util/matter/slices/EntityMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/EntityMatter.java index 99d774294..23c0e0495 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/EntityMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/EntityMatter.java @@ -48,15 +48,10 @@ public EntityMatter() { this(1, 1, 1); } - @Override - public Palette getGlobalPalette() { - return null; - } - public EntityMatter(int width, int height, int depth) { super(width, height, depth, MatterEntityGroup.class); registerWriter(World.class, ((w, d, x, y, z) -> { - for(MatterEntity i : d.getEntities()) { + for (MatterEntity i : d.getEntities()) { Location realPosition = new Location(w, x + i.getXOff(), y + i.getYOff(), z + i.getZOff()); INMS.get().deserializeEntity(i.getEntityData(), realPosition); } @@ -65,13 +60,13 @@ public EntityMatter(int width, int height, int depth) { IrisPosition pos = new IrisPosition(x, y, z); KList entities = entityCache.get(pos); MatterEntityGroup g = new MatterEntityGroup(); - if(entities != null) { - for(Entity i : entities) { + if (entities != null) { + for (Entity i : entities) { g.getEntities().add(new MatterEntity( - Math.abs(i.getLocation().getX()) - Math.abs(i.getLocation().getBlockX()), - Math.abs(i.getLocation().getY()) - Math.abs(i.getLocation().getBlockY()), - Math.abs(i.getLocation().getZ()) - Math.abs(i.getLocation().getBlockZ()), - INMS.get().serializeEntity(i) + Math.abs(i.getLocation().getX()) - Math.abs(i.getLocation().getBlockX()), + Math.abs(i.getLocation().getY()) - Math.abs(i.getLocation().getBlockY()), + Math.abs(i.getLocation().getZ()) - Math.abs(i.getLocation().getBlockZ()), + INMS.get().serializeEntity(i) )); } @@ -82,47 +77,47 @@ public EntityMatter(int width, int height, int depth) { }); } + @Override + public Palette getGlobalPalette() { + return null; + } + /** * The readFrom is overridden only if W is a Bukkit World, instead of looping * across every block position, we simply use getNearbyEntities and cache each * block position with a list of entities within that block, and directly feed * the reader with the entities we capture. * - * @param w - * the world - * @param x - * the x offset - * @param y - * the y offset - * @param z - * the z offset - * @param - * the type + * @param w the world + * @param x the x offset + * @param y the y offset + * @param z the z offset + * @param the type * @return true if we read */ @Override public synchronized boolean readFrom(W w, int x, int y, int z) { - if(!(w instanceof World)) { + if (!(w instanceof World)) { return super.readFrom(w, x, y, z); } MatterReader reader = (MatterReader) readFrom(World.class); - if(reader == null) { + if (reader == null) { return false; } entityCache = new KMap<>(); - for(Entity i : ((World) w).getNearbyEntities(new BoundingBox(x, y, z, x + getWidth(), y + getHeight(), z + getHeight()))) { + for (Entity i : ((World) w).getNearbyEntities(new BoundingBox(x, y, z, x + getWidth(), y + getHeight(), z + getHeight()))) { entityCache.computeIfAbsent(new IrisPosition(i.getLocation()), - k -> new KList<>()).add(i); + k -> new KList<>()).add(i); } - for(IrisPosition i : entityCache.keySet()) { + for (IrisPosition i : entityCache.keySet()) { MatterEntityGroup g = reader.readMatter(w, i.getX(), i.getY(), i.getZ()); - if(g != null) { + if (g != null) { set(i.getX() - x, i.getY() - y, i.getZ() - z, g); } } @@ -135,7 +130,7 @@ public synchronized boolean readFrom(W w, int x, int y, int z) { @Override public void writeNode(MatterEntityGroup b, DataOutputStream dos) throws IOException { Varint.writeUnsignedVarInt(b.getEntities().size(), dos); - for(MatterEntity i : b.getEntities()) { + for (MatterEntity i : b.getEntities()) { dos.writeByte((int) (i.getXOff() * 255) + Byte.MIN_VALUE); dos.writeByte((int) (i.getYOff() * 255) + Byte.MIN_VALUE); dos.writeByte((int) (i.getZOff() * 255) + Byte.MIN_VALUE); @@ -148,12 +143,12 @@ public MatterEntityGroup readNode(DataInputStream din) throws IOException { MatterEntityGroup g = new MatterEntityGroup(); int c = Varint.readUnsignedVarInt(din); - while(c-- > 0) { + while (c-- > 0) { g.getEntities().add(new MatterEntity( - ((int) din.readByte() - Byte.MIN_VALUE) / 255F, - ((int) din.readByte() - Byte.MIN_VALUE) / 255F, - ((int) din.readByte() - Byte.MIN_VALUE) / 255F, - (CompoundTag) NBTUtil.read(din, false).getTag())); + ((int) din.readByte() - Byte.MIN_VALUE) / 255F, + ((int) din.readByte() - Byte.MIN_VALUE) / 255F, + ((int) din.readByte() - Byte.MIN_VALUE) / 255F, + (CompoundTag) NBTUtil.read(din, false).getTag())); } return g; diff --git a/src/main/java/com/volmit/iris/util/matter/slices/IntMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/IntMatter.java index 3620341d7..c655cb158 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/IntMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/IntMatter.java @@ -32,15 +32,15 @@ public IntMatter() { this(1, 1, 1); } + public IntMatter(int width, int height, int depth) { + super(width, height, depth, Integer.class); + } + @Override public Palette getGlobalPalette() { return null; } - public IntMatter(int width, int height, int depth) { - super(width, height, depth, Integer.class); - } - @Override public void writeNode(Integer b, DataOutputStream dos) throws IOException { Varint.writeSignedVarInt(b, dos); diff --git a/src/main/java/com/volmit/iris/util/matter/slices/LongMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/LongMatter.java index 54add3104..3cd175015 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/LongMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/LongMatter.java @@ -32,15 +32,15 @@ public LongMatter() { this(1, 1, 1); } + public LongMatter(int width, int height, int depth) { + super(width, height, depth, Long.class); + } + @Override public Palette getGlobalPalette() { return null; } - public LongMatter(int width, int height, int depth) { - super(width, height, depth, Long.class); - } - @Override public void writeNode(Long b, DataOutputStream dos) throws IOException { Varint.writeSignedVarLong(b, dos); diff --git a/src/main/java/com/volmit/iris/util/matter/slices/MarkerMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/MarkerMatter.java index 85e1cb16c..60e44edbd 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/MarkerMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/MarkerMatter.java @@ -38,15 +38,15 @@ public MarkerMatter() { this(1, 1, 1); } + public MarkerMatter(int width, int height, int depth) { + super(width, height, depth, MatterMarker.class); + } + @Override public Palette getGlobalPalette() { return null; } - public MarkerMatter(int width, int height, int depth) { - super(width, height, depth, MatterMarker.class); - } - @Override public void writeNode(MatterMarker b, DataOutputStream dos) throws IOException { dos.writeUTF(b.getTag()); diff --git a/src/main/java/com/volmit/iris/util/matter/slices/TileMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/TileMatter.java index e4fe4a947..dee68e1c0 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/TileMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/TileMatter.java @@ -40,11 +40,6 @@ public TileMatter() { this(1, 1, 1); } - @Override - public Palette getGlobalPalette() { - return null; - } - public TileMatter(int width, int height, int depth) { super(width, height, depth, TileWrapper.class); registerWriter(World.class, (w, d, x, y, z) -> { @@ -54,12 +49,17 @@ public TileMatter(int width, int height, int depth) { }); registerReader(World.class, (w, x, y, z) -> { TileData d = TileData.getTileState(w.getBlockAt(new Location(w, x, y, z))); - if(d == null) + if (d == null) return null; return new TileWrapper(d); }); } + @Override + public Palette getGlobalPalette() { + return null; + } + public void writeNode(TileWrapper b, DataOutputStream dos) throws IOException { b.getData().toBinary(dos); } diff --git a/src/main/java/com/volmit/iris/util/matter/slices/UpdateMatter.java b/src/main/java/com/volmit/iris/util/matter/slices/UpdateMatter.java index 03de55ac6..3c1b7ba6c 100644 --- a/src/main/java/com/volmit/iris/util/matter/slices/UpdateMatter.java +++ b/src/main/java/com/volmit/iris/util/matter/slices/UpdateMatter.java @@ -37,15 +37,15 @@ public UpdateMatter() { this(1, 1, 1); } + public UpdateMatter(int width, int height, int depth) { + super(width, height, depth, MatterUpdate.class); + } + @Override public Palette getGlobalPalette() { return GLOBAL; } - public UpdateMatter(int width, int height, int depth) { - super(width, height, depth, MatterUpdate.class); - } - @Override public void writeNode(MatterUpdate b, DataOutputStream dos) throws IOException { dos.writeBoolean(b.isUpdate()); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/NBTDeserializer.java b/src/main/java/com/volmit/iris/util/nbt/io/NBTDeserializer.java index 3cc42d2e4..b76d2c418 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/NBTDeserializer.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/NBTDeserializer.java @@ -40,7 +40,7 @@ public NBTDeserializer(boolean compressed) { @Override public NamedTag fromStream(InputStream stream) throws IOException { NBTInputStream nbtIn; - if(compressed) { + if (compressed) { nbtIn = new NBTInputStream(new GZIPInputStream(stream)); } else { nbtIn = new NBTInputStream(stream); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/NBTInputStream.java b/src/main/java/com/volmit/iris/util/nbt/io/NBTInputStream.java index 08f7819dd..7a6dd167b 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/NBTInputStream.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/NBTInputStream.java @@ -96,7 +96,7 @@ private static IntArrayTag readIntArray(NBTInputStream in) throws IOException { int l = in.readInt(); int[] data = new int[l]; IntArrayTag iat = new IntArrayTag(data); - for(int i = 0; i < l; i++) { + for (int i = 0; i < l; i++) { data[i] = in.readInt(); } return iat; @@ -106,7 +106,7 @@ private static LongArrayTag readLongArray(NBTInputStream in) throws IOException int l = in.readInt(); long[] data = new long[l]; LongArrayTag iat = new LongArrayTag(data); - for(int i = 0; i < l; i++) { + for (int i = 0; i < l; i++) { data[i] = in.readLong(); } return iat; @@ -116,10 +116,10 @@ private static ListTag readListTag(NBTInputStream in, int maxDepth) throws IO byte listType = in.readByte(); ListTag list = ListTag.createUnchecked(idClassMapping.get(listType)); int length = in.readInt(); - if(length < 0) { + if (length < 0) { length = 0; } - for(int i = 0; i < length; i++) { + for (int i = 0; i < length; i++) { list.addUnchecked(in.readTag(listType, in.decrementMaxDepth(maxDepth))); } return list; @@ -127,7 +127,7 @@ private static ListTag readListTag(NBTInputStream in, int maxDepth) throws IO private static CompoundTag readCompound(NBTInputStream in, int maxDepth) throws IOException { CompoundTag comp = new CompoundTag(); - for(int id = in.readByte() & 0xFF; id != 0; id = in.readByte() & 0xFF) { + for (int id = in.readByte() & 0xFF; id != 0; id = in.readByte() & 0xFF) { String key = in.readUTF(); Tag element = in.readTag((byte) id, in.decrementMaxDepth(maxDepth)); comp.put(key, element); @@ -147,7 +147,7 @@ public Tag readRawTag(int maxDepth) throws IOException { private Tag readTag(byte type, int maxDepth) throws IOException { ExceptionBiFunction, IOException> f; - if((f = readers.get(type)) == null) { + if ((f = readers.get(type)) == null) { throw new IOException("invalid tag id \"" + type + "\""); } return f.accept(this, maxDepth); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/NBTOutputStream.java b/src/main/java/com/volmit/iris/util/nbt/io/NBTOutputStream.java index 95bb97d63..246549da5 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/NBTOutputStream.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/NBTOutputStream.java @@ -61,7 +61,7 @@ private static void put(byte id, ExceptionTriConsumer, I static byte idFromClass(Class clazz) { Byte id = classIdMapping.get(clazz); - if(id == null) { + if (id == null) { throw new IllegalArgumentException("unknown Tag class " + clazz.getName()); } return id; @@ -102,14 +102,14 @@ private static void writeByteArray(NBTOutputStream out, Tag tag) throws IOExc private static void writeIntArray(NBTOutputStream out, Tag tag) throws IOException { out.writeInt(((IntArrayTag) tag).length()); - for(int i : ((IntArrayTag) tag).getValue()) { + for (int i : ((IntArrayTag) tag).getValue()) { out.writeInt(i); } } private static void writeLongArray(NBTOutputStream out, Tag tag) throws IOException { out.writeInt(((LongArrayTag) tag).length()); - for(long l : ((LongArrayTag) tag).getValue()) { + for (long l : ((LongArrayTag) tag).getValue()) { out.writeLong(l); } } @@ -117,14 +117,14 @@ private static void writeLongArray(NBTOutputStream out, Tag tag) throws IOExc private static void writeList(NBTOutputStream out, Tag tag, int maxDepth) throws IOException { out.writeByte(idFromClass(((ListTag) tag).getTypeClass())); out.writeInt(((ListTag) tag).size()); - for(Tag t : ((ListTag) tag)) { + for (Tag t : ((ListTag) tag)) { out.writeRawTag(t, out.decrementMaxDepth(maxDepth)); } } private static void writeCompound(NBTOutputStream out, Tag tag, int maxDepth) throws IOException { - for(Map.Entry> entry : (CompoundTag) tag) { - if(entry.getValue().getID() == 0) { + for (Map.Entry> entry : (CompoundTag) tag) { + if (entry.getValue().getID() == 0) { throw new IOException("end tag not allowed"); } out.writeByte(entry.getValue().getID()); @@ -136,7 +136,7 @@ private static void writeCompound(NBTOutputStream out, Tag tag, int maxDepth) public void writeTag(NamedTag tag, int maxDepth) throws IOException { writeByte(tag.getTag().getID()); - if(tag.getTag().getID() != 0) { + if (tag.getTag().getID() != 0) { writeUTF(tag.getName() == null ? "" : tag.getName()); } writeRawTag(tag.getTag(), maxDepth); @@ -144,7 +144,7 @@ public void writeTag(NamedTag tag, int maxDepth) throws IOException { public void writeTag(Tag tag, int maxDepth) throws IOException { writeByte(tag.getID()); - if(tag.getID() != 0) { + if (tag.getID() != 0) { writeUTF(""); } writeRawTag(tag, maxDepth); @@ -152,7 +152,7 @@ public void writeTag(Tag tag, int maxDepth) throws IOException { public void writeRawTag(Tag tag, int maxDepth) throws IOException { ExceptionTriConsumer, Integer, IOException> f; - if((f = writers.get(tag.getID())) == null) { + if ((f = writers.get(tag.getID())) == null) { throw new IOException("invalid tag \"" + tag.getID() + "\""); } f.accept(this, tag, maxDepth); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/NBTSerializer.java b/src/main/java/com/volmit/iris/util/nbt/io/NBTSerializer.java index 104852fa4..95773380b 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/NBTSerializer.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/NBTSerializer.java @@ -40,7 +40,7 @@ public NBTSerializer(boolean compressed) { @Override public void toStream(NamedTag object, OutputStream out) throws IOException { NBTOutputStream nbtOut; - if(compressed) { + if (compressed) { nbtOut = new NBTOutputStream(new GZIPOutputStream(out, true)); } else { nbtOut = new NBTOutputStream(out); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/NBTUtil.java b/src/main/java/com/volmit/iris/util/nbt/io/NBTUtil.java index febc02576..bbf5050d1 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/NBTUtil.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/NBTUtil.java @@ -29,7 +29,7 @@ private NBTUtil() { } public static void write(NamedTag tag, File file, boolean compressed) throws IOException { - try(FileOutputStream fos = new FileOutputStream(file)) { + try (FileOutputStream fos = new FileOutputStream(file)) { new NBTSerializer(compressed).toStream(tag, fos); } } @@ -71,7 +71,7 @@ public static void write(Tag tag, String file) throws IOException { } public static NamedTag read(File file, boolean compressed) throws IOException { - try(FileInputStream fis = new FileInputStream(file)) { + try (FileInputStream fis = new FileInputStream(file)) { return new NBTDeserializer(compressed).fromStream(fis); } } @@ -85,7 +85,7 @@ public static NamedTag read(String file, boolean compressed) throws IOException } public static NamedTag read(File file) throws IOException { - try(FileInputStream fis = new FileInputStream(file)) { + try (FileInputStream fis = new FileInputStream(file)) { return new NBTDeserializer(false).fromStream(detectDecompression(fis)); } } @@ -99,7 +99,7 @@ private static InputStream detectDecompression(InputStream is) throws IOExceptio int signature = (pbis.read() & 0xFF) + (pbis.read() << 8); pbis.unread(signature >> 8); pbis.unread(signature & 0xFF); - if(signature == GZIPInputStream.GZIP_MAGIC) { + if (signature == GZIPInputStream.GZIP_MAGIC) { return new GZIPInputStream(pbis); } return pbis; diff --git a/src/main/java/com/volmit/iris/util/nbt/io/ParseException.java b/src/main/java/com/volmit/iris/util/nbt/io/ParseException.java index 1e77b722b..5ffa564b8 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/ParseException.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/ParseException.java @@ -33,7 +33,7 @@ public ParseException(String msg, String value, int index) { private static String formatError(String value, int index) { StringBuilder builder = new StringBuilder(); int i = Math.min(value.length(), index); - if(i > 35) { + if (i > 35) { builder.append("..."); } builder.append(value, Math.max(0, i - 35), i); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/SNBTDeserializer.java b/src/main/java/com/volmit/iris/util/nbt/io/SNBTDeserializer.java index bd6c50ef5..8bccdf57e 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/SNBTDeserializer.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/SNBTDeserializer.java @@ -35,7 +35,7 @@ public Tag fromReader(Reader reader) throws IOException { public Tag fromReader(Reader reader, int maxDepth) throws IOException { BufferedReader bufferedReader; - if(reader instanceof BufferedReader) { + if (reader instanceof BufferedReader) { bufferedReader = (BufferedReader) reader; } else { bufferedReader = new BufferedReader(reader); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/SNBTParser.java b/src/main/java/com/volmit/iris/util/nbt/io/SNBTParser.java index 532f289c4..03124dc12 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/SNBTParser.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/SNBTParser.java @@ -29,14 +29,14 @@ public final class SNBTParser implements MaxDepthIO { private static final Pattern - FLOAT_LITERAL_PATTERN = Pattern.compile("^[-+]?(?:\\d+\\.?|\\d*\\.\\d+)(?:e[-+]?\\d+)?f$", Pattern.CASE_INSENSITIVE), - DOUBLE_LITERAL_PATTERN = Pattern.compile("^[-+]?(?:\\d+\\.?|\\d*\\.\\d+)(?:e[-+]?\\d+)?d$", Pattern.CASE_INSENSITIVE), - DOUBLE_LITERAL_NO_SUFFIX_PATTERN = Pattern.compile("^[-+]?(?:\\d+\\.|\\d*\\.\\d+)(?:e[-+]?\\d+)?$", Pattern.CASE_INSENSITIVE), - BYTE_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+b$", Pattern.CASE_INSENSITIVE), - SHORT_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+s$", Pattern.CASE_INSENSITIVE), - INT_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+$", Pattern.CASE_INSENSITIVE), - LONG_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+l$", Pattern.CASE_INSENSITIVE), - NUMBER_PATTERN = Pattern.compile("^[-+]?\\d+$"); + FLOAT_LITERAL_PATTERN = Pattern.compile("^[-+]?(?:\\d+\\.?|\\d*\\.\\d+)(?:e[-+]?\\d+)?f$", Pattern.CASE_INSENSITIVE), + DOUBLE_LITERAL_PATTERN = Pattern.compile("^[-+]?(?:\\d+\\.?|\\d*\\.\\d+)(?:e[-+]?\\d+)?d$", Pattern.CASE_INSENSITIVE), + DOUBLE_LITERAL_NO_SUFFIX_PATTERN = Pattern.compile("^[-+]?(?:\\d+\\.|\\d*\\.\\d+)(?:e[-+]?\\d+)?$", Pattern.CASE_INSENSITIVE), + BYTE_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+b$", Pattern.CASE_INSENSITIVE), + SHORT_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+s$", Pattern.CASE_INSENSITIVE), + INT_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+$", Pattern.CASE_INSENSITIVE), + LONG_LITERAL_PATTERN = Pattern.compile("^[-+]?\\d+l$", Pattern.CASE_INSENSITIVE), + NUMBER_PATTERN = Pattern.compile("^[-+]?\\d+$"); private final StringPointer ptr; @@ -48,7 +48,7 @@ public static Tag parse(String string, int maxDepth) throws ParseException { SNBTParser parser = new SNBTParser(string); Tag tag = parser.parseAnything(maxDepth); parser.ptr.skipWhitespace(); - if(parser.ptr.hasNext()) { + if (parser.ptr.hasNext()) { throw parser.ptr.parseException("invalid characters after end of snbt"); } return tag; @@ -60,11 +60,11 @@ public static Tag parse(String string) throws ParseException { private Tag parseAnything(int maxDepth) throws ParseException { ptr.skipWhitespace(); - switch(ptr.currentChar()) { + switch (ptr.currentChar()) { case '{': return parseCompoundTag(maxDepth); case '[': - if(ptr.hasCharsLeft(2) && ptr.lookAhead(1) != '"' && ptr.lookAhead(2) == ';') { + if (ptr.hasCharsLeft(2) && ptr.lookAhead(1) != '"' && ptr.lookAhead(2) == ';') { return parseNumArray(); } return parseListTag(maxDepth); @@ -74,50 +74,50 @@ private Tag parseAnything(int maxDepth) throws ParseException { private Tag parseStringOrLiteral() throws ParseException { ptr.skipWhitespace(); - if(ptr.currentChar() == '"') { + if (ptr.currentChar() == '"') { return new StringTag(ptr.parseQuotedString()); } String s = ptr.parseSimpleString(); - if(s.isEmpty()) { + if (s.isEmpty()) { throw new ParseException("expected non empty value"); } - if(FLOAT_LITERAL_PATTERN.matcher(s).matches()) { + if (FLOAT_LITERAL_PATTERN.matcher(s).matches()) { return new FloatTag(Float.parseFloat(s.substring(0, s.length() - 1))); - } else if(BYTE_LITERAL_PATTERN.matcher(s).matches()) { + } else if (BYTE_LITERAL_PATTERN.matcher(s).matches()) { try { return new ByteTag(Byte.parseByte(s.substring(0, s.length() - 1))); - } catch(NumberFormatException ex) { + } catch (NumberFormatException ex) { Iris.reportError(ex); throw ptr.parseException("byte not in range: \"" + s.substring(0, s.length() - 1) + "\""); } - } else if(SHORT_LITERAL_PATTERN.matcher(s).matches()) { + } else if (SHORT_LITERAL_PATTERN.matcher(s).matches()) { try { return new ShortTag(Short.parseShort(s.substring(0, s.length() - 1))); - } catch(NumberFormatException ex) { + } catch (NumberFormatException ex) { Iris.reportError(ex); throw ptr.parseException("short not in range: \"" + s.substring(0, s.length() - 1) + "\""); } - } else if(LONG_LITERAL_PATTERN.matcher(s).matches()) { + } else if (LONG_LITERAL_PATTERN.matcher(s).matches()) { try { return new LongTag(Long.parseLong(s.substring(0, s.length() - 1))); - } catch(NumberFormatException ex) { + } catch (NumberFormatException ex) { Iris.reportError(ex); throw ptr.parseException("long not in range: \"" + s.substring(0, s.length() - 1) + "\""); } - } else if(INT_LITERAL_PATTERN.matcher(s).matches()) { + } else if (INT_LITERAL_PATTERN.matcher(s).matches()) { try { return new IntTag(Integer.parseInt(s)); - } catch(NumberFormatException ex) { + } catch (NumberFormatException ex) { Iris.reportError(ex); throw ptr.parseException("int not in range: \"" + s.substring(0, s.length() - 1) + "\""); } - } else if(DOUBLE_LITERAL_PATTERN.matcher(s).matches()) { + } else if (DOUBLE_LITERAL_PATTERN.matcher(s).matches()) { return new DoubleTag(Double.parseDouble(s.substring(0, s.length() - 1))); - } else if(DOUBLE_LITERAL_NO_SUFFIX_PATTERN.matcher(s).matches()) { + } else if (DOUBLE_LITERAL_NO_SUFFIX_PATTERN.matcher(s).matches()) { return new DoubleTag(Double.parseDouble(s)); - } else if("true".equalsIgnoreCase(s)) { + } else if ("true".equalsIgnoreCase(s)) { return new ByteTag(true); - } else if("false".equalsIgnoreCase(s)) { + } else if ("false".equalsIgnoreCase(s)) { return new ByteTag(false); } return new StringTag(s); @@ -129,17 +129,17 @@ private CompoundTag parseCompoundTag(int maxDepth) throws ParseException { CompoundTag compoundTag = new CompoundTag(); ptr.skipWhitespace(); - while(ptr.hasNext() && ptr.currentChar() != '}') { + while (ptr.hasNext() && ptr.currentChar() != '}') { ptr.skipWhitespace(); String key = ptr.currentChar() == '"' ? ptr.parseQuotedString() : ptr.parseSimpleString(); - if(key.isEmpty()) { + if (key.isEmpty()) { throw new ParseException("empty keys are not allowed"); } ptr.expectChar(':'); compoundTag.put(key, parseAnything(decrementMaxDepth(maxDepth))); - if(!ptr.nextArrayElement()) { + if (!ptr.nextArrayElement()) { break; } } @@ -151,15 +151,15 @@ private ListTag parseListTag(int maxDepth) throws ParseException { ptr.expectChar('['); ptr.skipWhitespace(); ListTag list = ListTag.createUnchecked(EndTag.class); - while(ptr.currentChar() != ']') { + while (ptr.currentChar() != ']') { Tag element = parseAnything(decrementMaxDepth(maxDepth)); try { list.addUnchecked(element); - } catch(IllegalArgumentException ex) { + } catch (IllegalArgumentException ex) { Iris.reportError(ex); throw ptr.parseException(ex.getMessage()); } - if(!ptr.nextArrayElement()) { + if (!ptr.nextArrayElement()) { break; } } @@ -172,7 +172,7 @@ private ArrayTag parseNumArray() throws ParseException { char arrayType = ptr.next(); ptr.expectChar(';'); ptr.skipWhitespace(); - switch(arrayType) { + switch (arrayType) { case 'B': return parseByteArrayTag(); case 'I': @@ -185,26 +185,26 @@ private ArrayTag parseNumArray() throws ParseException { private ByteArrayTag parseByteArrayTag() throws ParseException { List byteList = new ArrayList<>(); - while(ptr.currentChar() != ']') { + while (ptr.currentChar() != ']') { String s = ptr.parseSimpleString(); ptr.skipWhitespace(); - if(NUMBER_PATTERN.matcher(s).matches()) { + if (NUMBER_PATTERN.matcher(s).matches()) { try { byteList.add(Byte.parseByte(s)); - } catch(NumberFormatException ex) { + } catch (NumberFormatException ex) { Iris.reportError(ex); throw ptr.parseException("byte not in range: \"" + s + "\""); } } else { throw ptr.parseException("invalid byte in ByteArrayTag: \"" + s + "\""); } - if(!ptr.nextArrayElement()) { + if (!ptr.nextArrayElement()) { break; } } ptr.expectChar(']'); byte[] bytes = new byte[byteList.size()]; - for(int i = 0; i < byteList.size(); i++) { + for (int i = 0; i < byteList.size(); i++) { bytes[i] = byteList.get(i); } return new ByteArrayTag(bytes); @@ -212,20 +212,20 @@ private ByteArrayTag parseByteArrayTag() throws ParseException { private IntArrayTag parseIntArrayTag() throws ParseException { List intList = new ArrayList<>(); - while(ptr.currentChar() != ']') { + while (ptr.currentChar() != ']') { String s = ptr.parseSimpleString(); ptr.skipWhitespace(); - if(NUMBER_PATTERN.matcher(s).matches()) { + if (NUMBER_PATTERN.matcher(s).matches()) { try { intList.add(Integer.parseInt(s)); - } catch(NumberFormatException ex) { + } catch (NumberFormatException ex) { Iris.reportError(ex); throw ptr.parseException("int not in range: \"" + s + "\""); } } else { throw ptr.parseException("invalid int in IntArrayTag: \"" + s + "\""); } - if(!ptr.nextArrayElement()) { + if (!ptr.nextArrayElement()) { break; } } @@ -235,20 +235,20 @@ private IntArrayTag parseIntArrayTag() throws ParseException { private LongArrayTag parseLongArrayTag() throws ParseException { List longList = new ArrayList<>(); - while(ptr.currentChar() != ']') { + while (ptr.currentChar() != ']') { String s = ptr.parseSimpleString(); ptr.skipWhitespace(); - if(NUMBER_PATTERN.matcher(s).matches()) { + if (NUMBER_PATTERN.matcher(s).matches()) { try { longList.add(Long.parseLong(s)); - } catch(NumberFormatException ex) { + } catch (NumberFormatException ex) { Iris.reportError(ex); throw ptr.parseException("long not in range: \"" + s + "\""); } } else { throw ptr.parseException("invalid long in LongArrayTag: \"" + s + "\""); } - if(!ptr.nextArrayElement()) { + if (!ptr.nextArrayElement()) { break; } } diff --git a/src/main/java/com/volmit/iris/util/nbt/io/SNBTWriter.java b/src/main/java/com/volmit/iris/util/nbt/io/SNBTWriter.java index 5937fb952..adcf5a429 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/SNBTWriter.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/SNBTWriter.java @@ -50,12 +50,12 @@ public static void write(Tag tag, Writer writer) throws IOException { } public static String escapeString(String s) { - if(!NON_QUOTE_PATTERN.matcher(s).matches()) { + if (!NON_QUOTE_PATTERN.matcher(s).matches()) { StringBuilder sb = new StringBuilder(); sb.append('"'); - for(int i = 0; i < s.length(); i++) { + for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); - if(c == '\\' || c == '"') { + if (c == '\\' || c == '"') { sb.append('\\'); } sb.append(c); @@ -67,7 +67,7 @@ public static String escapeString(String s) { } private void writeAnything(Tag tag, int maxDepth) throws IOException { - switch(tag.getID()) { + switch (tag.getID()) { case EndTag.ID: //do nothing break; @@ -97,7 +97,7 @@ private void writeAnything(Tag tag, int maxDepth) throws IOException { break; case ListTag.ID: writer.write('['); - for(int i = 0; i < ((ListTag) tag).size(); i++) { + for (int i = 0; i < ((ListTag) tag).size(); i++) { writer.write(i == 0 ? "" : ","); writeAnything(((ListTag) tag).get(i), decrementMaxDepth(maxDepth)); } @@ -106,7 +106,7 @@ private void writeAnything(Tag tag, int maxDepth) throws IOException { case CompoundTag.ID: writer.write('{'); boolean first = true; - for(Map.Entry> entry : (CompoundTag) tag) { + for (Map.Entry> entry : (CompoundTag) tag) { writer.write(first ? "" : ","); writer.append(escapeString(entry.getKey())).write(':'); writeAnything(entry.getValue(), decrementMaxDepth(maxDepth)); @@ -127,7 +127,7 @@ private void writeAnything(Tag tag, int maxDepth) throws IOException { private void writeArray(Object array, int length, String prefix) throws IOException { writer.append('[').append(prefix).write(';'); - for(int i = 0; i < length; i++) { + for (int i = 0; i < length; i++) { writer.append(i == 0 ? "" : ",").write(Array.get(array, i).toString()); } writer.write(']'); diff --git a/src/main/java/com/volmit/iris/util/nbt/io/StringPointer.java b/src/main/java/com/volmit/iris/util/nbt/io/StringPointer.java index 4847dac70..539b1d477 100644 --- a/src/main/java/com/volmit/iris/util/nbt/io/StringPointer.java +++ b/src/main/java/com/volmit/iris/util/nbt/io/StringPointer.java @@ -29,17 +29,17 @@ public StringPointer(String value) { private static boolean isSimpleChar(char c) { return c >= 'a' && c <= 'z' - || c >= 'A' && c <= 'Z' - || c >= '0' && c <= '9' - || c == '-' - || c == '+' - || c == '.' - || c == '_'; + || c >= 'A' && c <= 'Z' + || c >= '0' && c <= '9' + || c == '-' + || c == '+' + || c == '.' + || c == '_'; } public String parseSimpleString() { int oldIndex = index; - while(hasNext() && isSimpleChar(currentChar())) { + while (hasNext() && isSimpleChar(currentChar())) { index++; } return value.substring(oldIndex, index); @@ -49,27 +49,27 @@ public String parseQuotedString() throws ParseException { int oldIndex = ++index; //ignore beginning quotes StringBuilder sb = null; boolean escape = false; - while(hasNext()) { + while (hasNext()) { char c = next(); - if(escape) { - if(c != '\\' && c != '"') { + if (escape) { + if (c != '\\' && c != '"') { throw parseException("invalid escape of '" + c + "'"); } escape = false; } else { - if(c == '\\') { //escape + if (c == '\\') { //escape escape = true; - if(sb != null) { + if (sb != null) { continue; } sb = new StringBuilder(value.substring(oldIndex, index - 1)); continue; } - if(c == '"') { + if (c == '"') { return sb == null ? value.substring(oldIndex, index - 1) : sb.toString(); } } - if(sb != null) { + if (sb != null) { sb.append(c); } } @@ -79,7 +79,7 @@ public String parseQuotedString() throws ParseException { @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean nextArrayElement() { skipWhitespace(); - if(hasNext() && currentChar() == ',') { + if (hasNext() && currentChar() == ',') { index++; skipWhitespace(); return true; @@ -90,7 +90,7 @@ public boolean nextArrayElement() { public void expectChar(char c) throws ParseException { skipWhitespace(); boolean hasNext = hasNext(); - if(hasNext && currentChar() == c) { + if (hasNext && currentChar() == c) { index++; return; } @@ -98,7 +98,7 @@ public void expectChar(char c) throws ParseException { } public void skipWhitespace() { - while(hasNext() && Character.isWhitespace(currentChar())) { + while (hasNext() && Character.isWhitespace(currentChar())) { index++; } } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/Chunk.java b/src/main/java/com/volmit/iris/util/nbt/mca/Chunk.java index 5b6dc03dc..6437bbe0e 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/Chunk.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/Chunk.java @@ -62,8 +62,7 @@ public class Chunk { /** * Create a new chunk based on raw base data from a region file. * - * @param data - * The raw base data to be used. + * @param data The raw base data to be used. */ public Chunk(CompoundTag data) { this.data = data; @@ -89,61 +88,61 @@ private static CompoundTag defaultLevel() { } private void initReferences(long loadFlags) { - if(data == null) { + if (data == null) { throw new NullPointerException("data cannot be null"); } CompoundTag level; - if((level = data.getCompoundTag("Level")) == null) { + if ((level = data.getCompoundTag("Level")) == null) { throw new IllegalArgumentException("data does not contain \"Level\" tag"); } dataVersion = data.getInt("DataVersion"); inhabitedTime = level.getLong("InhabitedTime"); lastUpdate = level.getLong("LastUpdate"); - if((loadFlags & BIOMES) != 0) { + if ((loadFlags & BIOMES) != 0) { biomes = INMS.get().newBiomeContainer(0, 256, level.getIntArray("Biomes")); } - if((loadFlags & HEIGHTMAPS) != 0) { + if ((loadFlags & HEIGHTMAPS) != 0) { heightMaps = level.getCompoundTag("Heightmaps"); } - if((loadFlags & CARVING_MASKS) != 0) { + if ((loadFlags & CARVING_MASKS) != 0) { carvingMasks = level.getCompoundTag("CarvingMasks"); } - if((loadFlags & ENTITIES) != 0) { + if ((loadFlags & ENTITIES) != 0) { entities = level.containsKey("Entities") ? level.getListTag("Entities").asCompoundTagList() : null; } - if((loadFlags & TILE_ENTITIES) != 0) { + if ((loadFlags & TILE_ENTITIES) != 0) { tileEntities = level.containsKey("TileEntities") ? level.getListTag("TileEntities").asCompoundTagList() : null; } - if((loadFlags & TILE_TICKS) != 0) { + if ((loadFlags & TILE_TICKS) != 0) { tileTicks = level.containsKey("TileTicks") ? level.getListTag("TileTicks").asCompoundTagList() : null; } - if((loadFlags & LIQUID_TICKS) != 0) { + if ((loadFlags & LIQUID_TICKS) != 0) { liquidTicks = level.containsKey("LiquidTicks") ? level.getListTag("LiquidTicks").asCompoundTagList() : null; } - if((loadFlags & LIGHTS) != 0) { + if ((loadFlags & LIGHTS) != 0) { lights = level.containsKey("Lights") ? level.getListTag("Lights").asListTagList() : null; } - if((loadFlags & LIQUIDS_TO_BE_TICKED) != 0) { + if ((loadFlags & LIQUIDS_TO_BE_TICKED) != 0) { liquidsToBeTicked = level.containsKey("LiquidsToBeTicked") ? level.getListTag("LiquidsToBeTicked").asListTagList() : null; } - if((loadFlags & TO_BE_TICKED) != 0) { + if ((loadFlags & TO_BE_TICKED) != 0) { toBeTicked = level.containsKey("ToBeTicked") ? level.getListTag("ToBeTicked").asListTagList() : null; } - if((loadFlags & POST_PROCESSING) != 0) { + if ((loadFlags & POST_PROCESSING) != 0) { postProcessing = level.containsKey("PostProcessing") ? level.getListTag("PostProcessing").asListTagList() : null; } status = level.getString("Status"); - if((loadFlags & STRUCTURES) != 0) { + if ((loadFlags & STRUCTURES) != 0) { structures = level.getCompoundTag("Structures"); } - if((loadFlags & (BLOCK_LIGHTS | BLOCK_STATES | SKY_LIGHT)) != 0 && level.containsKey("Sections")) { - for(CompoundTag section : level.getListTag("Sections").asCompoundTagList()) { + if ((loadFlags & (BLOCK_LIGHTS | BLOCK_STATES | SKY_LIGHT)) != 0 && level.containsKey("Sections")) { + for (CompoundTag section : level.getListTag("Sections").asCompoundTagList()) { int sectionIndex = section.getByte("Y"); - if(sectionIndex > 15 || sectionIndex < 0) { + if (sectionIndex > 15 || sectionIndex < 0) { continue; } Section newSection = new Section(section, dataVersion, loadFlags); - if(newSection.isEmpty()) { + if (newSection.isEmpty()) { continue; } sections.put(sectionIndex, newSection); @@ -151,7 +150,7 @@ private void initReferences(long loadFlags) { } // If we haven't requested the full set of data we can drop the underlying raw data to let the GC handle it. - if(loadFlags != ALL_DATA) { + if (loadFlags != ALL_DATA) { data = null; partial = true; } else { @@ -162,24 +161,19 @@ private void initReferences(long loadFlags) { /** * Serializes this chunk to a RandomAccessFile. * - * @param raf - * The RandomAccessFile to be written to. - * @param xPos - * The x-coordinate of the chunk. - * @param zPos - * The z-coodrinate of the chunk. + * @param raf The RandomAccessFile to be written to. + * @param xPos The x-coordinate of the chunk. + * @param zPos The z-coodrinate of the chunk. * @return The amount of bytes written to the RandomAccessFile. - * @throws UnsupportedOperationException - * When something went wrong during writing. - * @throws IOException - * When something went wrong during writing. + * @throws UnsupportedOperationException When something went wrong during writing. + * @throws IOException When something went wrong during writing. */ public int serialize(RandomAccessFile raf, int xPos, int zPos) throws IOException { - if(partial) { + if (partial) { throw new UnsupportedOperationException("Partially loaded chunks cannot be serialized"); } ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); - try(BufferedOutputStream nbtOut = new BufferedOutputStream(CompressionType.ZLIB.compress(baos))) { + try (BufferedOutputStream nbtOut = new BufferedOutputStream(CompressionType.ZLIB.compress(baos))) { new NBTSerializer(false).toStream(new NamedTag(null, updateHandle(xPos, zPos)), nbtOut); } @@ -193,10 +187,8 @@ public int serialize(RandomAccessFile raf, int xPos, int zPos) throws IOExceptio /** * Reads chunk data from a RandomAccessFile. The RandomAccessFile must already be at the correct position. * - * @param raf - * The RandomAccessFile to read the chunk data from. - * @throws IOException - * When something went wrong during reading. + * @param raf The RandomAccessFile to read the chunk data from. + * @throws IOException When something went wrong during reading. */ public void deserialize(RandomAccessFile raf) throws IOException { deserialize(raf, ALL_DATA); @@ -205,22 +197,19 @@ public void deserialize(RandomAccessFile raf) throws IOException { /** * Reads chunk data from a RandomAccessFile. The RandomAccessFile must already be at the correct position. * - * @param raf - * The RandomAccessFile to read the chunk data from. - * @param loadFlags - * A logical or of {@link LoadFlags} constants indicating what data should be loaded - * @throws IOException - * When something went wrong during reading. + * @param raf The RandomAccessFile to read the chunk data from. + * @param loadFlags A logical or of {@link LoadFlags} constants indicating what data should be loaded + * @throws IOException When something went wrong during reading. */ public void deserialize(RandomAccessFile raf, long loadFlags) throws IOException { byte compressionTypeByte = raf.readByte(); CompressionType compressionType = CompressionType.getFromID(compressionTypeByte); - if(compressionType == null) { + if (compressionType == null) { throw new IOException("invalid compression type " + compressionTypeByte); } BufferedInputStream dis = new BufferedInputStream(compressionType.decompress(new FileInputStream(raf.getFD()))); NamedTag tag = new NBTDeserializer(false).fromStream(dis); - if(tag != null && tag.getTag() instanceof CompoundTag) { + if (tag != null && tag.getTag() instanceof CompoundTag) { data = (CompoundTag) tag.getTag(); initReferences(loadFlags); } else { @@ -232,12 +221,9 @@ public void deserialize(RandomAccessFile raf, long loadFlags) throws IOException * Fetches a biome id at a specific block in this chunk. * The coordinates can be absolute coordinates or relative to the region or chunk. * - * @param blockX - * The x-coordinate of the block. - * @param blockY - * The y-coordinate of the block. - * @param blockZ - * The z-coordinate of the block. + * @param blockX The x-coordinate of the block. + * @param blockY The y-coordinate of the block. + * @param blockZ The z-coordinate of the block. * @return The biome id or -1 if the biomes are not correctly initialized. */ public synchronized int getBiomeAt(int blockX, int blockY, int blockZ) { @@ -248,13 +234,10 @@ public synchronized int getBiomeAt(int blockX, int blockY, int blockZ) { * Sets a biome id at a specific block column. * The coordinates can be absolute coordinates or relative to the region or chunk. * - * @param blockX - * The x-coordinate of the block column. - * @param blockZ - * The z-coordinate of the block column. - * @param biomeID - * The biome id to be set. - * When set to a negative number, Minecraft will replace it with the block column's default biome. + * @param blockX The x-coordinate of the block column. + * @param blockZ The z-coordinate of the block column. + * @param biomeID The biome id to be set. + * When set to a negative number, Minecraft will replace it with the block column's default biome. */ public synchronized void setBiomeAt(int blockX, int blockY, int blockZ, int biomeID) { biomes.setBiome(blockX, blockY, blockZ, biomeID); @@ -268,7 +251,7 @@ public CompoundTag getBlockStateAt(int blockX, int blockY, int blockZ) { int s = MCAUtil.blockToChunk(blockY); Section section = sections.get(s); - if(section == null) { + if (section == null) { return null; } return section.getBlockStateAt(blockX, blockY, blockZ); @@ -278,24 +261,19 @@ public CompoundTag getBlockStateAt(int blockX, int blockY, int blockZ) { * Sets a block state at a specific location. * The block coordinates can be absolute or relative to the region or chunk. * - * @param blockX - * The x-coordinate of the block. - * @param blockY - * The y-coordinate of the block. - * @param blockZ - * The z-coordinate of the block. - * @param state - * The block state to be set. - * @param cleanup - * When true, it will cleanup all palettes of this chunk. - * This option should only be used moderately to avoid unnecessary recalculation of the palette indices. - * Recalculating the Palette should only be executed once right before saving the Chunk to file. + * @param blockX The x-coordinate of the block. + * @param blockY The y-coordinate of the block. + * @param blockZ The z-coordinate of the block. + * @param state The block state to be set. + * @param cleanup When true, it will cleanup all palettes of this chunk. + * This option should only be used moderately to avoid unnecessary recalculation of the palette indices. + * Recalculating the Palette should only be executed once right before saving the Chunk to file. */ public void setBlockStateAt(int blockX, int blockY, int blockZ, CompoundTag state, boolean cleanup) { int sectionIndex = MCAUtil.blockToChunk(blockY); Section section = sections.get(sectionIndex); - if(section == null) { + if (section == null) { section = Section.newSection(); sections.put(sectionIndex, section); } @@ -313,8 +291,7 @@ public int getDataVersion() { * Sets the DataVersion of this chunk. This does not check if the data of this chunk conforms * to that DataVersion, that is the responsibility of the developer. * - * @param dataVersion - * The DataVersion to be set. + * @param dataVersion The DataVersion to be set. */ public void setDataVersion(int dataVersion) { this.dataVersion = dataVersion; @@ -330,8 +307,7 @@ public int getLastMCAUpdate() { /** * Sets the timestamp when this region file was last updated in seconds since 1970-01-01. * - * @param lastMCAUpdate - * The time in seconds since 1970-01-01. + * @param lastMCAUpdate The time in seconds since 1970-01-01. */ public void setLastMCAUpdate(int lastMCAUpdate) { this.lastMCAUpdate = lastMCAUpdate; @@ -347,8 +323,7 @@ public String getStatus() { /** * Sets the generation status of this chunk. * - * @param status - * The generation status of this chunk. + * @param status The generation status of this chunk. */ public void setStatus(String status) { this.status = status; @@ -357,8 +332,7 @@ public void setStatus(String status) { /** * Fetches the section at the given y-coordinate. * - * @param sectionY - * The y-coordinate of the section in this chunk ranging from 0 to 15. + * @param sectionY The y-coordinate of the section in this chunk ranging from 0 to 15. * @return The Section. */ public Section getSection(int sectionY) { @@ -368,10 +342,8 @@ public Section getSection(int sectionY) { /** * Sets a section at a givesn y-coordinate * - * @param sectionY - * The y-coordinate of the section in this chunk ranging from 0 to 15. - * @param section - * The section to be set. + * @param sectionY The y-coordinate of the section in this chunk ranging from 0 to 15. + * @param section The section to be set. */ public void setSection(int sectionY, Section section) { sections.put(sectionY, section); @@ -387,8 +359,7 @@ public long getLastUpdate() { /** * Sets the time when this chunk was last updated as a UNIX timestamp. * - * @param lastUpdate - * The UNIX timestamp. + * @param lastUpdate The UNIX timestamp. */ public void setLastUpdate(long lastUpdate) { this.lastUpdate = lastUpdate; @@ -404,8 +375,7 @@ public long getInhabitedTime() { /** * Sets the cumulative amount of time players have spent in this chunk in ticks. * - * @param inhabitedTime - * The time in ticks. + * @param inhabitedTime The time in ticks. */ public void setInhabitedTime(long inhabitedTime) { this.inhabitedTime = inhabitedTime; @@ -421,8 +391,7 @@ public CompoundTag getHeightMaps() { /** * Sets the height maps of this chunk. * - * @param heightMaps - * The height maps. + * @param heightMaps The height maps. */ public void setHeightMaps(CompoundTag heightMaps) { this.heightMaps = heightMaps; @@ -438,8 +407,7 @@ public CompoundTag getCarvingMasks() { /** * Sets the carving masks of this chunk. * - * @param carvingMasks - * The carving masks. + * @param carvingMasks The carving masks. */ public void setCarvingMasks(CompoundTag carvingMasks) { this.carvingMasks = carvingMasks; @@ -455,8 +423,7 @@ public ListTag getEntities() { /** * Sets the entities of this chunk. * - * @param entities - * The entities. + * @param entities The entities. */ public void setEntities(ListTag entities) { this.entities = entities; @@ -472,8 +439,7 @@ public ListTag getTileEntities() { /** * Sets the tile entities of this chunk. * - * @param tileEntities - * The tile entities of this chunk. + * @param tileEntities The tile entities of this chunk. */ public void setTileEntities(ListTag tileEntities) { this.tileEntities = tileEntities; @@ -489,8 +455,7 @@ public ListTag getTileTicks() { /** * Sets the tile ticks of this chunk. * - * @param tileTicks - * Thee tile ticks. + * @param tileTicks Thee tile ticks. */ public void setTileTicks(ListTag tileTicks) { this.tileTicks = tileTicks; @@ -506,8 +471,7 @@ public ListTag getLiquidTicks() { /** * Sets the liquid ticks of this chunk. * - * @param liquidTicks - * The liquid ticks. + * @param liquidTicks The liquid ticks. */ public void setLiquidTicks(ListTag liquidTicks) { this.liquidTicks = liquidTicks; @@ -523,8 +487,7 @@ public ListTag> getLights() { /** * Sets the light sources in this chunk. * - * @param lights - * The light sources. + * @param lights The light sources. */ public void setLights(ListTag> lights) { this.lights = lights; @@ -540,8 +503,7 @@ public ListTag> getLiquidsToBeTicked() { /** * Sets the liquids to be ticked in this chunk. * - * @param liquidsToBeTicked - * The liquids to be ticked. + * @param liquidsToBeTicked The liquids to be ticked. */ public void setLiquidsToBeTicked(ListTag> liquidsToBeTicked) { this.liquidsToBeTicked = liquidsToBeTicked; @@ -557,8 +519,7 @@ public ListTag> getToBeTicked() { /** * Sets stuff to be ticked in this chunk. * - * @param toBeTicked - * The stuff to be ticked. + * @param toBeTicked The stuff to be ticked. */ public void setToBeTicked(ListTag> toBeTicked) { this.toBeTicked = toBeTicked; @@ -574,8 +535,7 @@ public ListTag> getPostProcessing() { /** * Sets things to be post processed in this chunk. * - * @param postProcessing - * The things to be post processed. + * @param postProcessing The things to be post processed. */ public void setPostProcessing(ListTag> postProcessing) { this.postProcessing = postProcessing; @@ -591,8 +551,7 @@ public CompoundTag getStructures() { /** * Sets data about structures in this chunk. * - * @param structures - * The data about structures. + * @param structures The data about structures. */ public void setStructures(CompoundTag structures) { this.structures = structures; @@ -603,8 +562,8 @@ int getBlockIndex(int blockX, int blockZ) { } public void cleanupPalettesAndBlockStates() { - for(Section section : sections.values()) { - if(section != null) { + for (Section section : sections.values()) { + if (section != null) { section.cleanupPaletteAndBlockStates(); } } @@ -618,22 +577,22 @@ public CompoundTag updateHandle(int xPos, int zPos) { level.putLong("LastUpdate", lastUpdate); level.putLong("InhabitedTime", inhabitedTime); level.putIntArray("Biomes", biomes.getData()); - if(heightMaps != null) level.put("Heightmaps", heightMaps); - if(carvingMasks != null) level.put("CarvingMasks", carvingMasks); - if(entities != null) level.put("Entities", entities); - if(tileEntities != null) level.put("TileEntities", tileEntities); - if(tileTicks != null) level.put("TileTicks", tileTicks); - if(liquidTicks != null) level.put("LiquidTicks", liquidTicks); - if(lights != null) level.put("Lights", lights); - if(liquidsToBeTicked != null) level.put("LiquidsToBeTicked", liquidsToBeTicked); - if(toBeTicked != null) level.put("ToBeTicked", toBeTicked); - if(postProcessing != null) level.put("PostProcessing", postProcessing); + if (heightMaps != null) level.put("Heightmaps", heightMaps); + if (carvingMasks != null) level.put("CarvingMasks", carvingMasks); + if (entities != null) level.put("Entities", entities); + if (tileEntities != null) level.put("TileEntities", tileEntities); + if (tileTicks != null) level.put("TileTicks", tileTicks); + if (liquidTicks != null) level.put("LiquidTicks", liquidTicks); + if (lights != null) level.put("Lights", lights); + if (liquidsToBeTicked != null) level.put("LiquidsToBeTicked", liquidsToBeTicked); + if (toBeTicked != null) level.put("ToBeTicked", toBeTicked); + if (postProcessing != null) level.put("PostProcessing", postProcessing); level.putString("Status", status); - if(structures != null) level.put("Structures", structures); + if (structures != null) level.put("Structures", structures); ListTag sections = new ListTag<>(CompoundTag.class); - for(int i : this.sections.keySet()) { - if(this.sections.get(i) != null) { + for (int i : this.sections.keySet()) { + if (this.sections.get(i) != null) { sections.add(this.sections.get(i).updateHandle(i)); } } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/CompressionType.java b/src/main/java/com/volmit/iris/util/nbt/mca/CompressionType.java index 5c1e6ed3a..083561581 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/CompressionType.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/CompressionType.java @@ -45,8 +45,8 @@ public enum CompressionType { } public static CompressionType getFromID(byte id) { - for(CompressionType c : CompressionType.values()) { - if(c.id == id) { + for (CompressionType c : CompressionType.values()) { + if (c.id == id) { return c; } } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/MCAFile.java b/src/main/java/com/volmit/iris/util/nbt/mca/MCAFile.java index 8504bd4bb..47a878b90 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/MCAFile.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/MCAFile.java @@ -47,10 +47,8 @@ public class MCAFile { * This constructor needs the x- and z-coordinates of the stored region, * which can usually be taken from the file name {@code r.x.z.mca} * - * @param regionX - * The x-coordinate of this region. - * @param regionZ - * The z-coordinate of this region. + * @param regionX The x-coordinate of this region. + * @param regionZ The z-coordinate of this region. */ public MCAFile(int regionX, int regionZ) { this.regionX = regionX; @@ -62,10 +60,8 @@ public MCAFile(int regionX, int regionZ) { * Calculates the index of a chunk from its x- and z-coordinates in this region. * This works with absolute and relative coordinates. * - * @param chunkX - * The x-coordinate of the chunk. - * @param chunkZ - * The z-coordinate of the chunk. + * @param chunkX The x-coordinate of the chunk. + * @param chunkZ The z-coordinate of the chunk. * @return The index of this chunk. */ public static int getChunkIndex(int chunkX, int chunkZ) { @@ -76,10 +72,8 @@ public static int getChunkIndex(int chunkX, int chunkZ) { * Reads an .mca file from a {@code RandomAccessFile} into this object. * This method does not perform any cleanups on the data. * - * @param raf - * The {@code RandomAccessFile} to read from. - * @throws IOException - * If something went wrong during deserialization. + * @param raf The {@code RandomAccessFile} to read from. + * @throws IOException If something went wrong during deserialization. */ public void deserialize(RandomAccessFile raf) throws IOException { deserialize(raf, LoadFlags.ALL_DATA); @@ -89,21 +83,18 @@ public void deserialize(RandomAccessFile raf) throws IOException { * Reads an .mca file from a {@code RandomAccessFile} into this object. * This method does not perform any cleanups on the data. * - * @param raf - * The {@code RandomAccessFile} to read from. - * @param loadFlags - * A logical or of {@link LoadFlags} constants indicating what data should be loaded - * @throws IOException - * If something went wrong during deserialization. + * @param raf The {@code RandomAccessFile} to read from. + * @param loadFlags A logical or of {@link LoadFlags} constants indicating what data should be loaded + * @throws IOException If something went wrong during deserialization. */ public void deserialize(RandomAccessFile raf, long loadFlags) throws IOException { chunks = new AtomicReferenceArray<>(1024); - for(int i = 0; i < 1024; i++) { + for (int i = 0; i < 1024; i++) { raf.seek(i * 4); int offset = raf.read() << 16; offset |= (raf.read() & 0xFF) << 8; offset |= raf.read() & 0xFF; - if(raf.readByte() == 0) { + if (raf.readByte() == 0) { continue; } raf.seek(4096 + i * 4); @@ -120,7 +111,7 @@ public KList samplePositions(RandomAccessFile raf) throws IOException chunks = new AtomicReferenceArray<>(1024); int x = 0; int z = 0; - for(int i = 0; i < 1024; i++) { + for (int i = 0; i < 1024; i++) { x++; z++; @@ -128,7 +119,7 @@ public KList samplePositions(RandomAccessFile raf) throws IOException int offset = raf.read() << 16; offset |= (raf.read() & 0xFF) << 8; offset |= raf.read() & 0xFF; - if(raf.readByte() == 0) { + if (raf.readByte() == 0) { continue; } p2.add(new Position2(x & 31, (z / 31) & 31)); @@ -143,11 +134,9 @@ public AtomicReferenceArray getChunks() { /** * Calls {@link MCAFile#serialize(RandomAccessFile, boolean)} without updating any timestamps. * - * @param raf - * The {@code RandomAccessFile} to writeNodeData to. + * @param raf The {@code RandomAccessFile} to writeNodeData to. * @return The amount of chunks written to the file. - * @throws IOException - * If something went wrong during serialization. + * @throws IOException If something went wrong during serialization. * @see MCAFile#serialize(RandomAccessFile, boolean) */ public int serialize(RandomAccessFile raf) throws IOException { @@ -158,14 +147,11 @@ public int serialize(RandomAccessFile raf) throws IOException { * Serializes this object to an .mca file. * This method does not perform any cleanups on the data. * - * @param raf - * The {@code RandomAccessFile} to writeNodeData to. - * @param changeLastUpdate - * Whether it should update all timestamps that show - * when this file was last updated. + * @param raf The {@code RandomAccessFile} to writeNodeData to. + * @param changeLastUpdate Whether it should update all timestamps that show + * when this file was last updated. * @return The amount of chunks written to the file. - * @throws IOException - * If something went wrong during serialization. + * @throws IOException If something went wrong during serialization. */ public int serialize(RandomAccessFile raf, boolean changeLastUpdate) throws IOException { int globalOffset = 2; @@ -175,21 +161,21 @@ public int serialize(RandomAccessFile raf, boolean changeLastUpdate) throws IOEx int chunkXOffset = MCAUtil.regionToChunk(regionX); int chunkZOffset = MCAUtil.regionToChunk(regionZ); - if(chunks == null) { + if (chunks == null) { return 0; } - for(int cx = 0; cx < 32; cx++) { - for(int cz = 0; cz < 32; cz++) { + for (int cx = 0; cx < 32; cx++) { + for (int cz = 0; cz < 32; cz++) { int index = getChunkIndex(cx, cz); Chunk chunk = chunks.get(index); - if(chunk == null) { + if (chunk == null) { continue; } raf.seek(4096L * globalOffset); lastWritten = chunk.serialize(raf, chunkXOffset + cx, chunkZOffset + cz); - if(lastWritten == 0) { + if (lastWritten == 0) { continue; } @@ -212,7 +198,7 @@ public int serialize(RandomAccessFile raf, boolean changeLastUpdate) throws IOEx } // padding - if(lastWritten % 4096 != 0) { + if (lastWritten % 4096 != 0) { raf.seek(globalOffset * 4096L - 1); raf.write(0); } @@ -227,16 +213,13 @@ public int serialize(RandomAccessFile raf, boolean changeLastUpdate) throws IOEx /** * Set a specific Chunk at a specific index. The index must be in range of 0 - 1023. * - * @param index - * The index of the Chunk. - * @param chunk - * The Chunk to be set. - * @throws IndexOutOfBoundsException - * If index is not in the range. + * @param index The index of the Chunk. + * @param chunk The Chunk to be set. + * @throws IndexOutOfBoundsException If index is not in the range. */ public void setChunk(int index, Chunk chunk) { checkIndex(index); - if(chunks == null) { + if (chunks == null) { chunks = new AtomicReferenceArray<>(1024); } chunks.set(index, chunk); @@ -246,12 +229,9 @@ public void setChunk(int index, Chunk chunk) { * Set a specific Chunk at a specific chunk location. * The x- and z-value can be absolute chunk coordinates or they can be relative to the region origin. * - * @param chunkX - * The x-coordinate of the Chunk. - * @param chunkZ - * The z-coordinate of the Chunk. - * @param chunk - * The chunk to be set. + * @param chunkX The x-coordinate of the Chunk. + * @param chunkZ The z-coordinate of the Chunk. + * @param chunk The chunk to be set. */ public void setChunk(int chunkX, int chunkZ, Chunk chunk) { setChunk(getChunkIndex(chunkX, chunkZ), chunk); @@ -260,13 +240,12 @@ public void setChunk(int chunkX, int chunkZ, Chunk chunk) { /** * Returns the chunk data of a chunk at a specific index in this file. * - * @param index - * The index of the chunk in this file. + * @param index The index of the chunk in this file. * @return The chunk data. */ public Chunk getChunk(int index) { checkIndex(index); - if(chunks == null) { + if (chunks == null) { return null; } return chunks.get(index); @@ -275,10 +254,8 @@ public Chunk getChunk(int index) { /** * Returns the chunk data of a chunk in this file. * - * @param chunkX - * The x-coordinate of the chunk. - * @param chunkZ - * The z-coordinate of the chunk. + * @param chunkX The x-coordinate of the chunk. + * @param chunkZ The z-coordinate of the chunk. * @return The chunk data. */ public Chunk getChunk(int chunkX, int chunkZ) { @@ -290,7 +267,7 @@ public boolean hasChunk(int chunkX, int chunkZ) { } private int checkIndex(int index) { - if(index < 0 || index > 1023) { + if (index < 0 || index > 1023) { throw new IndexOutOfBoundsException(); } return index; @@ -299,7 +276,7 @@ private int checkIndex(int index) { private Chunk createChunkIfMissing(int blockX, int blockZ) { int chunkX = MCAUtil.blockToChunk(blockX), chunkZ = MCAUtil.blockToChunk(blockZ); Chunk chunk = getChunk(chunkX, chunkZ); - if(chunk == null) { + if (chunk == null) { chunk = Chunk.newChunk(); setChunk(getChunkIndex(chunkX, chunkZ), chunk); } @@ -313,18 +290,15 @@ public void setBiomeAt(int blockX, int blockY, int blockZ, int biomeID) { /** * Fetches the biome id at a specific block. * - * @param blockX - * The x-coordinate of the block. - * @param blockY - * The y-coordinate of the block. - * @param blockZ - * The z-coordinate of the block. + * @param blockX The x-coordinate of the block. + * @param blockY The y-coordinate of the block. + * @param blockZ The z-coordinate of the block. * @return The biome id if the chunk exists and the chunk has biomes, otherwise -1. */ public int getBiomeAt(int blockX, int blockY, int blockZ) { int chunkX = MCAUtil.blockToChunk(blockX), chunkZ = MCAUtil.blockToChunk(blockZ); Chunk chunk = getChunk(getChunkIndex(chunkX, chunkZ)); - if(chunk == null) { + if (chunk == null) { return -1; } return chunk.getBiomeAt(blockX, blockY, blockZ); @@ -334,16 +308,11 @@ public int getBiomeAt(int blockX, int blockY, int blockZ) { * Set a block state at a specific block location. * The block coordinates can be absolute coordinates or they can be relative to the region. * - * @param blockX - * The x-coordinate of the block. - * @param blockY - * The y-coordinate of the block. - * @param blockZ - * The z-coordinate of the block. - * @param state - * The block state to be set. - * @param cleanup - * Whether the Palette and the BLockStates should be recalculated after adding the block state. + * @param blockX The x-coordinate of the block. + * @param blockY The y-coordinate of the block. + * @param blockZ The z-coordinate of the block. + * @param state The block state to be set. + * @param cleanup Whether the Palette and the BLockStates should be recalculated after adding the block state. */ public void setBlockStateAt(int blockX, int blockY, int blockZ, CompoundTag state, boolean cleanup) { createChunkIfMissing(blockX, blockZ).setBlockStateAt(blockX, blockY, blockZ, state, cleanup); @@ -353,18 +322,15 @@ public void setBlockStateAt(int blockX, int blockY, int blockZ, CompoundTag stat * Fetches a block state at a specific block location. * The block coordinates can be absolute coordinates or they can be relative to the region. * - * @param blockX - * The x-coordinate of the block. - * @param blockY - * The y-coordinate of the block. - * @param blockZ - * The z-coordinate of the block. + * @param blockX The x-coordinate of the block. + * @param blockY The y-coordinate of the block. + * @param blockZ The z-coordinate of the block. * @return The block state or null if the chunk or the section do not exist. */ public CompoundTag getBlockStateAt(int blockX, int blockY, int blockZ) { int chunkX = MCAUtil.blockToChunk(blockX), chunkZ = MCAUtil.blockToChunk(blockZ); Chunk chunk = getChunk(chunkX, chunkZ); - if(chunk == null) { + if (chunk == null) { return null; } return chunk.getBlockStateAt(blockX, blockY, blockZ); diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/MCAUtil.java b/src/main/java/com/volmit/iris/util/nbt/mca/MCAUtil.java index ec3472cf5..da97e694b 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/MCAUtil.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/MCAUtil.java @@ -41,11 +41,9 @@ private MCAUtil() { } /** - * @param file - * The file to read the data from. + * @param file The file to read the data from. * @return An in-memory representation of the MCA file with decompressed chunk data. - * @throws IOException - * if something during deserialization goes wrong. + * @throws IOException if something during deserialization goes wrong. * @see MCAUtil#read(File) */ public static MCAFile read(String file) throws IOException { @@ -55,24 +53,19 @@ public static MCAFile read(String file) throws IOException { /** * Reads an MCA file and loads all of its chunks. * - * @param file - * The file to read the data from. + * @param file The file to read the data from. * @return An in-memory representation of the MCA file with decompressed chunk data. - * @throws IOException - * if something during deserialization goes wrong. + * @throws IOException if something during deserialization goes wrong. */ public static MCAFile read(File file) throws IOException { return read(file, LoadFlags.ALL_DATA); } /** - * @param file - * The file to read the data from. - * @param loadFlags - * A logical or of {@link LoadFlags} constants indicating what data should be loaded + * @param file The file to read the data from. + * @param loadFlags A logical or of {@link LoadFlags} constants indicating what data should be loaded * @return An in-memory representation of the MCA file with decompressed chunk data. - * @throws IOException - * if something during deserialization goes wrong. + * @throws IOException if something during deserialization goes wrong. * @see MCAUtil#read(File) */ public static MCAFile read(String file, long loadFlags) throws IOException { @@ -82,17 +75,14 @@ public static MCAFile read(String file, long loadFlags) throws IOException { /** * Reads an MCA file and loads all of its chunks. * - * @param file - * The file to read the data from. - * @param loadFlags - * A logical or of {@link LoadFlags} constants indicating what data should be loaded + * @param file The file to read the data from. + * @param loadFlags A logical or of {@link LoadFlags} constants indicating what data should be loaded * @return An in-memory representation of the MCA file with decompressed chunk data - * @throws IOException - * if something during deserialization goes wrong. + * @throws IOException if something during deserialization goes wrong. */ public static MCAFile read(File file, long loadFlags) throws IOException { MCAFile mcaFile = newMCAFile(file); - try(RandomAccessFile raf = new RandomAccessFile(file, "r")) { + try (RandomAccessFile raf = new RandomAccessFile(file, "r")) { mcaFile.deserialize(raf, loadFlags); return mcaFile; } @@ -100,7 +90,7 @@ public static MCAFile read(File file, long loadFlags) throws IOException { public static KList sampleChunkPositions(File file) throws IOException { MCAFile mcaFile = newMCAFile(file); - try(RandomAccessFile raf = new RandomAccessFile(file, "r")) { + try (RandomAccessFile raf = new RandomAccessFile(file, "r")) { return mcaFile.samplePositions(raf); } } @@ -108,13 +98,10 @@ public static KList sampleChunkPositions(File file) throws IOExceptio /** * Calls {@link MCAUtil#write(MCAFile, File, boolean)} without changing the timestamps. * - * @param file - * The file to writeNodeData to. - * @param mcaFile - * The data of the MCA file to writeNodeData. + * @param file The file to writeNodeData to. + * @param mcaFile The data of the MCA file to writeNodeData. * @return The amount of chunks written to the file. - * @throws IOException - * If something goes wrong during serialization. + * @throws IOException If something goes wrong during serialization. * @see MCAUtil#write(MCAFile, File, boolean) */ public static int write(MCAFile mcaFile, String file) throws IOException { @@ -124,13 +111,10 @@ public static int write(MCAFile mcaFile, String file) throws IOException { /** * Calls {@link MCAUtil#write(MCAFile, File, boolean)} without changing the timestamps. * - * @param file - * The file to writeNodeData to. - * @param mcaFile - * The data of the MCA file to writeNodeData. + * @param file The file to writeNodeData to. + * @param mcaFile The data of the MCA file to writeNodeData. * @return The amount of chunks written to the file. - * @throws IOException - * If something goes wrong during serialization. + * @throws IOException If something goes wrong during serialization. * @see MCAUtil#write(MCAFile, File, boolean) */ public static int write(MCAFile mcaFile, File file) throws IOException { @@ -138,15 +122,11 @@ public static int write(MCAFile mcaFile, File file) throws IOException { } /** - * @param file - * The file to writeNodeData to. - * @param mcaFile - * The data of the MCA file to writeNodeData. - * @param changeLastUpdate - * Whether to adjust the timestamps of when the file was saved. + * @param file The file to writeNodeData to. + * @param mcaFile The data of the MCA file to writeNodeData. + * @param changeLastUpdate Whether to adjust the timestamps of when the file was saved. * @return The amount of chunks written to the file. - * @throws IOException - * If something goes wrong during serialization. + * @throws IOException If something goes wrong during serialization. * @see MCAUtil#write(MCAFile, File, boolean) */ public static int write(MCAFile mcaFile, String file, boolean changeLastUpdate) throws IOException { @@ -159,31 +139,27 @@ public static int write(MCAFile mcaFile, String file, boolean changeLastUpdate) * the value set by either loading an already existing MCA file or setting them manually.
* If the file already exists, it is completely overwritten by the new file (no modification). * - * @param file - * The file to writeNodeData to. - * @param mcaFile - * The data of the MCA file to writeNodeData. - * @param changeLastUpdate - * Whether to adjust the timestamps of when the file was saved. + * @param file The file to writeNodeData to. + * @param mcaFile The data of the MCA file to writeNodeData. + * @param changeLastUpdate Whether to adjust the timestamps of when the file was saved. * @return The amount of chunks written to the file. - * @throws IOException - * If something goes wrong during serialization. + * @throws IOException If something goes wrong during serialization. */ public static int write(MCAFile mcaFile, File file, boolean changeLastUpdate) throws IOException { - if(mcaFile == null) { + if (mcaFile == null) { return 0; } File to = file; - if(file.exists()) { + if (file.exists()) { to = File.createTempFile(to.getName(), null); } int chunks; - try(RandomAccessFile raf = new RandomAccessFile(to, "rw")) { + try (RandomAccessFile raf = new RandomAccessFile(to, "rw")) { chunks = mcaFile.serialize(raf, changeLastUpdate); } - if(chunks > 0 && to != file) { + if (chunks > 0 && to != file) { Files.move(to.toPath(), file.toPath(), StandardCopyOption.REPLACE_EXISTING); } @@ -194,10 +170,8 @@ public static int write(MCAFile mcaFile, File file, boolean changeLastUpdate) th * Turns the chunks coordinates into region coordinates and calls * {@link MCAUtil#createNameFromRegionLocation(int, int)} * - * @param chunkX - * The x-value of the location of the chunk. - * @param chunkZ - * The z-value of the location of the chunk. + * @param chunkX The x-value of the location of the chunk. + * @param chunkZ The z-value of the location of the chunk. * @return A mca filename in the format "r.{regionX}.{regionZ}.mca" */ public static String createNameFromChunkLocation(int chunkX, int chunkZ) { @@ -208,10 +182,8 @@ public static String createNameFromChunkLocation(int chunkX, int chunkZ) { * Turns the block coordinates into region coordinates and calls * {@link MCAUtil#createNameFromRegionLocation(int, int)} * - * @param blockX - * The x-value of the location of the block. - * @param blockZ - * The z-value of the location of the block. + * @param blockX The x-value of the location of the block. + * @param blockZ The z-value of the location of the block. * @return A mca filename in the format "r.{regionX}.{regionZ}.mca" */ public static String createNameFromBlockLocation(int blockX, int blockZ) { @@ -221,10 +193,8 @@ public static String createNameFromBlockLocation(int blockX, int blockZ) { /** * Creates a filename string from provided chunk coordinates. * - * @param regionX - * The x-value of the location of the region. - * @param regionZ - * The z-value of the location of the region. + * @param regionX The x-value of the location of the region. + * @param regionZ The z-value of the location of the region. * @return A mca filename in the format "r.{regionX}.{regionZ}.mca" */ public static String createNameFromRegionLocation(int regionX, int regionZ) { @@ -234,8 +204,7 @@ public static String createNameFromRegionLocation(int regionX, int regionZ) { /** * Turns a block coordinate value into a chunk coordinate value. * - * @param block - * The block coordinate value. + * @param block The block coordinate value. * @return The chunk coordinate value. */ public static int blockToChunk(int block) { @@ -245,8 +214,7 @@ public static int blockToChunk(int block) { /** * Turns a block coordinate value into a region coordinate value. * - * @param block - * The block coordinate value. + * @param block The block coordinate value. * @return The region coordinate value. */ public static int blockToRegion(int block) { @@ -256,8 +224,7 @@ public static int blockToRegion(int block) { /** * Turns a chunk coordinate value into a region coordinate value. * - * @param chunk - * The chunk coordinate value. + * @param chunk The chunk coordinate value. * @return The region coordinate value. */ public static int chunkToRegion(int chunk) { @@ -267,8 +234,7 @@ public static int chunkToRegion(int chunk) { /** * Turns a region coordinate value into a chunk coordinate value. * - * @param region - * The region coordinate value. + * @param region The region coordinate value. * @return The chunk coordinate value. */ public static int regionToChunk(int region) { @@ -278,8 +244,7 @@ public static int regionToChunk(int region) { /** * Turns a region coordinate value into a block coordinate value. * - * @param region - * The region coordinate value. + * @param region The region coordinate value. * @return The block coordinate value. */ public static int regionToBlock(int region) { @@ -289,8 +254,7 @@ public static int regionToBlock(int region) { /** * Turns a chunk coordinate value into a block coordinate value. * - * @param chunk - * The chunk coordinate value. + * @param chunk The chunk coordinate value. * @return The block coordinate value. */ public static int chunkToBlock(int chunk) { @@ -299,7 +263,7 @@ public static int chunkToBlock(int chunk) { public static MCAFile newMCAFile(File file) { Matcher m = mcaFilePattern.matcher(file.getName()); - if(m.find()) { + if (m.find()) { return new MCAFile(Integer.parseInt(m.group("regionX")), Integer.parseInt(m.group("regionZ"))); } throw new IllegalArgumentException("invalid mca file name: " + file.getName()); diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/NBTWorld.java b/src/main/java/com/volmit/iris/util/nbt/mca/NBTWorld.java index a8c4adf4a..a4e0ad58b 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/NBTWorld.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/NBTWorld.java @@ -49,11 +49,11 @@ public class NBTWorld { NamespacedKey key = blockData.getMaterial().getKey(); s.putString("Name", key.getNamespace() + ":" + key.getKey()); - if(data.contains("[")) { + if (data.contains("[")) { String raw = data.split("\\Q[\\E")[1].replaceAll("\\Q]\\E", ""); CompoundTag props = new CompoundTag(); - if(raw.contains(",")) { - for(String i : raw.split("\\Q,\\E")) { + if (raw.contains(",")) { + for (String i : raw.split("\\Q,\\E")) { String[] m = i.split("\\Q=\\E"); String k = m[0]; String v = m[1]; @@ -90,17 +90,17 @@ public NBTWorld(File worldFolder) { } public static BlockData getBlockData(CompoundTag tag) { - if(tag == null) { + if (tag == null) { return B.getAir(); } StringBuilder p = new StringBuilder(tag.getString("Name")); - if(tag.containsKey("Properties")) { + if (tag.containsKey("Properties")) { CompoundTag props = tag.getCompoundTag("Properties"); p.append('['); - for(String i : props.keySet()) { + for (String i : props.keySet()) { p.append(i).append('=').append(props.getString(i)).append(','); } @@ -109,7 +109,7 @@ public static BlockData getBlockData(CompoundTag tag) { BlockData b = B.getOrNull(p.toString()); - if(b == null) { + if (b == null) { return B.getAir(); } @@ -123,8 +123,8 @@ public static CompoundTag getCompound(BlockData bd) { private static Map computeBiomeIDs() { Map biomeIds = new KMap<>(); - for(Biome biome : Biome.values()) { - if(!biome.name().equals("CUSTOM")) { + for (Biome biome : Biome.values()) { + if (!biome.name().equals("CUSTOM")) { biomeIds.put(biome, INMS.get().getBiomeId(biome)); } } @@ -134,22 +134,22 @@ private static Map computeBiomeIDs() { public void close() { - for(Long i : loadedRegions.k()) { + for (Long i : loadedRegions.k()) { queueSaveUnload(Cache.keyX(i), Cache.keyZ(i)); } saveQueue.shutdown(); try { - while(!saveQueue.awaitTermination(3, TimeUnit.SECONDS)) { + while (!saveQueue.awaitTermination(3, TimeUnit.SECONDS)) { Iris.info("Still Waiting to save MCA Files..."); } - } catch(InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); } } public void flushNow() { - for(Long i : loadedRegions.k()) { + for (Long i : loadedRegions.k()) { doSaveUnload(Cache.keyX(i), Cache.keyZ(i)); } } @@ -160,7 +160,7 @@ public void queueSaveUnload(int x, int z) { public void doSaveUnload(int x, int z) { MCAFile f = getMCAOrNull(x, z); - if(f != null) { + if (f != null) { unloadRegion(x, z); } @@ -170,15 +170,15 @@ public void doSaveUnload(int x, int z) { public void save() { boolean saving = true; - for(Long i : loadedRegions.k()) { + for (Long i : loadedRegions.k()) { int x = Cache.keyX(i); int z = Cache.keyZ(i); - if(!lastUse.containsKey(i)) { + if (!lastUse.containsKey(i)) { lastUse.put(i, M.ms()); } - if(shouldUnload(x, z)) { + if (shouldUnload(x, z)) { queueSaveUnload(x, z); } } @@ -203,7 +203,7 @@ public void saveRegion(int x, int z) { try { MCAUtil.write(mca, getRegionFile(x, z), true); Iris.debug("Saved Region " + C.GOLD + x + " " + z); - } catch(IOException e) { + } catch (IOException e) { Iris.error("Failed to save region " + getRegionFile(x, z).getPath()); e.printStackTrace(); } @@ -213,7 +213,7 @@ public void saveRegion(int x, int z, MCAFile mca) { try { MCAUtil.write(mca, getRegionFile(x, z), true); Iris.debug("Saved Region " + C.GOLD + x + " " + z); - } catch(IOException e) { + } catch (IOException e) { Iris.error("Failed to save region " + getRegionFile(x, z).getPath()); e.printStackTrace(); } @@ -231,12 +231,12 @@ public BlockData getBlockData(int x, int y, int z) { try { CompoundTag tag = getChunkSection(x >> 4, y >> 4, z >> 4).getBlockStateAt(x & 15, y & 15, z & 15); - if(tag == null) { + if (tag == null) { return AIR; } return getBlockData(tag); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -259,7 +259,7 @@ public Section getChunkSection(int x, int y, int z) { Chunk c = getChunk(x, z); Section s = c.getSection(y); - if(s == null) { + if (s == null) { s = Section.newSection(); c.setSection(y, s); } @@ -274,7 +274,7 @@ public Chunk getChunk(int x, int z) { public Chunk getChunk(MCAFile mca, int x, int z) { Chunk c = mca.getChunk(x & 31, z & 31); - if(c == null) { + if (c == null) { c = Chunk.newChunk(); mca.setChunk(x & 31, z & 31, c); } @@ -304,7 +304,7 @@ public MCAFile getMCA(int x, int z) { MCAFile mcaf = loadedRegions.get(key); - if(mcaf == null) { + if (mcaf == null) { mcaf = new MCAFile(x, z); loadedRegions.put(key, mcaf); } @@ -317,7 +317,7 @@ public MCAFile getMCAOrNull(int x, int z) { long key = Cache.key(x, z); return hyperLock.withResult(x, z, () -> { - if(loadedRegions.containsKey(key)) { + if (loadedRegions.containsKey(key)) { lastUse.put(key, M.ms()); return loadedRegions.get(key); } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/Section.java b/src/main/java/com/volmit/iris/util/nbt/mca/Section.java index 53fcfae41..f58f74faf 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/Section.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/Section.java @@ -38,7 +38,7 @@ public Section(CompoundTag sectionRoot, int dataVersion) { public Section(CompoundTag sectionRoot, int dataVersion, long loadFlags) { data = sectionRoot; ListTag rawPalette = sectionRoot.getListTag("Palette"); - if(rawPalette == null) { + if (rawPalette == null) { return; } palette = INMS.get().createPalette(); @@ -77,16 +77,13 @@ public boolean isEmpty() { * Fetches a block state based on a block location from this section. * The coordinates represent the location of the block inside of this Section. * - * @param blockX - * The x-coordinate of the block in this Section - * @param blockY - * The y-coordinate of the block in this Section - * @param blockZ - * The z-coordinate of the block in this Section + * @param blockX The x-coordinate of the block in this Section + * @param blockY The y-coordinate of the block in this Section + * @param blockZ The z-coordinate of the block in this Section * @return The block state data of this block. */ public synchronized CompoundTag getBlockStateAt(int blockX, int blockY, int blockZ) { - synchronized(palette) { + synchronized (palette) { return palette.getBlock(blockX & 15, blockY & 15, blockZ & 15); } } @@ -94,17 +91,13 @@ public synchronized CompoundTag getBlockStateAt(int blockX, int blockY, int bloc /** * Attempts to add a block state for a specific block location in this Section. * - * @param blockX - * The x-coordinate of the block in this Section - * @param blockY - * The y-coordinate of the block in this Section - * @param blockZ - * The z-coordinate of the block in this Section - * @param state - * The block state to be set + * @param blockX The x-coordinate of the block in this Section + * @param blockY The y-coordinate of the block in this Section + * @param blockZ The z-coordinate of the block in this Section + * @param state The block state to be set */ public synchronized void setBlockStateAt(int blockX, int blockY, int blockZ, CompoundTag state, boolean cleanup) { - synchronized(palette) { + synchronized (palette) { palette.setBlock(blockX & 15, blockY & 15, blockZ & 15, state); } } @@ -128,13 +121,11 @@ public synchronized byte[] getBlockLight() { /** * Sets the block light array for this section. * - * @param blockLight - * The block light array - * @throws IllegalArgumentException - * When the length of the array is not 2048 + * @param blockLight The block light array + * @throws IllegalArgumentException When the length of the array is not 2048 */ public synchronized void setBlockLight(byte[] blockLight) { - if(blockLight != null && blockLight.length != 2048) { + if (blockLight != null && blockLight.length != 2048) { throw new IllegalArgumentException("BlockLight array must have a length of 2048"); } this.blockLight = blockLight; @@ -150,13 +141,11 @@ public synchronized byte[] getSkyLight() { /** * Sets the sky light values of this section. * - * @param skyLight - * The custom sky light values - * @throws IllegalArgumentException - * If the length of the array is not 2048 + * @param skyLight The custom sky light values + * @throws IllegalArgumentException If the length of the array is not 2048 */ public synchronized void setSkyLight(byte[] skyLight) { - if(skyLight != null && skyLight.length != 2048) { + if (skyLight != null && skyLight.length != 2048) { throw new IllegalArgumentException("SkyLight array must have a length of 2048"); } this.skyLight = skyLight; @@ -167,22 +156,21 @@ public synchronized void setSkyLight(byte[] skyLight) { * This must be called before saving a Section to disk if the Section was manually created * to set the Y of this Section. * - * @param y - * The Y-value of this Section + * @param y The Y-value of this Section * @return A reference to the raw CompoundTag this Section is based on */ public synchronized CompoundTag updateHandle(int y) { data.putByte("Y", (byte) y); - if(palette != null) { - synchronized(palette) { + if (palette != null) { + synchronized (palette) { palette.writeToSection(data); } } - if(blockLight != null) { + if (blockLight != null) { data.putByteArray("BlockLight", blockLight); } - if(skyLight != null) { + if (skyLight != null) { data.putByteArray("SkyLight", skyLight); } return data; diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCABitStorage.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCABitStorage.java index cc9d20bf9..b3413bf5b 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCABitStorage.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCABitStorage.java @@ -23,27 +23,27 @@ import java.util.function.IntConsumer; public class MCABitStorage { - private static final int[] MAGIC = new int[] { - -1, -1, 0, Integer.MIN_VALUE, 0, 0, 1431655765, 1431655765, 0, Integer.MIN_VALUE, - 0, 1, 858993459, 858993459, 0, 715827882, 715827882, 0, 613566756, 613566756, - 0, Integer.MIN_VALUE, 0, 2, 477218588, 477218588, 0, 429496729, 429496729, 0, - 390451572, 390451572, 0, 357913941, 357913941, 0, 330382099, 330382099, 0, 306783378, - 306783378, 0, 286331153, 286331153, 0, Integer.MIN_VALUE, 0, 3, 252645135, 252645135, - 0, 238609294, 238609294, 0, 226050910, 226050910, 0, 214748364, 214748364, 0, - 204522252, 204522252, 0, 195225786, 195225786, 0, 186737708, 186737708, 0, 178956970, - 178956970, 0, 171798691, 171798691, 0, 165191049, 165191049, 0, 159072862, 159072862, - 0, 153391689, 153391689, 0, 148102320, 148102320, 0, 143165576, 143165576, 0, - 138547332, 138547332, 0, Integer.MIN_VALUE, 0, 4, 130150524, 130150524, 0, 126322567, - 126322567, 0, 122713351, 122713351, 0, 119304647, 119304647, 0, 116080197, 116080197, - 0, 113025455, 113025455, 0, 110127366, 110127366, 0, 107374182, 107374182, 0, - 104755299, 104755299, 0, 102261126, 102261126, 0, 99882960, 99882960, 0, 97612893, - 97612893, 0, 95443717, 95443717, 0, 93368854, 93368854, 0, 91382282, 91382282, - 0, 89478485, 89478485, 0, 87652393, 87652393, 0, 85899345, 85899345, 0, - 84215045, 84215045, 0, 82595524, 82595524, 0, 81037118, 81037118, 0, 79536431, - 79536431, 0, 78090314, 78090314, 0, 76695844, 76695844, 0, 75350303, 75350303, - 0, 74051160, 74051160, 0, 72796055, 72796055, 0, 71582788, 71582788, 0, - 70409299, 70409299, 0, 69273666, 69273666, 0, 68174084, 68174084, 0, Integer.MIN_VALUE, - 0, 5}; + private static final int[] MAGIC = new int[]{ + -1, -1, 0, Integer.MIN_VALUE, 0, 0, 1431655765, 1431655765, 0, Integer.MIN_VALUE, + 0, 1, 858993459, 858993459, 0, 715827882, 715827882, 0, 613566756, 613566756, + 0, Integer.MIN_VALUE, 0, 2, 477218588, 477218588, 0, 429496729, 429496729, 0, + 390451572, 390451572, 0, 357913941, 357913941, 0, 330382099, 330382099, 0, 306783378, + 306783378, 0, 286331153, 286331153, 0, Integer.MIN_VALUE, 0, 3, 252645135, 252645135, + 0, 238609294, 238609294, 0, 226050910, 226050910, 0, 214748364, 214748364, 0, + 204522252, 204522252, 0, 195225786, 195225786, 0, 186737708, 186737708, 0, 178956970, + 178956970, 0, 171798691, 171798691, 0, 165191049, 165191049, 0, 159072862, 159072862, + 0, 153391689, 153391689, 0, 148102320, 148102320, 0, 143165576, 143165576, 0, + 138547332, 138547332, 0, Integer.MIN_VALUE, 0, 4, 130150524, 130150524, 0, 126322567, + 126322567, 0, 122713351, 122713351, 0, 119304647, 119304647, 0, 116080197, 116080197, + 0, 113025455, 113025455, 0, 110127366, 110127366, 0, 107374182, 107374182, 0, + 104755299, 104755299, 0, 102261126, 102261126, 0, 99882960, 99882960, 0, 97612893, + 97612893, 0, 95443717, 95443717, 0, 93368854, 93368854, 0, 91382282, 91382282, + 0, 89478485, 89478485, 0, 87652393, 87652393, 0, 85899345, 85899345, 0, + 84215045, 84215045, 0, 82595524, 82595524, 0, 81037118, 81037118, 0, 79536431, + 79536431, 0, 78090314, 78090314, 0, 76695844, 76695844, 0, 75350303, 75350303, + 0, 74051160, 74051160, 0, 72796055, 72796055, 0, 71582788, 71582788, 0, + 70409299, 70409299, 0, 69273666, 69273666, 0, 68174084, 68174084, 0, Integer.MIN_VALUE, + 0, 5}; private final long[] data; @@ -76,8 +76,8 @@ public MCABitStorage(int bits, int length, long[] data) { this.divideAdd = MAGIC[var3 + 1]; this.divideShift = MAGIC[var3 + 2]; int var4 = (length + this.valuesPerLong - 1) / this.valuesPerLong; - if(data != null) { - if(data.length != var4) + if (data != null) { + if (data.length != var4) throw new RuntimeException("NO!"); this.data = data; } else { @@ -133,11 +133,11 @@ public int getBits() { public void getAll(IntConsumer var0) { int var1 = 0; - for(long var5 : this.data) { - for(int var7 = 0; var7 < this.valuesPerLong; var7++) { + for (long var5 : this.data) { + for (int var7 = 0; var7 < this.valuesPerLong; var7++) { var0.accept((int) (var5 & this.mask)); var5 >>= this.bits; - if(++var1 >= this.size) + if (++var1 >= this.size) return; } } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAChunkBiomeContainer.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAChunkBiomeContainer.java index 1a7834893..862574300 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAChunkBiomeContainer.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAChunkBiomeContainer.java @@ -54,18 +54,18 @@ public MCAChunkBiomeContainer(MCAIdMap registry, int min, int max) { public MCAChunkBiomeContainer(MCAIdMap registry, int minHeight, int maxHeight, int[] aint) { this(registry, minHeight, maxHeight, (T[]) new Object[aint.length]); int i = -1; - for(int j = 0; j < this.biomes.length; j++) { + for (int j = 0; j < this.biomes.length; j++) { int k = aint[j]; T biomebase = registry.byId(k); - if(biomebase == null) { - if(i == -1) + if (biomebase == null) { + if (i == -1) i = j; this.biomes[j] = registry.byId(0); } else { this.biomes[j] = biomebase; } } - if(i != -1) + if (i != -1) LOGGER.warn("Invalid biome data received, starting from {}: {}", Integer.valueOf(i), Arrays.toString(aint)); } @@ -75,7 +75,7 @@ private static int ceilDiv(int i, int j) { public int[] writeBiomes() { int[] aint = new int[this.biomes.length]; - for(int i = 0; i < this.biomes.length; i++) + for (int i = 0; i < this.biomes.length; i++) aint[i] = this.biomeRegistry.getId(this.biomes[i]); return aint; } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCACrudeIncrementalIntIdentityHashBiMap.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCACrudeIncrementalIntIdentityHashBiMap.java index 08957cc2c..a59784f5d 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCACrudeIncrementalIntIdentityHashBiMap.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCACrudeIncrementalIntIdentityHashBiMap.java @@ -54,13 +54,13 @@ public int getId(K var0) { public K byId(int var0) { - if(var0 < 0 || var0 >= this.byId.length) + if (var0 < 0 || var0 >= this.byId.length) return null; return this.byId[var0]; } private int getValue(int var0) { - if(var0 == -1) + if (var0 == -1) return -1; return this.values[var0]; } @@ -80,7 +80,7 @@ public int add(K var0) { } private int nextId() { - while(this.nextId < this.byId.length && this.byId[this.nextId] != null) + while (this.nextId < this.byId.length && this.byId[this.nextId] != null) this.nextId++; return this.nextId; } @@ -93,17 +93,17 @@ private void grow(int var0) { this.byId = (K[]) new Object[var0]; this.nextId = 0; this.size = 0; - for(int var3 = 0; var3 < var1.length; var3++) { - if(var1[var3] != null) + for (int var3 = 0; var3 < var1.length; var3++) { + if (var1[var3] != null) addMapping(var1[var3], var2[var3]); } } public void addMapping(K var0, int var1) { int var2 = Math.max(var1, this.size + 1); - if(var2 >= this.keys.length * 0.8F) { + if (var2 >= this.keys.length * 0.8F) { int i = this.keys.length << 1; - while(i < var1) + while (i < var1) i <<= 1; grow(i); } @@ -112,7 +112,7 @@ public void addMapping(K var0, int var1) { this.values[var3] = var1; this.byId[var1] = var0; this.size++; - if(var1 == this.nextId) + if (var1 == this.nextId) this.nextId++; } @@ -122,16 +122,16 @@ private int hash(K var0) { private int indexOf(K var0, int var1) { int var2; - for(var2 = var1; var2 < this.keys.length; var2++) { - if(this.keys[var2] == var0) + for (var2 = var1; var2 < this.keys.length; var2++) { + if (this.keys[var2] == var0) return var2; - if(this.keys[var2] == EMPTY_SLOT) + if (this.keys[var2] == EMPTY_SLOT) return -1; } - for(var2 = 0; var2 < var1; var2++) { - if(this.keys[var2] == var0) + for (var2 = 0; var2 < var1; var2++) { + if (this.keys[var2] == var0) return var2; - if(this.keys[var2] == EMPTY_SLOT) + if (this.keys[var2] == EMPTY_SLOT) return -1; } return -1; @@ -139,12 +139,12 @@ private int indexOf(K var0, int var1) { private int findEmpty(int var0) { int var1; - for(var1 = var0; var1 < this.keys.length; var1++) { - if(this.keys[var1] == EMPTY_SLOT) + for (var1 = var0; var1 < this.keys.length; var1++) { + if (this.keys[var1] == EMPTY_SLOT) return var1; } - for(var1 = 0; var1 < var0; var1++) { - if(this.keys[var1] == EMPTY_SLOT) + for (var1 = 0; var1 < var0; var1++) { + if (this.keys[var1] == EMPTY_SLOT) return var1; } throw new RuntimeException("Overflowed :("); diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAHashMapPalette.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAHashMapPalette.java index dfc8f4186..45adf1abf 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAHashMapPalette.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAHashMapPalette.java @@ -48,17 +48,17 @@ public MCAHashMapPalette(MCAIdMapper var0, int var1, MCAPaletteResize var2 public int idFor(T var0) { int var1 = this.values.getId(var0); - if(var1 == -1) { + if (var1 == -1) { var1 = this.values.add(var0); - if(var1 >= 1 << this.bits) + if (var1 >= 1 << this.bits) var1 = this.resizeHandler.onResize(this.bits + 1, var0); } return var1; } public boolean maybeHas(Predicate var0) { - for(int var1 = 0; var1 < getSize(); var1++) { - if(var0.test(this.values.byId(var1))) + for (int var1 = 0; var1 < getSize(); var1++) { + if (var0.test(this.values.byId(var1))) return true; } return false; @@ -74,12 +74,12 @@ public int getSize() { public void read(ListTag var0) { this.values.clear(); - for(int var1 = 0; var1 < var0.size(); var1++) + for (int var1 = 0; var1 < var0.size(); var1++) this.values.add(this.reader.apply((CompoundTag) var0.get(var1))); } public void write(ListTag var0) { - for(int var1 = 0; var1 < getSize(); var1++) + for (int var1 = 0; var1 < getSize(); var1++) var0.add(this.writer.apply(this.values.byId(var1))); } } \ No newline at end of file diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAIdMapper.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAIdMapper.java index 040a17c0b..2793413d2 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAIdMapper.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAIdMapper.java @@ -51,10 +51,10 @@ public MCAIdMapper(int var0) { public void addMapping(T var0, int var1) { this.tToId.put(var0, Integer.valueOf(var1)); - while(this.idToT.size() <= var1) + while (this.idToT.size() <= var1) this.idToT.add(null); this.idToT.set(var1, var0); - if(this.nextId <= var1) + if (this.nextId <= var1) this.nextId = var1 + 1; } @@ -68,7 +68,7 @@ public int getId(T var0) { } public final T byId(int var0) { - if(var0 >= 0 && var0 < this.idToT.size()) + if (var0 >= 0 && var0 < this.idToT.size()) return this.idToT.get(var0); return null; } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCALinearPalette.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCALinearPalette.java index 9eabcce0d..7f91dfc36 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCALinearPalette.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCALinearPalette.java @@ -47,12 +47,12 @@ public MCALinearPalette(MCAIdMapper var0, int var1, MCAPaletteResize var2, public int idFor(T var0) { int var1; - for(var1 = 0; var1 < this.size; var1++) { - if(this.values[var1] == var0) + for (var1 = 0; var1 < this.size; var1++) { + if (this.values[var1] == var0) return var1; } var1 = this.size; - if(var1 < this.values.length) { + if (var1 < this.values.length) { this.values[var1] = var0; this.size++; return var1; @@ -61,15 +61,15 @@ public int idFor(T var0) { } public boolean maybeHas(Predicate var0) { - for(int var1 = 0; var1 < this.size; var1++) { - if(var0.test(this.values[var1])) + for (int var1 = 0; var1 < this.size; var1++) { + if (var0.test(this.values[var1])) return true; } return false; } public T valueFor(int var0) { - if(var0 >= 0 && var0 < this.size) + if (var0 >= 0 && var0 < this.size) return this.values[var0]; return null; } @@ -79,7 +79,7 @@ public int getSize() { } public void read(ListTag var0) { - for(int var1 = 0; var1 < var0.size(); var1++) { + for (int var1 = 0; var1 < var0.size(); var1++) { this.values[var1] = this.reader.apply((CompoundTag) var0.get(var1)); } this.size = var0.size(); diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAMth.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAMth.java index f11853070..26ea63441 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAMth.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAMth.java @@ -41,11 +41,11 @@ public class MCAMth { private static final float[] SIN; private static final Random RANDOM = new Random(); - private static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION = new int[] { - 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, - 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, - 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, - 10, 9}; + private static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION = new int[]{ + 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, + 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, + 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, + 10, 9}; private static final double ONE_SIXTH = 0.16666666666666666D; private static final int FRAC_EXP = 8; private static final int LUT_SIZE = 257; @@ -55,13 +55,13 @@ public class MCAMth { static { SIN = make(new float[65536], var0 -> { - for(int var1 = 0; var1 < var0.length; var1++) + for (int var1 = 0; var1 < var0.length; var1++) var0[var1] = (float) Math.sin(var1 * Math.PI * 2.0D / 65536.0D); }); } static { - for(int var0 = 0; var0 < 257; var0++) { + for (int var0 = 0; var0 < 257; var0++) { double var1 = var0 / 256.0D; double var3 = Math.asin(var1); COS_TAB[var0] = Math.cos(var3); @@ -132,65 +132,65 @@ public static int ceil(double var0) { } public static byte clamp(byte var0, byte var1, byte var2) { - if(var0 < var1) + if (var0 < var1) return var1; - if(var0 > var2) + if (var0 > var2) return var2; return var0; } public static int clamp(int var0, int var1, int var2) { - if(var0 < var1) + if (var0 < var1) return var1; - if(var0 > var2) + if (var0 > var2) return var2; return var0; } public static long clamp(long var0, long var2, long var4) { - if(var0 < var2) + if (var0 < var2) return var2; - if(var0 > var4) + if (var0 > var4) return var4; return var0; } public static float clamp(float var0, float var1, float var2) { - if(var0 < var1) + if (var0 < var1) return var1; - if(var0 > var2) + if (var0 > var2) return var2; return var0; } public static double clamp(double var0, double var2, double var4) { - if(var0 < var2) + if (var0 < var2) return var2; - if(var0 > var4) + if (var0 > var4) return var4; return var0; } public static double clampedLerp(double var0, double var2, double var4) { - if(var4 < 0.0D) + if (var4 < 0.0D) return var0; - if(var4 > 1.0D) + if (var4 > 1.0D) return var2; return lerp(var4, var0, var2); } public static float clampedLerp(float var0, float var1, float var2) { - if(var2 < 0.0F) + if (var2 < 0.0F) return var0; - if(var2 > 1.0F) + if (var2 > 1.0F) return var1; return lerp(var2, var0, var1); } public static double absMax(double var0, double var2) { - if(var0 < 0.0D) + if (var0 < 0.0D) var0 = -var0; - if(var2 < 0.0D) + if (var2 < 0.0D) var2 = -var2; return (var0 > var2) ? var0 : var2; } @@ -200,26 +200,26 @@ public static int intFloorDiv(int var0, int var1) { } public static int nextInt(Random var0, int var1, int var2) { - if(var1 >= var2) + if (var1 >= var2) return var1; return var0.nextInt(var2 - var1 + 1) + var1; } public static float nextFloat(Random var0, float var1, float var2) { - if(var1 >= var2) + if (var1 >= var2) return var1; return var0.nextFloat() * (var2 - var1) + var1; } public static double nextDouble(Random var0, double var1, double var3) { - if(var1 >= var3) + if (var1 >= var3) return var1; return var0.nextDouble() * (var3 - var1) + var1; } public static double average(long[] var0) { long var1 = 0L; - for(long var6 : var0) + for (long var6 : var0) var1 += var6; return var1 / var0.length; } @@ -246,27 +246,27 @@ public static double positiveModulo(double var0, double var2) { public static int wrapDegrees(int var0) { int var1 = var0 % 360; - if(var1 >= 180) + if (var1 >= 180) var1 -= 360; - if(var1 < -180) + if (var1 < -180) var1 += 360; return var1; } public static float wrapDegrees(float var0) { float var1 = var0 % 360.0F; - if(var1 >= 180.0F) + if (var1 >= 180.0F) var1 -= 360.0F; - if(var1 < -180.0F) + if (var1 < -180.0F) var1 += 360.0F; return var1; } public static double wrapDegrees(double var0) { double var2 = var0 % 360.0D; - if(var2 >= 180.0D) + if (var2 >= 180.0D) var2 -= 360.0D; - if(var2 < -180.0D) + if (var2 < -180.0D) var2 += 360.0D; return var2; } @@ -287,7 +287,7 @@ public static float rotateIfNecessary(float var0, float var1, float var2) { public static float approach(float var0, float var1, float var2) { var2 = abs(var2); - if(var0 < var1) + if (var0 < var1) return clamp(var0 + var2, var0, var1); return clamp(var0 - var2, var1, var0); } @@ -308,7 +308,7 @@ public static int getInt(String var0, int var1, int var2) { public static double getDouble(String var0, double var1) { try { return Double.parseDouble(var0); - } catch(Throwable var3) { + } catch (Throwable var3) { return var1; } } @@ -404,16 +404,16 @@ public static double inverseLerp(double var0, double var2, double var4) { public static double atan2(double var0, double var2) { double var4 = var2 * var2 + var0 * var0; - if(Double.isNaN(var4)) + if (Double.isNaN(var4)) return Double.NaN; boolean var6 = (var0 < 0.0D); - if(var6) + if (var6) var0 = -var0; boolean var7 = (var2 < 0.0D); - if(var7) + if (var7) var2 = -var2; boolean var8 = (var0 > var2); - if(var8) { + if (var8) { double d = var2; var2 = var0; var0 = d; @@ -429,11 +429,11 @@ public static double atan2(double var0, double var2) { double var20 = var0 * var16 - var2 * var18; double var22 = (6.0D + var20 * var20) * var20 * 0.16666666666666666D; double var24 = var14 + var22; - if(var8) + if (var8) var24 = 1.5707963267948966D - var24; - if(var7) + if (var7) var24 = Math.PI - var24; - if(var6) + if (var6) var24 = -var24; return var24; } @@ -472,7 +472,7 @@ public static int hsvToRgb(float var0, float var1, float var2) { float var5 = var2 * (1.0F - var1); float var6 = var2 * (1.0F - var4 * var1); float var7 = var2 * (1.0F - (1.0F - var4) * var1); - switch(var3) { + switch (var3) { case 0: var8 = var2; var9 = var7; @@ -545,20 +545,20 @@ public static long murmurHash3Mixer(long var0) { public static double[] cumulativeSum(double... var0) { float var1 = 0.0F; - for(double var5 : var0) + for (double var5 : var0) var1 = (float) (var1 + var5); int var2; - for(var2 = 0; var2 < var0.length; var2++) + for (var2 = 0; var2 < var0.length; var2++) var0[var2] = var0[var2] / var1; - for(var2 = 0; var2 < var0.length; var2++) + for (var2 = 0; var2 < var0.length; var2++) var0[var2] = ((var2 == 0) ? 0.0D : var0[var2 - 1]) + var0[var2]; return var0; } public static int getRandomForDistributionIntegral(Random var0, double[] var1) { double var2 = var0.nextDouble(); - for(int var4 = 0; var4 < var1.length; var4++) { - if(var2 < var1[var4]) + for (int var4 = 0; var4 < var1.length; var4++) { + if (var2 < var1[var4]) return var4; } return var1.length; @@ -567,10 +567,10 @@ public static int getRandomForDistributionIntegral(Random var0, double[] var1) { public static double[] binNormalDistribution(double var0, double var2, double var4, int var6, int var7) { double[] var8 = new double[var7 - var6 + 1]; int var9 = 0; - for(int var10 = var6; var10 <= var7; var10++) { + for (int var10 = var6; var10 <= var7; var10++) { var8[var9] = Math.max(0.0D, var0 * - StrictMath.exp(-(var10 - var4) * (var10 - var4) / 2.0D * var2 * var2)); + StrictMath.exp(-(var10 - var4) * (var10 - var4) / 2.0D * var2 * var2)); var9++; } return var8; @@ -579,11 +579,11 @@ public static double[] binNormalDistribution(double var0, double var2, double va public static double[] binBiModalNormalDistribution(double var0, double var2, double var4, double var6, double var8, double var10, int var12, int var13) { double[] var14 = new double[var13 - var12 + 1]; int var15 = 0; - for(int var16 = var12; var16 <= var13; var16++) { + for (int var16 = var12; var16 <= var13; var16++) { var14[var15] = Math.max(0.0D, var0 * - StrictMath.exp(-(var16 - var4) * (var16 - var4) / 2.0D * var2 * var2) + var6 * - StrictMath.exp(-(var16 - var10) * (var16 - var10) / 2.0D * var8 * var8)); + StrictMath.exp(-(var16 - var4) * (var16 - var4) / 2.0D * var2 * var2) + var6 * + StrictMath.exp(-(var16 - var10) * (var16 - var10) / 2.0D * var8 * var8)); var15++; } return var14; @@ -592,7 +592,7 @@ public static double[] binBiModalNormalDistribution(double var0, double var2, do public static double[] binLogDistribution(double var0, double var2, int var4, int var5) { double[] var6 = new double[var5 - var4 + 1]; int var7 = 0; - for(int var8 = var4; var8 <= var5; var8++) { + for (int var8 = var4; var8 <= var5; var8++) { var6[var7] = Math.max(var0 * StrictMath.log(var8) + var2, 0.0D); var7++; } @@ -610,15 +610,15 @@ public static double lerp(double var0, double var2, double var4) { public static double lerp2(double var0, double var2, double var4, double var6, double var8, double var10) { return lerp(var2, - lerp(var0, var4, var6), - lerp(var0, var8, var10)); + lerp(var0, var4, var6), + lerp(var0, var8, var10)); } public static double lerp3(double var0, double var2, double var4, double var6, double var8, double var10, double var12, double var14, double var16, double var18, double var20) { return lerp(var4, - lerp2(var0, var2, var6, var8, var10, var12), - lerp2(var0, var2, var14, var16, var18, var20)); + lerp2(var0, var2, var6, var8, var10, var12), + lerp2(var0, var2, var14, var16, var18, var20)); } public static double smoothstep(double var0) { @@ -630,7 +630,7 @@ public static double smoothstepDerivative(double var0) { } public static int sign(double var0) { - if(var0 == 0.0D) + if (var0 == 0.0D) return 0; return (var0 > 0.0D) ? 1 : -1; } @@ -646,18 +646,18 @@ public static float diffuseLight(float var0, float var1, float var2) { @Deprecated public static float rotlerp(float var0, float var1, float var2) { float var3 = var1 - var0; - while(var3 < -180.0F) + while (var3 < -180.0F) var3 += 360.0F; - while(var3 >= 180.0F) + while (var3 >= 180.0F) var3 -= 360.0F; return var0 + var2 * var3; } @Deprecated public static float rotWrap(double var0) { - while(var0 >= 180.0D) + while (var0 >= 180.0D) var0 -= 360.0D; - while(var0 < -180.0D) + while (var0 < -180.0D) var0 += 360.0D; return (float) var0; } diff --git a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAPalettedContainer.java b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAPalettedContainer.java index 0dcf18ad3..941c37447 100644 --- a/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAPalettedContainer.java +++ b/src/main/java/com/volmit/iris/util/nbt/mca/palette/MCAPalettedContainer.java @@ -61,13 +61,13 @@ private static int getIndex(int var0, int var1, int var2) { } private void setBits(int var0) { - if(var0 == this.bits) + if (var0 == this.bits) return; this.bits = var0; - if(this.bits <= 4) { + if (this.bits <= 4) { this.bits = 4; this.palette = new MCALinearPalette<>(this.registry, this.bits, this, this.reader); - } else if(this.bits < 9) { + } else if (this.bits < 9) { this.palette = new MCAHashMapPalette<>(this.registry, this.bits, this, this.reader, this.writer); } else { this.palette = this.globalPalette; @@ -81,9 +81,9 @@ public int onResize(int var0, T var1) { MCABitStorage var2 = this.storage; MCAPalette var3 = this.palette; setBits(var0); - for(int var4 = 0; var4 < var2.getSize(); var4++) { + for (int var4 = 0; var4 < var2.getSize(); var4++) { T var5 = var3.valueFor(var2.get(var4)); - if(var5 != null) + if (var5 != null) set(var4, var5); } return this.palette.idFor(var1); @@ -124,21 +124,21 @@ protected T get(int var0) { public void read(ListTag var0, long[] var1) { int var2 = Math.max(4, MCAMth.ceillog2(var0.size())); - if(var2 != this.bits) + if (var2 != this.bits) setBits(var2); this.palette.read(var0); int var3 = var1.length * 64 / 4096; - if(this.palette == this.globalPalette) { + if (this.palette == this.globalPalette) { MCAPalette var4 = new MCAHashMapPalette<>(this.registry, var2, this.dummyPaletteResize, this.reader, this.writer); var4.read(var0); MCABitStorage var5 = new MCABitStorage(var2, 4096, var1); - for(int var6 = 0; var6 < 4096; var6++) + for (int var6 = 0; var6 < 4096; var6++) this.storage.set(var6, this.globalPalette.idFor(var4.valueFor(var5.get(var6)))); - } else if(var3 == this.bits) { + } else if (var3 == this.bits) { System.arraycopy(var1, 0, this.storage.getRaw(), 0, var1.length); } else { MCABitStorage var4 = new MCABitStorage(var3, 4096, var1); - for(int var5 = 0; var5 < 4096; var5++) + for (int var5 = 0; var5 < 4096; var5++) this.storage.set(var5, var4.get(var5)); } } @@ -148,9 +148,9 @@ public void write(CompoundTag var0, String var1, String var2) { T var4 = this.defaultValue; int var5 = var3.idFor(this.defaultValue); int[] var6 = new int[4096]; - for(int i = 0; i < 4096; i++) { + for (int i = 0; i < 4096; i++) { T t = get(i); - if(t != var4) { + if (t != var4) { var4 = t; var5 = var3.idFor(t); } @@ -161,7 +161,7 @@ public void write(CompoundTag var0, String var1, String var2) { var0.put(var1, paletteList); int var8 = Math.max(4, MCAMth.ceillog2(paletteList.size())); MCABitStorage var9 = new MCABitStorage(var8, 4096); - for(int var10 = 0; var10 < var6.length; var10++) { + for (int var10 = 0; var10 < var6.length; var10++) { var9.set(var10, var6[var10]); } var0.putLongArray(var2, var9.getRaw()); diff --git a/src/main/java/com/volmit/iris/util/nbt/tag/ArrayTag.java b/src/main/java/com/volmit/iris/util/nbt/tag/ArrayTag.java index 721ea1083..9ec1bddc6 100644 --- a/src/main/java/com/volmit/iris/util/nbt/tag/ArrayTag.java +++ b/src/main/java/com/volmit/iris/util/nbt/tag/ArrayTag.java @@ -24,14 +24,13 @@ * ArrayTag is an abstract representation of any NBT array tag. * For implementations see {@link ByteArrayTag}, {@link IntArrayTag}, {@link LongArrayTag}. * - * @param - * The array type. + * @param The array type. */ public abstract class ArrayTag extends Tag { public ArrayTag(T value) { super(value); - if(!value.getClass().isArray()) { + if (!value.getClass().isArray()) { throw new UnsupportedOperationException("type of array tag must be an array"); } } @@ -57,7 +56,7 @@ public String valueToString(int maxDepth) { protected String arrayToString(@SuppressWarnings("SameParameterValue") String prefix, @SuppressWarnings("SameParameterValue") String suffix) { StringBuilder sb = new StringBuilder("[").append(prefix).append("".equals(prefix) ? "" : ";"); - for(int i = 0; i < length(); i++) { + for (int i = 0; i < length(); i++) { sb.append(i == 0 ? "" : ",").append(Array.get(getValue(), i)).append(suffix); } sb.append("]"); diff --git a/src/main/java/com/volmit/iris/util/nbt/tag/CompoundTag.java b/src/main/java/com/volmit/iris/util/nbt/tag/CompoundTag.java index 9262dc793..dab272071 100644 --- a/src/main/java/com/volmit/iris/util/nbt/tag/CompoundTag.java +++ b/src/main/java/com/volmit/iris/util/nbt/tag/CompoundTag.java @@ -85,7 +85,7 @@ public void forEach(BiConsumer> action) { public > C get(String key, Class type) { Tag t = getValue().get(key); - if(t != null) { + if (t != null) { return type.cast(t); } return null; @@ -250,10 +250,10 @@ public Tag putLongArray(String key, long[] value) { public String valueToString(int maxDepth) { StringBuilder sb = new StringBuilder("{"); boolean first = true; - for(Map.Entry> e : getValue().entrySet()) { + for (Map.Entry> e : getValue().entrySet()) { sb.append(first ? "" : ",") - .append(escapeString(e.getKey(), false)).append(":") - .append(e.getValue().toString(decrementMaxDepth(maxDepth))); + .append(escapeString(e.getKey(), false)).append(":") + .append(e.getValue().toString(decrementMaxDepth(maxDepth))); first = false; } sb.append("}"); @@ -262,15 +262,15 @@ public String valueToString(int maxDepth) { @Override public boolean equals(Object other) { - if(this == other) { + if (this == other) { return true; } - if(!super.equals(other) || size() != ((CompoundTag) other).size()) { + if (!super.equals(other) || size() != ((CompoundTag) other).size()) { return false; } - for(Map.Entry> e : getValue().entrySet()) { + for (Map.Entry> e : getValue().entrySet()) { Tag v; - if((v = ((CompoundTag) other).get(e.getKey())) == null || !e.getValue().equals(v)) { + if ((v = ((CompoundTag) other).get(e.getKey())) == null || !e.getValue().equals(v)) { return false; } } @@ -285,7 +285,7 @@ public int compareTo(CompoundTag o) { @Override public CompoundTag clone() { CompoundTag copy = new CompoundTag(); - for(Map.Entry> e : getValue().entrySet()) { + for (Map.Entry> e : getValue().entrySet()) { copy.put(e.getKey(), e.getValue().clone()); } return copy; diff --git a/src/main/java/com/volmit/iris/util/nbt/tag/ListTag.java b/src/main/java/com/volmit/iris/util/nbt/tag/ListTag.java index fcb42fa75..d096a6f52 100644 --- a/src/main/java/com/volmit/iris/util/nbt/tag/ListTag.java +++ b/src/main/java/com/volmit/iris/util/nbt/tag/ListTag.java @@ -44,16 +44,13 @@ private ListTag() { } /** - * @param typeClass - * The exact class of the elements - * @throws IllegalArgumentException - * When {@code typeClass} is {@link EndTag}{@code .class} - * @throws NullPointerException - * When {@code typeClass} is {@code null} + * @param typeClass The exact class of the elements + * @throws IllegalArgumentException When {@code typeClass} is {@link EndTag}{@code .class} + * @throws NullPointerException When {@code typeClass} is {@code null} */ public ListTag(Class typeClass) throws IllegalArgumentException, NullPointerException { super(createEmptyValue(3)); - if(typeClass == EndTag.class) { + if (typeClass == EndTag.class) { throw new IllegalArgumentException("cannot create ListTag with EndTag elements"); } this.typeClass = Objects.requireNonNull(typeClass); @@ -77,10 +74,8 @@ public static ListTag createUnchecked(Class typeClass) { /** *

Creates an empty mutable list to be used as empty value of ListTags.

* - * @param - * Type of the list elements - * @param initialCapacity - * The initial capacity of the returned List + * @param Type of the list elements + * @param initialCapacity The initial capacity of the returned List * @return An instance of {@link List} with an initial capacity of 3 */ private static List createEmptyValue(@SuppressWarnings("SameParameterValue") int initialCapacity) { @@ -142,8 +137,7 @@ public T set(int index, T t) { /** * Adds a Tag to this ListTag after the last index. * - * @param t - * The element to be added. + * @param t The element to be added. */ public void add(T t) { add(size(), t); @@ -151,26 +145,26 @@ public void add(T t) { public void add(int index, T t) { Objects.requireNonNull(t); - if(typeClass == null || typeClass == EndTag.class) { + if (typeClass == null || typeClass == EndTag.class) { typeClass = t.getClass(); - } else if(typeClass != t.getClass()) { + } else if (typeClass != t.getClass()) { throw new ClassCastException( - String.format("cannot add %s to ListTag<%s>", - t.getClass().getSimpleName(), - typeClass.getSimpleName())); + String.format("cannot add %s to ListTag<%s>", + t.getClass().getSimpleName(), + typeClass.getSimpleName())); } getValue().add(index, t); } public void addAll(Collection t) { - for(T tt : t) { + for (T tt : t) { add(tt); } } public void addAll(int index, Collection t) { int i = 0; - for(T tt : t) { + for (T tt : t) { add(index + i, tt); i++; } @@ -289,7 +283,7 @@ public ListTag asCompoundTagList() { @Override public String valueToString(int maxDepth) { StringBuilder sb = new StringBuilder("{\"type\":\"").append(getTypeClass().getSimpleName()).append("\",\"list\":["); - for(int i = 0; i < size(); i++) { + for (int i = 0; i < size(); i++) { sb.append(i > 0 ? "," : "").append(get(i).valueToString(decrementMaxDepth(maxDepth))); } sb.append("]}"); @@ -298,14 +292,14 @@ public String valueToString(int maxDepth) { @Override public boolean equals(Object other) { - if(this == other) { + if (this == other) { return true; } - if(!super.equals(other) || size() != ((ListTag) other).size() || getTypeClass() != ((ListTag) other).getTypeClass()) { + if (!super.equals(other) || size() != ((ListTag) other).size() || getTypeClass() != ((ListTag) other).getTypeClass()) { return false; } - for(int i = 0; i < size(); i++) { - if(!get(i).equals(((ListTag) other).get(i))) { + for (int i = 0; i < size(); i++) { + if (!get(i).equals(((ListTag) other).get(i))) { return false; } } @@ -328,7 +322,7 @@ public ListTag clone() { ListTag copy = new ListTag<>(); // assure type safety for clone copy.typeClass = typeClass; - for(T t : getValue()) { + for (T t : getValue()) { copy.add((T) t.clone()); } return copy; @@ -337,19 +331,19 @@ public ListTag clone() { //TODO: make private @SuppressWarnings("unchecked") public void addUnchecked(Tag tag) { - if(typeClass != null && typeClass != tag.getClass() && typeClass != EndTag.class) { + if (typeClass != null && typeClass != tag.getClass() && typeClass != EndTag.class) { throw new IllegalArgumentException(String.format( - "cannot add %s to ListTag<%s>", - tag.getClass().getSimpleName(), typeClass.getSimpleName())); + "cannot add %s to ListTag<%s>", + tag.getClass().getSimpleName(), typeClass.getSimpleName())); } add(size(), (T) tag); } private void checkTypeClass(Class clazz) { - if(typeClass != null && typeClass != EndTag.class && typeClass != clazz) { + if (typeClass != null && typeClass != EndTag.class && typeClass != clazz) { throw new ClassCastException(String.format( - "cannot cast ListTag<%s> to ListTag<%s>", - typeClass.getSimpleName(), clazz.getSimpleName())); + "cannot cast ListTag<%s> to ListTag<%s>", + typeClass.getSimpleName(), clazz.getSimpleName())); } } } diff --git a/src/main/java/com/volmit/iris/util/nbt/tag/NonNullEntrySet.java b/src/main/java/com/volmit/iris/util/nbt/tag/NonNullEntrySet.java index 5640a53ff..3053f757b 100644 --- a/src/main/java/com/volmit/iris/util/nbt/tag/NonNullEntrySet.java +++ b/src/main/java/com/volmit/iris/util/nbt/tag/NonNullEntrySet.java @@ -140,7 +140,7 @@ public V getValue() { @Override public V setValue(V value) { - if(value == null) { + if (value == null) { throw new NullPointerException(getClass().getSimpleName() + " does not allow setting null"); } return entry.setValue(value); diff --git a/src/main/java/com/volmit/iris/util/nbt/tag/Tag.java b/src/main/java/com/volmit/iris/util/nbt/tag/Tag.java index a4e592797..5c9cf6c56 100644 --- a/src/main/java/com/volmit/iris/util/nbt/tag/Tag.java +++ b/src/main/java/com/volmit/iris/util/nbt/tag/Tag.java @@ -49,8 +49,7 @@ * is no guarantee that {@code MaxDepthReachedException}s are thrown for them. The respective class * will document this behavior accordingly.

* - * @param - * The type of the contained value + * @param The type of the contained value */ public abstract class Tag implements Cloneable { @@ -80,8 +79,7 @@ public abstract class Tag implements Cloneable { * Initializes this Tag with some value. If the value is {@code null}, it will * throw a {@code NullPointerException} * - * @param value - * The value to be set for this Tag. + * @param value The value to be set for this Tag. */ public Tag(T value) { setValue(value); @@ -91,23 +89,21 @@ public Tag(T value) { * Escapes a string to fit into a JSON-like string representation for Minecraft * or to create the JSON string representation of a Tag returned from {@link Tag#toString()} * - * @param s - * The string to be escaped. - * @param lenient - * {@code true} if it should force double quotes ({@code "}) at the start and - * the end of the string. + * @param s The string to be escaped. + * @param lenient {@code true} if it should force double quotes ({@code "}) at the start and + * the end of the string. * @return The escaped string. */ @SuppressWarnings("StringBufferMayBeStringBuilder") protected static String escapeString(String s, @SuppressWarnings("SameParameterValue") boolean lenient) { StringBuffer sb = new StringBuffer(); Matcher m = ESCAPE_PATTERN.matcher(s); - while(m.find()) { + while (m.find()) { m.appendReplacement(sb, ESCAPE_CHARACTERS.get(m.group())); } m.appendTail(sb); m = NON_QUOTE_PATTERN.matcher(s); - if(!lenient || !m.matches()) { + if (!lenient || !m.matches()) { sb.insert(0, "\"").append("\""); } return sb.toString(); @@ -128,10 +124,8 @@ public T getValue() { /** * Sets the value for this Tag directly. * - * @param value - * The value to be set. - * @throws NullPointerException - * If the value is null + * @param value The value to be set. + * @throws NullPointerException If the value is null */ protected void setValue(T value) { this.value = checkValue(value); @@ -140,11 +134,9 @@ protected void setValue(T value) { /** * Checks if the value {@code value} is {@code null}. * - * @param value - * The value to check + * @param value The value to check * @return The parameter {@code value} - * @throws NullPointerException - * If {@code value} was {@code null} + * @throws NullPointerException If {@code value} was {@code null} */ protected T checkValue(T value) { return Objects.requireNonNull(value); @@ -153,8 +145,7 @@ protected T checkValue(T value) { /** * Calls {@link Tag#toString(int)} with an initial depth of {@code 0}. * - * @throws MaxDepthReachedException - * If the maximum nesting depth is exceeded. + * @throws MaxDepthReachedException If the maximum nesting depth is exceeded. * @see Tag#toString(int) */ @Override @@ -165,23 +156,20 @@ public final String toString() { /** * Creates a string representation of this Tag in a valid JSON format. * - * @param maxDepth - * The maximum nesting depth. + * @param maxDepth The maximum nesting depth. * @return The string representation of this Tag. - * @throws MaxDepthReachedException - * If the maximum nesting depth is exceeded. + * @throws MaxDepthReachedException If the maximum nesting depth is exceeded. */ public String toString(int maxDepth) { return "{\"type\":\"" + getClass().getSimpleName() + "\"," + - "\"value\":" + valueToString(maxDepth) + "}"; + "\"value\":" + valueToString(maxDepth) + "}"; } /** * Calls {@link Tag#valueToString(int)} with {@link Tag#DEFAULT_MAX_DEPTH}. * * @return The string representation of the value of this Tag. - * @throws MaxDepthReachedException - * If the maximum nesting depth is exceeded. + * @throws MaxDepthReachedException If the maximum nesting depth is exceeded. */ public String valueToString() { return valueToString(DEFAULT_MAX_DEPTH); @@ -190,11 +178,9 @@ public String valueToString() { /** * Returns a JSON representation of the value of this Tag. * - * @param maxDepth - * The maximum nesting depth. + * @param maxDepth The maximum nesting depth. * @return The string representation of the value of this Tag. - * @throws MaxDepthReachedException - * If the maximum nesting depth is exceeded. + * @throws MaxDepthReachedException If the maximum nesting depth is exceeded. */ public abstract String valueToString(int maxDepth); @@ -204,8 +190,7 @@ public String valueToString() { * Custom Tag implementations should overwrite this but check the result * of this {@code super}-method while comparing. * - * @param other - * The Tag to compare to. + * @param other The Tag to compare to. * @return {@code true} if they are equal based on the conditions mentioned above. */ @Override diff --git a/src/main/java/com/volmit/iris/util/network/DL.java b/src/main/java/com/volmit/iris/util/network/DL.java index 6320f9ea3..5eccf5a7d 100644 --- a/src/main/java/com/volmit/iris/util/network/DL.java +++ b/src/main/java/com/volmit/iris/util/network/DL.java @@ -69,7 +69,7 @@ public void monitor(DownloadMonitor m) { } public void update() { - if(m != null) { + if (m != null) { m.onUpdate(state, getProgress(), getElapsed(), getTimeLeft(), bps, getDiskBytesPerSecond(), size, downloaded, bufferSize, getBufferUse()); } } @@ -92,13 +92,13 @@ public int getBufferSize() { } public void start() throws IOException { - if(!isState(DownloadState.NEW)) { + if (!isState(DownloadState.NEW)) { throw new DownloadException("Cannot start download while " + state.toString()); } state(DownloadState.STARTING); - if(hasFlag(DownloadFlag.CALCULATE_SIZE)) { + if (hasFlag(DownloadFlag.CALCULATE_SIZE)) { size = calculateSize(); } @@ -118,14 +118,14 @@ public void start() throws IOException { protected abstract void closeStream() throws IOException; public void downloadChunk() throws IOException { - if(!isState(DownloadState.DOWNLOADING)) { + if (!isState(DownloadState.DOWNLOADING)) { throw new DownloadException("Cannot download while " + state.toString()); } long d = download(); lastPull = d; - if(d < 0) { + if (d < 0) { finishDownload(); return; } @@ -136,7 +136,7 @@ public void downloadChunk() throws IOException { double chunkTime = (double) (System.currentTimeMillis() - lastChunk) / 1000D; bps = (long) ((double) currentChunk / chunkTime); - if(latch.flip()) { + if (latch.flip()) { update(); } } @@ -146,7 +146,7 @@ public double getBufferUse() { } private void finishDownload() throws IOException { - if(!isState(DownloadState.NEW)) { + if (!isState(DownloadState.NEW)) { throw new DownloadException("Cannot finish download while " + state.toString()); } @@ -168,7 +168,7 @@ public long getTimeLeft() { } public long getDiskBytesPerSecond() { - if(o == null) { + if (o == null) { return -1; } @@ -218,10 +218,10 @@ public ThrottledDownload(URL u, File d, long mbps, DownloadFlag... downloadFlags @Override protected long download() throws IOException { - if(getBytesPerSecond() > mbps) { + if (getBytesPerSecond() > mbps) { try { Thread.sleep(40); - } catch(InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/network/MeteredInputStream.java b/src/main/java/com/volmit/iris/util/network/MeteredInputStream.java index 4e3bf03f6..a7d37ddf3 100644 --- a/src/main/java/com/volmit/iris/util/network/MeteredInputStream.java +++ b/src/main/java/com/volmit/iris/util/network/MeteredInputStream.java @@ -50,7 +50,7 @@ public int read() throws IOException { written++; totalWritten++; - if(auto && System.currentTimeMillis() - getSince() > interval) { + if (auto && System.currentTimeMillis() - getSince() > interval) { pollRead(); } diff --git a/src/main/java/com/volmit/iris/util/network/MeteredOutputStream.java b/src/main/java/com/volmit/iris/util/network/MeteredOutputStream.java index e3c2e1bbd..105f4f56e 100644 --- a/src/main/java/com/volmit/iris/util/network/MeteredOutputStream.java +++ b/src/main/java/com/volmit/iris/util/network/MeteredOutputStream.java @@ -51,7 +51,7 @@ public void write(int b) throws IOException { written++; totalWritten++; - if(auto && System.currentTimeMillis() - getSince() > interval) { + if (auto && System.currentTimeMillis() - getSince() > interval) { pollWritten(); } } diff --git a/src/main/java/com/volmit/iris/util/noise/CNG.java b/src/main/java/com/volmit/iris/util/noise/CNG.java index 96b84d90e..a17fee3f0 100644 --- a/src/main/java/com/volmit/iris/util/noise/CNG.java +++ b/src/main/java/com/volmit/iris/util/noise/CNG.java @@ -41,16 +41,16 @@ @Data public class CNG { - public static final NoiseInjector ADD = (s, v) -> new double[] {s + v, 1}; - public static final NoiseInjector SRC_SUBTRACT = (s, v) -> new double[] {s - v < 0 ? 0 : s - v, -1}; - public static final NoiseInjector DST_SUBTRACT = (s, v) -> new double[] {v - s < 0 ? 0 : s - v, -1}; - public static final NoiseInjector MULTIPLY = (s, v) -> new double[] {s * v, 0}; - public static final NoiseInjector MAX = (s, v) -> new double[] {Math.max(s, v), 0}; - public static final NoiseInjector MIN = (s, v) -> new double[] {Math.min(s, v), 0}; - public static final NoiseInjector SRC_MOD = (s, v) -> new double[] {s % v, 0}; - public static final NoiseInjector SRC_POW = (s, v) -> new double[] {Math.pow(s, v), 0}; - public static final NoiseInjector DST_MOD = (s, v) -> new double[] {v % s, 0}; - public static final NoiseInjector DST_POW = (s, v) -> new double[] {Math.pow(v, s), 0}; + public static final NoiseInjector ADD = (s, v) -> new double[]{s + v, 1}; + public static final NoiseInjector SRC_SUBTRACT = (s, v) -> new double[]{s - v < 0 ? 0 : s - v, -1}; + public static final NoiseInjector DST_SUBTRACT = (s, v) -> new double[]{v - s < 0 ? 0 : s - v, -1}; + public static final NoiseInjector MULTIPLY = (s, v) -> new double[]{s * v, 0}; + public static final NoiseInjector MAX = (s, v) -> new double[]{Math.max(s, v), 0}; + public static final NoiseInjector MIN = (s, v) -> new double[]{Math.min(s, v), 0}; + public static final NoiseInjector SRC_MOD = (s, v) -> new double[]{s % v, 0}; + public static final NoiseInjector SRC_POW = (s, v) -> new double[]{Math.pow(s, v), 0}; + public static final NoiseInjector DST_MOD = (s, v) -> new double[]{v % s, 0}; + public static final NoiseInjector DST_POW = (s, v) -> new double[]{Math.pow(v, s), 0}; public static long hits = 0; public static long creates = 0; private final double opacity; @@ -107,90 +107,11 @@ public CNG(RNG random, NoiseGenerator generator, double opacity, int octaves) { this.opacity = opacity; this.injector = ADD; - if(generator instanceof OctaveNoise) { + if (generator instanceof OctaveNoise) { ((OctaveNoise) generator).setOctaves(octaves); } } - public CNG cellularize(RNG seed, double freq) { - FastNoise cellularFilter = new FastNoise(seed.imax()); - cellularFilter.SetNoiseType(FastNoise.NoiseType.Cellular); - cellularFilter.SetCellularReturnType(FastNoise.CellularReturnType.CellValue); - cellularFilter.SetCellularDistanceFunction(FastNoise.CellularDistanceFunction.Manhattan); - cellularFilter.SetFrequency((float) freq * 0.01f); - - ProceduralStream str = stream(); - - return new CNG(seed, new NoiseGenerator() { - @Override - public double noise(double x) { - return noise(x, 0); - } - - @Override - public double noise(double x, double z) { - return (cellularFilter.GetCellular((float) x, (float) z, str, 1) * 0.5) + 0.5D; - } - - @Override - public double noise(double x, double y, double z) { - return noise(x, y + z); - } - }, 1D, 1); - } - - public CNG cached(int size, String key, File cacheFolder) - { - if(size <= 0) - { - return this; - } - - cache = null; - - File f = new File(new File(cacheFolder, ".cache"), key + ".cnm"); - FloatCache fbc; - boolean cached = false; - if(f.exists()) - { - try { - fbc = new FloatCache(f); - cached = true; - } catch(IOException e) { - fbc = new FloatCache(size, size); - } - } - - else { - fbc = new FloatCache(size, size); - } - - if(!cached) - { - for(int i = 0; i < size; i++) - { - for(int j = 0; j < size; j++) - { - fbc.set(i, j, (float) noise(i, j)); - } - } - - try { - f.getParentFile().mkdirs(); - FileOutputStream fos = new FileOutputStream(f); - DataOutputStream dos = new DataOutputStream(fos); - fbc.writeCache(dos); - dos.close(); - Iris.info("Saved Noise Cache " + f.getName()); - } catch(IOException e) { - throw new RuntimeException(e); - } - } - - cache = fbc; - return this; - } - public static CNG signature(RNG rng) { return signature(rng, NoiseType.SIMPLEX); } @@ -213,7 +134,7 @@ public static CNG signatureDouble(RNG rng, NoiseType t) { public static CNG signatureDoubleFast(RNG rng, NoiseType t, NoiseType f) { return signatureThickFast(rng, t, f) - .fractureWith(signatureFast(rng.nextParallelRNG(4956), t, f), 93); + .fractureWith(signatureFast(rng.nextParallelRNG(4956), t, f), 93); } public static CNG signature(RNG rng, NoiseType t) { @@ -229,20 +150,20 @@ public static CNG signaturePerlin(RNG rng) { public static CNG signaturePerlin(RNG rng, NoiseType t) { // @NoArgsConstructor return new CNG(rng.nextParallelRNG(124996), t, 1D, 1) - .fractureWith(new CNG(rng.nextParallelRNG(18), NoiseType.PERLIN, 1, 1).scale(1.25), 250) - .bake(); + .fractureWith(new CNG(rng.nextParallelRNG(18), NoiseType.PERLIN, 1, 1).scale(1.25), 250) + .bake(); // @done } public static CNG signatureFast(RNG rng, NoiseType t, NoiseType f) { // @NoArgsConstructor return new CNG(rng.nextParallelRNG(17), t, 1D, 1) - .fractureWith(new CNG(rng.nextParallelRNG(18), f, 1, 1) - .scale(0.9) - .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1) - .scale(0.21) - .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1).scale(0.9), 620), 145), 44) - .bake(); + .fractureWith(new CNG(rng.nextParallelRNG(18), f, 1, 1) + .scale(0.9) + .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1) + .scale(0.21) + .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1).scale(0.9), 620), 145), 44) + .bake(); // @done } @@ -255,10 +176,10 @@ public static CNG signatureThick(RNG rng, NoiseType t) { public static CNG signatureThickFast(RNG rng, NoiseType t, NoiseType f) { // @NoArgsConstructor return new CNG(rng.nextParallelRNG(133), t, 1D, 1) - .fractureWith(new CNG(rng.nextParallelRNG(18), f, 1, 1) - .scale(0.5).fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1) - .scale(0.11).fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1) - .scale(0.4), 620), 145), 44).bake(); + .fractureWith(new CNG(rng.nextParallelRNG(18), f, 1, 1) + .scale(0.5).fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1) + .scale(0.11).fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1) + .scale(0.4), 620), 145), 44).bake(); // @done } @@ -271,12 +192,95 @@ public static CNG signatureHalf(RNG rng, NoiseType t) { public static CNG signatureHalfFast(RNG rng, NoiseType t, NoiseType f) { // @NoArgsConstructor return new CNG(rng.nextParallelRNG(127), t, 1D, 1) - .fractureWith(new CNG(rng.nextParallelRNG(18), f, 1, 1).scale(0.9) - .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1).scale(0.21) - .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1).scale(0.9), 420), 99), 22).bake(); + .fractureWith(new CNG(rng.nextParallelRNG(18), f, 1, 1).scale(0.9) + .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1).scale(0.21) + .fractureWith(new CNG(rng.nextParallelRNG(20), f, 1, 1).scale(0.9), 420), 99), 22).bake(); // @done } + public static void main(String[] a) { + CNG cng = NoiseStyle.SIMPLEX.create(new RNG(1234)); + PrecisionStopwatch p = PrecisionStopwatch.start(); + double r = 0; + + for (int i = 0; i < 30000000 * 10; i++) { + r += cng.fit(-1000, 1000, i, i); + } + + System.out.println(Form.duration(p.getMilliseconds(), 10) + " merged = " + r); + } + + public CNG cellularize(RNG seed, double freq) { + FastNoise cellularFilter = new FastNoise(seed.imax()); + cellularFilter.SetNoiseType(FastNoise.NoiseType.Cellular); + cellularFilter.SetCellularReturnType(FastNoise.CellularReturnType.CellValue); + cellularFilter.SetCellularDistanceFunction(FastNoise.CellularDistanceFunction.Manhattan); + cellularFilter.SetFrequency((float) freq * 0.01f); + + ProceduralStream str = stream(); + + return new CNG(seed, new NoiseGenerator() { + @Override + public double noise(double x) { + return noise(x, 0); + } + + @Override + public double noise(double x, double z) { + return (cellularFilter.GetCellular((float) x, (float) z, str, 1) * 0.5) + 0.5D; + } + + @Override + public double noise(double x, double y, double z) { + return noise(x, y + z); + } + }, 1D, 1); + } + + public CNG cached(int size, String key, File cacheFolder) { + if (size <= 0) { + return this; + } + + cache = null; + + File f = new File(new File(cacheFolder, ".cache"), key + ".cnm"); + FloatCache fbc; + boolean cached = false; + if (f.exists()) { + try { + fbc = new FloatCache(f); + cached = true; + } catch (IOException e) { + fbc = new FloatCache(size, size); + } + } else { + fbc = new FloatCache(size, size); + } + + if (!cached) { + for (int i = 0; i < size; i++) { + for (int j = 0; j < size; j++) { + fbc.set(i, j, (float) noise(i, j)); + } + } + + try { + f.getParentFile().mkdirs(); + FileOutputStream fos = new FileOutputStream(f); + DataOutputStream dos = new DataOutputStream(fos); + fbc.writeCache(dos); + dos.close(); + Iris.info("Saved Noise Cache " + f.getName()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + cache = fbc; + return this; + } + public NoiseGenerator getGen() { return generator; } @@ -296,7 +300,7 @@ public CNG bake() { } public CNG child(CNG c) { - if(children == null) { + if (children == null) { children = new KList<>(); } @@ -340,29 +344,29 @@ public CNG injectWith(NoiseInjector i) { } public T fitRarity(KList b, double... dim) { - if(b.size() == 0) { + if (b.size() == 0) { return null; } - if(b.size() == 1) { + if (b.size() == 1) { return b.get(0); } KList rarityMapped = new KList<>(); boolean o = false; int max = 1; - for(T i : b) { - if(i.getRarity() > max) { + for (T i : b) { + if (i.getRarity() > max) { max = i.getRarity(); } } max++; - for(T i : b) { - for(int j = 0; j < max - i.getRarity(); j++) { + for (T i : b) { + for (int j = 0; j < max - i.getRarity(); j++) { //noinspection AssignmentUsedAsCondition - if(o = !o) { + if (o = !o) { rarityMapped.add(i); } else { rarityMapped.add(0, i); @@ -370,11 +374,11 @@ public T fitRarity(KList b, double... dim) { } } - if(rarityMapped.size() == 1) { + if (rarityMapped.size() == 1) { return rarityMapped.get(0); } - if(rarityMapped.isEmpty()) { + if (rarityMapped.isEmpty()) { throw new RuntimeException("BAD RARITY MAP! RELATED TO: " + b.toString(", or possibly ")); } @@ -382,11 +386,11 @@ public T fitRarity(KList b, double... dim) { } public T fit(T[] v, double... dim) { - if(v.length == 0) { + if (v.length == 0) { return null; } - if(v.length == 1) { + if (v.length == 1) { return v[0]; } @@ -394,17 +398,17 @@ public T fit(T[] v, double... dim) { } public T fit(List v, double... dim) { - if(v.size() == 0) { + if (v.size() == 0) { return null; } - if(v.size() == 1) { + if (v.size() == 1) { return v.get(0); } try { return v.get(fit(0, v.size() - 1, dim)); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -412,7 +416,7 @@ public T fit(List v, double... dim) { } public int fit(int min, int max, double... dim) { - if(min == max) { + if (min == max) { return min; } @@ -422,7 +426,7 @@ public int fit(int min, int max, double... dim) { } public int fit(double min, double max, double... dim) { - if(min == max) { + if (min == max) { return (int) Math.round(min); } @@ -432,7 +436,7 @@ public int fit(double min, double max, double... dim) { } public double fitDouble(double min, double max, double... dim) { - if(min == max) { + if (min == max) { return min; } @@ -444,14 +448,14 @@ public double fitDouble(double min, double max, double... dim) { private double getNoise(double... dim) { double scale = noscale ? 1 : this.bakedScale * this.scale; - if(fracture == null || noscale) { + if (fracture == null || noscale) { return generator.noise( - (dim.length > 0 ? dim[0] : 0D) * scale, - (dim.length > 1 ? dim[1] : 0D) * scale, - (dim.length > 2 ? dim[2] : 0D) * scale) * opacity; + (dim.length > 0 ? dim[0] : 0D) * scale, + (dim.length > 1 ? dim[1] : 0D) * scale, + (dim.length > 2 ? dim[2] : 0D) * scale) * opacity; } - if(fracture.isTrueFracturing()) { + if (fracture.isTrueFracturing()) { double x = dim.length > 0 ? dim[0] + ((fracture.noise(dim) - 0.5) * fscale) : 0D; double y = dim.length > 1 ? dim[1] + ((fracture.noise(dim[1], dim[0]) - 0.5) * fscale) : 0D; double z = dim.length > 2 ? dim[2] + ((fracture.noise(dim[2], dim[0], dim[1]) - 0.5) * fscale) : 0D; @@ -466,11 +470,11 @@ private double getNoise(double... dim) { } public double invertNoise(double... dim) { - if(dim.length == 1) { + if (dim.length == 1) { return noise(-dim[0]); - } else if(dim.length == 2) { + } else if (dim.length == 2) { return noise(dim[1], dim[0]); - } else if(dim.length == 3) { + } else if (dim.length == 3) { return noise(dim[1], dim[2], dim[0]); } @@ -482,20 +486,19 @@ public double noiseSym(double... dim) { } public double noise(double... dim) { - if(cache != null && dim.length == 2) - { - return cache.get((int)dim[0], (int)dim[1]); + if (cache != null && dim.length == 2) { + return cache.get((int) dim[0], (int) dim[1]); } double n = getNoise(dim); n = power != 1D ? (n < 0 ? -Math.pow(Math.abs(n), power) : Math.pow(n, power)) : n; double m = 1; hits += oct; - if(children == null) { + if (children == null) { return (n - down + up) * patch; } - for(CNG i : children) { + for (CNG i : children) { double[] r = injector.combine(n, i.noise(dim)); n = r[0]; m += r[1]; @@ -521,18 +524,4 @@ public double getScale() { public boolean isStatic() { return generator != null && generator.isStatic(); } - - public static void main(String[] a) - { - CNG cng = NoiseStyle.SIMPLEX.create(new RNG(1234)); - PrecisionStopwatch p = PrecisionStopwatch.start(); - double r = 0; - - for(int i = 0; i < 30000000 * 10; i++) - { - r += cng.fit(-1000, 1000, i, i); - } - - System.out.println(Form.duration(p.getMilliseconds(), 10) + " merged = " + r); - } } diff --git a/src/main/java/com/volmit/iris/util/noise/CachedNoise.java b/src/main/java/com/volmit/iris/util/noise/CachedNoise.java index 3033ee2d5..44ca3c1ef 100644 --- a/src/main/java/com/volmit/iris/util/noise/CachedNoise.java +++ b/src/main/java/com/volmit/iris/util/noise/CachedNoise.java @@ -22,21 +22,21 @@ public class CachedNoise implements NoiseGenerator { private final CachedNoiseMap n; public CachedNoise(NoiseGenerator generator, int size) { - n = new CachedNoiseMap(size, generator); + n = new CachedNoiseMap(size, generator); } @Override public double noise(double x) { - return n.get((int)Math.round(x), 0); + return n.get((int) Math.round(x), 0); } @Override public double noise(double x, double z) { - return n.get((int)Math.round(x),(int)Math.round(z)); + return n.get((int) Math.round(x), (int) Math.round(z)); } @Override public double noise(double x, double y, double z) { - return n.get((int)Math.round(x),(int)Math.round(z)); + return n.get((int) Math.round(x), (int) Math.round(z)); } } diff --git a/src/main/java/com/volmit/iris/util/noise/CachedNoiseMap.java b/src/main/java/com/volmit/iris/util/noise/CachedNoiseMap.java index c8f919a5f..2fae085b3 100644 --- a/src/main/java/com/volmit/iris/util/noise/CachedNoiseMap.java +++ b/src/main/java/com/volmit/iris/util/noise/CachedNoiseMap.java @@ -32,15 +32,12 @@ public class CachedNoiseMap implements Writable { private final Matter noise; private final MatterSlice slice; - public CachedNoiseMap(int size, NoiseGenerator cng) - { + public CachedNoiseMap(int size, NoiseGenerator cng) { noise = new IrisMatter(size, size, 1); slice = noise.slice(Integer.class); - for(int i = 0; i < slice.getWidth(); i++) - { - for(int j = 0; j < slice.getHeight(); j++) - { + for (int i = 0; i < slice.getWidth(); i++) { + for (int j = 0; j < slice.getHeight(); j++) { set(i, j, cng.noise(i, j)); } } @@ -55,17 +52,14 @@ void write(File file) throws IOException { noise.write(file); } - void set(int x, int y, double value) - { - slice.set(x%slice.getWidth(), y%slice.getHeight(), 0, Float.floatToIntBits((float)value)); + void set(int x, int y, double value) { + slice.set(x % slice.getWidth(), y % slice.getHeight(), 0, Float.floatToIntBits((float) value)); } - double get(int x, int y) - { - Integer i = slice.get(x%slice.getWidth(), y%slice.getHeight(), 0); + double get(int x, int y) { + Integer i = slice.get(x % slice.getWidth(), y % slice.getHeight(), 0); - if(i == null) - { + if (i == null) { return 0; } diff --git a/src/main/java/com/volmit/iris/util/noise/CellGenerator.java b/src/main/java/com/volmit/iris/util/noise/CellGenerator.java index ef4913f53..9cd0fbc7e 100644 --- a/src/main/java/com/volmit/iris/util/noise/CellGenerator.java +++ b/src/main/java/com/volmit/iris/util/noise/CellGenerator.java @@ -60,7 +60,7 @@ public double getDistance(double x, double y, double z) { } public double getValue(double x, double z, int possibilities) { - if(possibilities == 1) { + if (possibilities == 1) { return 0; } @@ -68,7 +68,7 @@ public double getValue(double x, double z, int possibilities) { } public double getValue(double x, double y, double z, int possibilities) { - if(possibilities == 1) { + if (possibilities == 1) { return 0; } @@ -76,7 +76,7 @@ public double getValue(double x, double y, double z, int possibilities) { } public int getIndex(double x, double z, int possibilities) { - if(possibilities == 1) { + if (possibilities == 1) { return 0; } @@ -84,7 +84,7 @@ public int getIndex(double x, double z, int possibilities) { } public int getIndex(double x, double y, double z, int possibilities) { - if(possibilities == 1) { + if (possibilities == 1) { return 0; } diff --git a/src/main/java/com/volmit/iris/util/noise/CloverNoise.java b/src/main/java/com/volmit/iris/util/noise/CloverNoise.java index 8ed0e2be4..c2171e2b1 100644 --- a/src/main/java/com/volmit/iris/util/noise/CloverNoise.java +++ b/src/main/java/com/volmit/iris/util/noise/CloverNoise.java @@ -39,7 +39,7 @@ public double noise(double x, double z) { @Override public double noise(double x, double y, double z) { - if(z == 0) { + if (z == 0) { return n2.noise(x, y); } @@ -60,8 +60,7 @@ public static class Noise2D { /** * Constructs a new 2D Clover Noise generator with a specific seed. * - * @param seed - * The seed for the noise generator. + * @param seed The seed for the noise generator. */ public Noise2D(long seed) { this.seed = seed; @@ -77,7 +76,7 @@ public Noise2D() { private long doHash(long input, long seed) { input += seed; - if(input < 0) { + if (input < 0) { input += HASH_M; } @@ -92,7 +91,7 @@ private double hash(Vector2 position) { long hash = doHash(seed, (long) Math.floor(position.getX())); hash = doHash(hash, (long) Math.floor(position.getY())); hash = doHash(hash, hash * (long) Math.floor(position.getX() + position.getY())); - if(hash < 0) { + if (hash < 0) { hash += HASH_M; } @@ -109,8 +108,7 @@ private Vector2 offset(Vector2 position) { /** * Generates 2D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of noise, from 0 to 1. */ public double noise(Vector2 p) { @@ -130,10 +128,10 @@ public double noise(Vector2 p) { Vector2 a, c, d; - if(side_nx < 0 && p.x < c_11.x || side_px > 0 && p.x > c_11.x) { + if (side_nx < 0 && p.x < c_11.x || side_px > 0 && p.x > c_11.x) { double side_py = m_p_c11.sub(d_p_c11.mult(c_12)).ymx(); - if(side_py > 0) { + if (side_py > 0) { a = c_12; c = c_01; d = new Vector2(-1, 1); @@ -145,7 +143,7 @@ public double noise(Vector2 p) { } else { double side_ny = m_p_c11.sub(d_p_c11.mult(c_10)).ymx(); - if(side_ny > 0) { + if (side_ny > 0) { a = c_10; c = c_21; d = new Vector2(1, -1); @@ -165,16 +163,16 @@ public double noise(Vector2 p) { Vector2 ac = a.sub(c); Vector2 bd = c_11.sub(d); - if(ac.x * ac.x + ac.y * ac.y < bd.x * bd.x + bd.y * bd.y) { + if (ac.x * ac.x + ac.y * ac.y < bd.x * bd.x + bd.y * bd.y) { Vector2 pa = p.sub(a); - if(pa.x * ac.y - pa.y * ac.x > 0.) { + if (pa.x * ac.y - pa.y * ac.x > 0.) { h = c_11; } } else { Vector2 pb = p.sub(c_11); - if(pb.x * bd.y - pb.y * bd.x > 0) { + if (pb.x * bd.y - pb.y * bd.x > 0) { f = c_11; } else { g = c_11; @@ -207,10 +205,8 @@ public double noise(Vector2 p) { /** * Generates 2D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. * @return The value of noise, from 0 to 1. */ public double noise(double x, double y) { @@ -220,10 +216,8 @@ public double noise(double x, double y) { /** * Generates fractal 2D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. - * @param iterations - * The number of iterations for the fractal noise. + * @param p The point to generate noise at. + * @param iterations The number of iterations for the fractal noise. * @return The value of noise, from 0 to 1. */ public double fractalNoise(Vector2 p, int iterations) { @@ -231,7 +225,7 @@ public double fractalNoise(Vector2 p, int iterations) { double weight = 1; double div = 0; - for(int i = 0; i < iterations; i++) { + for (int i = 0; i < iterations; i++) { total += noise(p.mult(1 / weight)) * weight; div += weight; @@ -244,12 +238,9 @@ public double fractalNoise(Vector2 p, int iterations) { /** * Generates fractal 2D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param iterations - * The number of iterations for the fractal noise. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param iterations The number of iterations for the fractal noise. * @return The value of noise, from 0 to 1. */ public double fractalNoise(double x, double y, int iterations) { @@ -259,8 +250,7 @@ public double fractalNoise(double x, double y, int iterations) { /** * Generates curl 2D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of curl noise, a normalized 2D vector. */ public Vector2 curlNoise(Vector2 p) { @@ -274,10 +264,8 @@ public Vector2 curlNoise(Vector2 p) { /** * Generates curl 2D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. * @return The value of curl noise, a normalized 2D vector. */ public Vector2 curlNoise(double x, double y) { @@ -287,10 +275,8 @@ public Vector2 curlNoise(double x, double y) { /** * Generates fractal curl 2D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. - * @param iterations - * The number of iterations for the fractal noise. + * @param p The point to generate noise at. + * @param iterations The number of iterations for the fractal noise. * @return The value of curl noise, a normalized 2D vector. */ public Vector2 fractalCurlNoise(Vector2 p, int iterations) { @@ -304,12 +290,9 @@ public Vector2 fractalCurlNoise(Vector2 p, int iterations) { /** * Generates fractal curl 2D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param iterations - * The number of iterations for the fractal noise. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param iterations The number of iterations for the fractal noise. * @return The value of curl noise, a normalized 2D vector. */ public Vector2 fractalCurlNoise(double x, double y, int iterations) { @@ -319,8 +302,7 @@ public Vector2 fractalCurlNoise(double x, double y, int iterations) { /** * Generates 2D Frost Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/frost.md * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of noise, from 0 to 1. */ public double frostNoise(Vector2 p) { @@ -335,10 +317,8 @@ public double frostNoise(Vector2 p) { /** * Generates 2D Frost Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/frost.md * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. * @return The value of noise, from 0 to 1. */ public double frostNoise(double x, double y) { @@ -348,8 +328,7 @@ public double frostNoise(double x, double y) { /** * Generates 2D Marble Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/marble.md * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of noise, from 0 to 1. */ public double marbleNoise(Vector2 p) { @@ -374,10 +353,8 @@ public double marbleNoise(Vector2 p) { /** * Generates 2D Marble Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/marble.md * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. * @return The value of noise, from 0 to 1. */ public double marbleNoise(double x, double y) { @@ -404,7 +381,7 @@ public Noise3D() { private long doHash(long input, long seed) { input += seed; - if(input < 0) { + if (input < 0) { input += HASH_M; } @@ -420,7 +397,7 @@ private double hash(Vector3 position) { hash = doHash(hash, (long) Math.floor(position.getY())); hash = doHash(hash, (long) Math.floor(position.getZ())); hash = doHash(hash, hash * (long) Math.floor(position.getX() + position.getY() + position.getZ())); - if(hash < 0) { + if (hash < 0) { hash += HASH_M; } @@ -445,10 +422,10 @@ private boolean boundary(Vector3 p, Vector3 c_00, Vector3 c_10, Vector3 c_20, Ve Vector3 a, b, c, d; - if(side_nx < 0 && p.x < c_11.x || side_px > 0 && p.x >= c_11.x) { + if (side_nx < 0 && p.x < c_11.x || side_px > 0 && p.x >= c_11.x) { double side_py = m_p_c11.sub(d_p_c11.mult(c_12.xy())).ymx(); - if(side_py > 0.) { + if (side_py > 0.) { a = c_01; b = c_02; c = c_12; @@ -462,7 +439,7 @@ private boolean boundary(Vector3 p, Vector3 c_00, Vector3 c_10, Vector3 c_20, Ve } else { double side_ny = m_p_c11.sub(d_p_c11.mult(c_10.xy())).ymx(); - if(side_ny > 0.) { + if (side_ny > 0.) { a = c_10; b = c_11; c = c_21; @@ -482,7 +459,7 @@ private boolean boundary(Vector3 p, Vector3 c_00, Vector3 c_10, Vector3 c_20, Ve Vector3 ac = a.sub(c); Vector3 pa = p.sub(a); - if(pa.x * ac.y - pa.y * ac.x > 0) { + if (pa.x * ac.y - pa.y * ac.x > 0) { h = b; } @@ -500,8 +477,7 @@ private boolean boundary(Vector3 p, Vector3 c_00, Vector3 c_10, Vector3 c_20, Ve /** * Generates 3D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of noise, from 0 to 1. */ public double noise(Vector3 p) { @@ -533,9 +509,9 @@ public double noise(Vector3 p) { Vector3 a, b, c, d, e, f, g, h; - if(x_bound) { - if(y_bound) { - if(z_bound) { + if (x_bound) { + if (y_bound) { + if (z_bound) { a = offset(p_floor.add(-1, -1, -1)); b = c_001; c = c_010; @@ -555,7 +531,7 @@ public double noise(Vector3 p) { h = c_112; } } else { - if(z_bound) { + if (z_bound) { a = c_010; b = c_011; c = offset(p_floor.add(-1, 1, -1)); @@ -576,8 +552,8 @@ public double noise(Vector3 p) { } } } else { - if(y_bound) { - if(z_bound) { + if (y_bound) { + if (z_bound) { a = c_100; b = c_101; c = c_110; @@ -597,7 +573,7 @@ public double noise(Vector3 p) { h = c_212; } } else { - if(z_bound) { + if (z_bound) { a = c_110; b = c_111; c = c_120; @@ -634,19 +610,19 @@ public double noise(Vector3 p) { i = a; j = h; - if(plane_b > 0 && plane_d <= 0) { + if (plane_b > 0 && plane_d <= 0) { k = b; l = d; - } else if(plane_d > 0 && plane_c <= 0) { + } else if (plane_d > 0 && plane_c <= 0) { k = d; l = c; - } else if(plane_c > 0 && plane_g <= 0) { + } else if (plane_c > 0 && plane_g <= 0) { k = c; l = g; - } else if(plane_g > 0 && plane_e <= 0) { + } else if (plane_g > 0 && plane_e <= 0) { k = g; l = e; - } else if(plane_e > 0 && plane_f <= 0) { + } else if (plane_e > 0 && plane_f <= 0) { k = e; l = f; } else { @@ -696,12 +672,9 @@ public double noise(Vector3 p) { /** * Generates 3D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param z - * The z coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param z The z coordinate of the point. * @return The value of noise, from 0 to 1. */ public double noise(double x, double y, double z) { @@ -711,10 +684,8 @@ public double noise(double x, double y, double z) { /** * Generates fractal 3D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. - * @param iterations - * The number of iterations for the fractal noise. + * @param p The point to generate noise at. + * @param iterations The number of iterations for the fractal noise. * @return The value of noise, from 0 to 1. */ public double fractalNoise(Vector3 p, int iterations) { @@ -722,7 +693,7 @@ public double fractalNoise(Vector3 p, int iterations) { double weight = 1; double div = 0; - for(int i = 0; i < iterations; i++) { + for (int i = 0; i < iterations; i++) { total += noise(p.mult(1 / weight)) * weight; div += weight; @@ -735,14 +706,10 @@ public double fractalNoise(Vector3 p, int iterations) { /** * Generates fractal 3D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param z - * The z coordinate of the point. - * @param iterations - * The number of iterations for the fractal noise. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param z The z coordinate of the point. + * @param iterations The number of iterations for the fractal noise. * @return The value of noise, from 0 to 1. */ public double fractalNoise(double x, double y, double z, int iterations) { @@ -752,8 +719,7 @@ public double fractalNoise(double x, double y, double z, int iterations) { /** * Generates curl 3D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of curl noise, a normalized 3D vector. */ public Vector3 curlNoise(Vector3 p) { @@ -768,12 +734,9 @@ public Vector3 curlNoise(Vector3 p) { /** * Generates curl 3D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param z - * The z coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param z The z coordinate of the point. * @return The value of curl noise, a normalized 3D vector. */ public Vector3 curlNoise(double x, double y, double z) { @@ -783,10 +746,8 @@ public Vector3 curlNoise(double x, double y, double z) { /** * Generates fractal curl 3D Clover Noise at a specific point. * - * @param p - * The point to generate noise at. - * @param iterations - * The number of iterations for the fractal noise. + * @param p The point to generate noise at. + * @param iterations The number of iterations for the fractal noise. * @return The value of curl noise, a normalized 3D vector. */ public Vector3 fractalCurlNoise(Vector3 p, int iterations) { @@ -801,14 +762,10 @@ public Vector3 fractalCurlNoise(Vector3 p, int iterations) { /** * Generates fractal curl 3D Clover Noise at a specific point. * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param z - * The z coordinate of the point. - * @param iterations - * The number of iterations for the fractal noise. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param z The z coordinate of the point. + * @param iterations The number of iterations for the fractal noise. * @return The value of curl noise, a normalized 3D vector. */ public Vector3 fractalCurlNoise(double x, double y, double z, int iterations) { @@ -818,8 +775,7 @@ public Vector3 fractalCurlNoise(double x, double y, double z, int iterations) { /** * Generates 3D Frost Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/frost.md * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of noise, from 0 to 1. */ public double frostNoise(Vector3 p) { @@ -834,12 +790,9 @@ public double frostNoise(Vector3 p) { /** * Generates 3D Frost Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/frost.md * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param z - * The z coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param z The z coordinate of the point. * @return The value of noise, from 0 to 1. */ public double frostNoise(double x, double y, double z) { @@ -849,8 +802,7 @@ public double frostNoise(double x, double y, double z) { /** * Generates 3D Marble Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/marble.md * - * @param p - * The point to generate noise at. + * @param p The point to generate noise at. * @return The value of noise, from 0 to 1. */ public double marbleNoise(Vector3 p) { @@ -875,12 +827,9 @@ public double marbleNoise(Vector3 p) { /** * Generates 3D Marble Noise at a specific point. See https://github.com/ValgoBoi/clover-noise/blob/master/variations/marble.md * - * @param x - * The x coordinate of the point. - * @param y - * The y coordinate of the point. - * @param z - * The z coordinate of the point. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param z The z coordinate of the point. * @return The value of noise, from 0 to 1. */ public double marbleNoise(double x, double y, double z) { diff --git a/src/main/java/com/volmit/iris/util/noise/FastNoise.java b/src/main/java/com/volmit/iris/util/noise/FastNoise.java index 358085faf..4538c772c 100644 --- a/src/main/java/com/volmit/iris/util/noise/FastNoise.java +++ b/src/main/java/com/volmit/iris/util/noise/FastNoise.java @@ -203,7 +203,7 @@ private static float GradCoord4D(int seed, int x, int y, int z, int w, float xd, hash &= 31; float a = yd, b = zd, c = wd; // X,Y,Z - switch(hash >> 3) { // OR, DEPENDING ON HIGH ORDER 2 BITS: + switch (hash >> 3) { // OR, DEPENDING ON HIGH ORDER 2 BITS: case 1: a = wd; b = xd; @@ -316,7 +316,7 @@ public void SetGradientPerturbAmp(float gradientPerturbAmp) { private void CalculateFractalBounding() { float amp = m_gain; float ampFractal = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { ampFractal += amp; amp *= m_gain; } @@ -328,11 +328,11 @@ public float GetNoise(float x, float y, float z) { y *= m_frequency; z *= m_frequency; - switch(m_noiseType) { + switch (m_noiseType) { case Value: return SingleValue(m_seed, x, y, z); case ValueFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleValueFractalFBM(x, y, z); case Billow: @@ -345,7 +345,7 @@ public float GetNoise(float x, float y, float z) { case Perlin: return SinglePerlin(m_seed, x, y, z); case PerlinFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SinglePerlinFractalFBM(x, y, z); case Billow: @@ -358,7 +358,7 @@ public float GetNoise(float x, float y, float z) { case Simplex: return SingleSimplex(m_seed, x, y, z); case SimplexFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleSimplexFractalFBM(x, y, z); case Billow: @@ -369,7 +369,7 @@ public float GetNoise(float x, float y, float z) { return 0; } case Cellular: - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: case NoiseLookup: case Distance: @@ -382,7 +382,7 @@ public float GetNoise(float x, float y, float z) { case Cubic: return SingleCubic(m_seed, x, y, z); case CubicFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleCubicFractalFBM(x, y, z); case Billow: @@ -401,11 +401,11 @@ public float GetNoise(float x, float y) { x *= m_frequency; y *= m_frequency; - switch(m_noiseType) { + switch (m_noiseType) { case Value: return SingleValue(m_seed, x, y); case ValueFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleValueFractalFBM(x, y); case Billow: @@ -418,7 +418,7 @@ public float GetNoise(float x, float y) { case Perlin: return SinglePerlin(m_seed, x, y); case PerlinFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SinglePerlinFractalFBM(x, y); case Billow: @@ -431,7 +431,7 @@ public float GetNoise(float x, float y) { case Simplex: return SingleSimplex(m_seed, x, y); case SimplexFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleSimplexFractalFBM(x, y); case Billow: @@ -442,7 +442,7 @@ public float GetNoise(float x, float y) { return 0; } case Cellular: - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: case NoiseLookup: case Distance: @@ -455,7 +455,7 @@ public float GetNoise(float x, float y) { case Cubic: return SingleCubic(m_seed, x, y); case CubicFractal: - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleCubicFractalFBM(x, y); case Billow: @@ -518,7 +518,7 @@ public float GetValueFractal(float x, float y, float z) { y *= m_frequency; z *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleValueFractalFBM(x, y, z); case Billow: @@ -535,7 +535,7 @@ private float SingleValueFractalFBM(float x, float y, float z) { float sum = SingleValue(seed, x, y, z); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -552,7 +552,7 @@ private float SingleValueFractalBillow(float x, float y, float z) { float sum = Math.abs(SingleValue(seed, x, y, z)) * 2 - 1; float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -569,7 +569,7 @@ private float SingleValueFractalRigidMulti(float x, float y, float z) { float sum = 1 - Math.abs(SingleValue(seed, x, y, z)); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -594,7 +594,7 @@ private float SingleValue(int seed, float x, float y, float z) { int z1 = z0 + 1; float xs, ys, zs; - switch(m_interp) { + switch (m_interp) { default: case Linear: xs = x - x0; @@ -628,7 +628,7 @@ public float GetValueFractal(float x, float y) { x *= m_frequency; y *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleValueFractalFBM(x, y); case Billow: @@ -645,7 +645,7 @@ private float SingleValueFractalFBM(float x, float y) { float sum = SingleValue(seed, x, y); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -661,7 +661,7 @@ private float SingleValueFractalBillow(float x, float y) { float sum = Math.abs(SingleValue(seed, x, y)) * 2 - 1; float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; amp *= m_gain; @@ -676,7 +676,7 @@ private float SingleValueFractalRigidMulti(float x, float y) { float sum = 1 - Math.abs(SingleValue(seed, x, y)); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -698,7 +698,7 @@ private float SingleValue(int seed, float x, float y) { int y1 = y0 + 1; float xs, ys; - switch(m_interp) { + switch (m_interp) { default: case Linear: xs = x - x0; @@ -726,7 +726,7 @@ public float GetPerlinFractal(float x, float y, float z) { y *= m_frequency; z *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SinglePerlinFractalFBM(x, y, z); case Billow: @@ -743,7 +743,7 @@ private float SinglePerlinFractalFBM(float x, float y, float z) { float sum = SinglePerlin(seed, x, y, z); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -760,7 +760,7 @@ private float SinglePerlinFractalBillow(float x, float y, float z) { float sum = Math.abs(SinglePerlin(seed, x, y, z)) * 2 - 1; float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -777,7 +777,7 @@ private float SinglePerlinFractalRigidMulti(float x, float y, float z) { float sum = 1 - Math.abs(SinglePerlin(seed, x, y, z)); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -802,7 +802,7 @@ private float SinglePerlin(int seed, float x, float y, float z) { int z1 = z0 + 1; float xs, ys, zs; - switch(m_interp) { + switch (m_interp) { default: case Linear: xs = x - x0; @@ -843,7 +843,7 @@ public float GetPerlinFractal(float x, float y) { x *= m_frequency; y *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SinglePerlinFractalFBM(x, y); case Billow: @@ -860,7 +860,7 @@ private float SinglePerlinFractalFBM(float x, float y) { float sum = SinglePerlin(seed, x, y); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -876,7 +876,7 @@ private float SinglePerlinFractalBillow(float x, float y) { float sum = Math.abs(SinglePerlin(seed, x, y)) * 2 - 1; float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -892,7 +892,7 @@ private float SinglePerlinFractalRigidMulti(float x, float y) { float sum = 1 - Math.abs(SinglePerlin(seed, x, y)); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -914,7 +914,7 @@ private float SinglePerlin(int seed, float x, float y) { int y1 = y0 + 1; float xs, ys; - switch(m_interp) { + switch (m_interp) { default: case Linear: xs = x - x0; @@ -947,7 +947,7 @@ public float GetSimplexFractal(float x, float y, float z) { y *= m_frequency; z *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleSimplexFractalFBM(x, y, z); case Billow: @@ -964,7 +964,7 @@ private float SingleSimplexFractalFBM(float x, float y, float z) { float sum = SingleSimplex(seed, x, y, z); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -981,7 +981,7 @@ private float SingleSimplexFractalBillow(float x, float y, float z) { float sum = Math.abs(SingleSimplex(seed, x, y, z)) * 2 - 1; float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -998,7 +998,7 @@ private float SingleSimplexFractalRigidMulti(float x, float y, float z) { float sum = 1 - Math.abs(SingleSimplex(seed, x, y, z)); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -1028,15 +1028,15 @@ private float SingleSimplex(int seed, float x, float y, float z) { int i1, j1, k1; int i2, j2, k2; - if(x0 >= y0) { - if(y0 >= z0) { + if (x0 >= y0) { + if (y0 >= z0) { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 1; k2 = 0; - } else if(x0 >= z0) { + } else if (x0 >= z0) { i1 = 1; j1 = 0; k1 = 0; @@ -1054,14 +1054,14 @@ private float SingleSimplex(int seed, float x, float y, float z) { } } else // x0 < y0 { - if(y0 < z0) { + if (y0 < z0) { i1 = 0; j1 = 0; k1 = 1; i2 = 0; j2 = 1; k2 = 1; - } else if(x0 < z0) { + } else if (x0 < z0) { i1 = 0; j1 = 1; k1 = 0; @@ -1092,7 +1092,7 @@ private float SingleSimplex(int seed, float x, float y, float z) { float n0, n1, n2, n3; t = (float) 0.6 - x0 * x0 - y0 * y0 - z0 * z0; - if(t < 0) + if (t < 0) n0 = 0; else { t *= t; @@ -1100,7 +1100,7 @@ private float SingleSimplex(int seed, float x, float y, float z) { } t = (float) 0.6 - x1 * x1 - y1 * y1 - z1 * z1; - if(t < 0) + if (t < 0) n1 = 0; else { t *= t; @@ -1108,7 +1108,7 @@ private float SingleSimplex(int seed, float x, float y, float z) { } t = (float) 0.6 - x2 * x2 - y2 * y2 - z2 * z2; - if(t < 0) + if (t < 0) n2 = 0; else { t *= t; @@ -1116,7 +1116,7 @@ private float SingleSimplex(int seed, float x, float y, float z) { } t = (float) 0.6 - x3 * x3 - y3 * y3 - z3 * z3; - if(t < 0) + if (t < 0) n3 = 0; else { t *= t; @@ -1130,7 +1130,7 @@ public float GetSimplexFractal(float x, float y) { x *= m_frequency; y *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleSimplexFractalFBM(x, y); case Billow: @@ -1147,7 +1147,7 @@ private float SingleSimplexFractalFBM(float x, float y) { float sum = SingleSimplex(seed, x, y); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -1163,7 +1163,7 @@ private float SingleSimplexFractalBillow(float x, float y) { float sum = Math.abs(SingleSimplex(seed, x, y)) * 2 - 1; float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -1179,7 +1179,7 @@ private float SingleSimplexFractalRigidMulti(float x, float y) { float sum = 1 - Math.abs(SingleSimplex(seed, x, y)); float amp = 1; - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -1207,7 +1207,7 @@ private float SingleSimplex(int seed, float x, float y) { float y0 = y - Y0; int i1, j1; - if(x0 > y0) { + if (x0 > y0) { i1 = 1; j1 = 0; } else { @@ -1223,7 +1223,7 @@ private float SingleSimplex(int seed, float x, float y) { float n0, n1, n2; t = (float) 0.5 - x0 * x0 - y0 * y0; - if(t < 0) + if (t < 0) n0 = 0; else { t *= t; @@ -1231,7 +1231,7 @@ private float SingleSimplex(int seed, float x, float y) { } t = (float) 0.5 - x1 * x1 - y1 * y1; - if(t < 0) + if (t < 0) n1 = 0; else { t *= t; @@ -1239,7 +1239,7 @@ private float SingleSimplex(int seed, float x, float y) { } t = (float) 0.5 - x2 * x2 - y2 * y2; - if(t < 0) + if (t < 0) n2 = 0; else { t *= t; @@ -1309,35 +1309,35 @@ private float SingleSimplex(int seed, float x, float y, float z, float w) { float w4 = w0 - 1 + 4 * G4; t = (float) 0.6 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0; - if(t < 0) + if (t < 0) n0 = 0; else { t *= t; n0 = t * t * GradCoord4D(seed, i, j, k, l, x0, y0, z0, w0); } t = (float) 0.6 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1; - if(t < 0) + if (t < 0) n1 = 0; else { t *= t; n1 = t * t * GradCoord4D(seed, i + i1, j + j1, k + k1, l + l1, x1, y1, z1, w1); } t = (float) 0.6 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2; - if(t < 0) + if (t < 0) n2 = 0; else { t *= t; n2 = t * t * GradCoord4D(seed, i + i2, j + j2, k + k2, l + l2, x2, y2, z2, w2); } t = (float) 0.6 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3; - if(t < 0) + if (t < 0) n3 = 0; else { t *= t; n3 = t * t * GradCoord4D(seed, i + i3, j + j3, k + k3, l + l3, x3, y3, z3, w3); } t = (float) 0.6 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4; - if(t < 0) + if (t < 0) n4 = 0; else { t *= t; @@ -1353,7 +1353,7 @@ public float GetCubicFractal(float x, float y, float z) { y *= m_frequency; z *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleCubicFractalFBM(x, y, z); case Billow: @@ -1371,7 +1371,7 @@ private float SingleCubicFractalFBM(float x, float y, float z) { float amp = 1; int i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -1389,7 +1389,7 @@ private float SingleCubicFractalBillow(float x, float y, float z) { float amp = 1; int i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -1407,7 +1407,7 @@ private float SingleCubicFractalRigidMulti(float x, float y, float z) { float amp = 1; int i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -1449,7 +1449,7 @@ public float GetCubicFractal(float x, float y) { x *= m_frequency; y *= m_frequency; - switch(m_fractalType) { + switch (m_fractalType) { case FBM: return SingleCubicFractalFBM(x, y); case Billow: @@ -1467,7 +1467,7 @@ private float SingleCubicFractalFBM(float x, float y) { float amp = 1; int i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; @@ -1484,7 +1484,7 @@ private float SingleCubicFractalBillow(float x, float y) { float amp = 1; int i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; @@ -1501,7 +1501,7 @@ private float SingleCubicFractalRigidMulti(float x, float y) { float amp = 1; int i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; @@ -1542,7 +1542,7 @@ public float GetCellular(float x, float y, float z) { y *= m_frequency; z *= m_frequency; - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: case NoiseLookup: case Distance: @@ -1560,11 +1560,11 @@ private float SingleCellular(float x, float y, float z) { float distance = 999999; int xc = 0, yc = 0, zc = 0; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { case Euclidean: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { - for(int zi = zr - 1; zi <= zr + 1; zi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { + for (int zi = zr - 1; zi <= zr + 1; zi++) { Float3 vec = CELL_3D[Hash3D(m_seed, xi, yi, zi) & 255]; float vecX = xi - x + vec.x; @@ -1573,7 +1573,7 @@ private float SingleCellular(float x, float y, float z) { float newDistance = vecX * vecX + vecY * vecY + vecZ * vecZ; - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1584,9 +1584,9 @@ private float SingleCellular(float x, float y, float z) { } break; case Manhattan: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { - for(int zi = zr - 1; zi <= zr + 1; zi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { + for (int zi = zr - 1; zi <= zr + 1; zi++) { Float3 vec = CELL_3D[Hash3D(m_seed, xi, yi, zi) & 255]; float vecX = xi - x + vec.x; @@ -1595,7 +1595,7 @@ private float SingleCellular(float x, float y, float z) { float newDistance = Math.abs(vecX) + Math.abs(vecY) + Math.abs(vecZ); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1606,9 +1606,9 @@ private float SingleCellular(float x, float y, float z) { } break; case Natural: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { - for(int zi = zr - 1; zi <= zr + 1; zi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { + for (int zi = zr - 1; zi <= zr + 1; zi++) { Float3 vec = CELL_3D[Hash3D(m_seed, xi, yi, zi) & 255]; float vecX = xi - x + vec.x; @@ -1617,7 +1617,7 @@ private float SingleCellular(float x, float y, float z) { float newDistance = (Math.abs(vecX) + Math.abs(vecY) + Math.abs(vecZ)) + (vecX * vecX + vecY * vecY + vecZ * vecZ); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1629,7 +1629,7 @@ private float SingleCellular(float x, float y, float z) { break; } - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: return ValCoord3D(0, xc, yc, zc); @@ -1652,11 +1652,11 @@ private float SingleCellular2Edge(float x, float y, float z) { float distance = 999999; float distance2 = 999999; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { case Euclidean: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { - for(int zi = zr - 1; zi <= zr + 1; zi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { + for (int zi = zr - 1; zi <= zr + 1; zi++) { Float3 vec = CELL_3D[Hash3D(m_seed, xi, yi, zi) & 255]; float vecX = xi - x + vec.x; @@ -1672,9 +1672,9 @@ private float SingleCellular2Edge(float x, float y, float z) { } break; case Manhattan: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { - for(int zi = zr - 1; zi <= zr + 1; zi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { + for (int zi = zr - 1; zi <= zr + 1; zi++) { Float3 vec = CELL_3D[Hash3D(m_seed, xi, yi, zi) & 255]; float vecX = xi - x + vec.x; @@ -1690,9 +1690,9 @@ private float SingleCellular2Edge(float x, float y, float z) { } break; case Natural: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { - for(int zi = zr - 1; zi <= zr + 1; zi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { + for (int zi = zr - 1; zi <= zr + 1; zi++) { Float3 vec = CELL_3D[Hash3D(m_seed, xi, yi, zi) & 255]; float vecX = xi - x + vec.x; @@ -1711,7 +1711,7 @@ private float SingleCellular2Edge(float x, float y, float z) { break; } - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case Distance2: return distance2 - 1; case Distance2Add: @@ -1731,7 +1731,7 @@ public float GetCellular(float x, float y, ProceduralStream sourceNoise, x *= m_frequency; y *= m_frequency; - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: case NoiseLookup: case Distance: @@ -1745,7 +1745,7 @@ public float GetCellular(float x, float y) { x *= m_frequency; y *= m_frequency; - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: case NoiseLookup: case Distance: @@ -1762,11 +1762,11 @@ private float SingleCellular(float x, float y) { float distance = 999999; int xc = 0, yc = 0; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { default: case Euclidean: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1774,7 +1774,7 @@ private float SingleCellular(float x, float y) { float newDistance = vecX * vecX + vecY * vecY; - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1783,8 +1783,8 @@ private float SingleCellular(float x, float y) { } break; case Manhattan: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1792,7 +1792,7 @@ private float SingleCellular(float x, float y) { float newDistance = (Math.abs(vecX) + Math.abs(vecY)); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1801,8 +1801,8 @@ private float SingleCellular(float x, float y) { } break; case Natural: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1810,7 +1810,7 @@ private float SingleCellular(float x, float y) { float newDistance = (Math.abs(vecX) + Math.abs(vecY)) + (vecX * vecX + vecY * vecY); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1820,7 +1820,7 @@ private float SingleCellular(float x, float y) { break; } - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: return ValCoord2D(0, xc, yc); @@ -1842,11 +1842,11 @@ private float SingleCellular(float x, float y, ProceduralStream sourceNo float distance = 999999; int xc = 0, yc = 0; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { default: case Euclidean: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1854,7 +1854,7 @@ private float SingleCellular(float x, float y, ProceduralStream sourceNo float newDistance = vecX * vecX + vecY * vecY; - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1863,8 +1863,8 @@ private float SingleCellular(float x, float y, ProceduralStream sourceNo } break; case Manhattan: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1872,7 +1872,7 @@ private float SingleCellular(float x, float y, ProceduralStream sourceNo float newDistance = (Math.abs(vecX) + Math.abs(vecY)); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1881,8 +1881,8 @@ private float SingleCellular(float x, float y, ProceduralStream sourceNo } break; case Natural: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1890,7 +1890,7 @@ private float SingleCellular(float x, float y, ProceduralStream sourceNo float newDistance = (Math.abs(vecX) + Math.abs(vecY)) + (vecX * vecX + vecY * vecY); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1900,7 +1900,7 @@ private float SingleCellular(float x, float y, ProceduralStream sourceNo break; } - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: return sourceNoise.get(xc * iscale, yc * iscale).floatValue(); @@ -1922,11 +1922,11 @@ private float SingleCellular2Edge(float x, float y) { float distance = 999999; float distance2 = 999999; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { default: case Euclidean: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1940,8 +1940,8 @@ private float SingleCellular2Edge(float x, float y) { } break; case Manhattan: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1955,8 +1955,8 @@ private float SingleCellular2Edge(float x, float y) { } break; case Natural: - for(int xi = xr - 1; xi <= xr + 1; xi++) { - for(int yi = yr - 1; yi <= yr + 1; yi++) { + for (int xi = xr - 1; xi <= xr + 1; xi++) { + for (int yi = yr - 1; yi <= yr + 1; yi++) { Float2 vec = CELL_2D[Hash2D(m_seed, xi, yi) & 255]; float vecX = xi - x + vec.x; @@ -1971,7 +1971,7 @@ private float SingleCellular2Edge(float x, float y) { break; } - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case Distance2: return distance2 - 1; case Distance2Add: @@ -1998,7 +1998,7 @@ public void GradientPerturbFractal(Vector3f v3) { SingleGradientPerturb(seed, amp, m_frequency, v3); - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { freq *= m_lacunarity; amp *= m_gain; SingleGradientPerturb(++seed, amp, freq, v3); @@ -2018,7 +2018,7 @@ private void SingleGradientPerturb(int seed, float perturbAmp, float frequency, int z1 = z0 + 1; float xs, ys, zs; - switch(m_interp) { + switch (m_interp) { default: case Linear: xs = xf - x0; @@ -2085,7 +2085,7 @@ public void GradientPerturbFractal(Vector2f v2) { SingleGradientPerturb(seed, amp, m_frequency, v2); - for(int i = 1; i < m_octaves; i++) { + for (int i = 1; i < m_octaves; i++) { freq *= m_lacunarity; amp *= m_gain; SingleGradientPerturb(++seed, amp, freq, v2); @@ -2102,7 +2102,7 @@ private void SingleGradientPerturb(int seed, float perturbAmp, float frequency, int y1 = y0 + 1; float xs, ys; - switch(m_interp) { + switch (m_interp) { default: case Linear: xs = xf - x0; diff --git a/src/main/java/com/volmit/iris/util/noise/FastNoiseDouble.java b/src/main/java/com/volmit/iris/util/noise/FastNoiseDouble.java index 96af95eb9..6bc67528c 100644 --- a/src/main/java/com/volmit/iris/util/noise/FastNoiseDouble.java +++ b/src/main/java/com/volmit/iris/util/noise/FastNoiseDouble.java @@ -200,7 +200,7 @@ private static double GradCoord4D(long seed, long x, long y, long z, long w, dou hash &= 31; double a = yd, b = zd, c = wd; // X,Y,Z - switch((int) hash >> 3) { // OR, DEPENDING ON HIGH ORDER 2 BITS: + switch ((int) hash >> 3) { // OR, DEPENDING ON HIGH ORDER 2 BITS: case 1 -> { a = wd; b = xd; @@ -313,7 +313,7 @@ public void setGradientPerturbAmp(double gradientPerturbAmp) { private void calculateFractalBounding() { double amp = m_gain; double ampFractal = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { ampFractal += amp; amp *= m_gain; } @@ -325,11 +325,11 @@ public double GetNoise(double x, double y, double z) { y *= m_frequency; z *= m_frequency; - switch(m_noiseType) { + switch (m_noiseType) { case Value: return SingleValue(m_seed, x, y, z); case ValueFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleValueFractalFBM(x, y, z); case Billow -> SingleValueFractalBillow(x, y, z); case RigidMulti -> SingleValueFractalRigidMulti(x, y, z); @@ -337,7 +337,7 @@ public double GetNoise(double x, double y, double z) { case Perlin: return SinglePerlin(m_seed, x, y, z); case PerlinFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SinglePerlinFractalFBM(x, y, z); case Billow -> SinglePerlinFractalBillow(x, y, z); case RigidMulti -> SinglePerlinFractalRigidMulti(x, y, z); @@ -345,13 +345,13 @@ public double GetNoise(double x, double y, double z) { case Simplex: return SingleSimplex(m_seed, x, y, z); case SimplexFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleSimplexFractalFBM(x, y, z); case Billow -> SingleSimplexFractalBillow(x, y, z); case RigidMulti -> SingleSimplexFractalRigidMulti(x, y, z); }; case Cellular: - return switch(m_cellularReturnType) { + return switch (m_cellularReturnType) { case CellValue, NoiseLookup, Distance -> SingleCellular(x, y, z); default -> SingleCellular2Edge(x, y, z); }; @@ -360,7 +360,7 @@ public double GetNoise(double x, double y, double z) { case Cubic: return SingleCubic(m_seed, x, y, z); case CubicFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleCubicFractalFBM(x, y, z); case Billow -> SingleCubicFractalBillow(x, y, z); case RigidMulti -> SingleCubicFractalRigidMulti(x, y, z); @@ -374,11 +374,11 @@ public double GetNoise(double x, double y) { x *= m_frequency; y *= m_frequency; - switch(m_noiseType) { + switch (m_noiseType) { case Value: return SingleValue(m_seed, x, y); case ValueFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleValueFractalFBM(x, y); case Billow -> SingleValueFractalBillow(x, y); case RigidMulti -> SingleValueFractalRigidMulti(x, y); @@ -386,7 +386,7 @@ public double GetNoise(double x, double y) { case Perlin: return SinglePerlin(m_seed, x, y); case PerlinFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SinglePerlinFractalFBM(x, y); case Billow -> SinglePerlinFractalBillow(x, y); case RigidMulti -> SinglePerlinFractalRigidMulti(x, y); @@ -394,13 +394,13 @@ public double GetNoise(double x, double y) { case Simplex: return SingleSimplex(m_seed, x, y); case SimplexFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleSimplexFractalFBM(x, y); case Billow -> SingleSimplexFractalBillow(x, y); case RigidMulti -> SingleSimplexFractalRigidMulti(x, y); }; case Cellular: - return switch(m_cellularReturnType) { + return switch (m_cellularReturnType) { case CellValue, NoiseLookup, Distance -> SingleCellular(x, y); default -> SingleCellular2Edge(x, y); }; @@ -409,7 +409,7 @@ public double GetNoise(double x, double y) { case Cubic: return SingleCubic(m_seed, x, y); case CubicFractal: - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleCubicFractalFBM(x, y); case Billow -> SingleCubicFractalBillow(x, y); case RigidMulti -> SingleCubicFractalRigidMulti(x, y); @@ -467,7 +467,7 @@ public double GetValueFractal(double x, double y, double z) { y *= m_frequency; z *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleValueFractalFBM(x, y, z); case Billow -> SingleValueFractalBillow(x, y, z); case RigidMulti -> SingleValueFractalRigidMulti(x, y, z); @@ -479,7 +479,7 @@ private double SingleValueFractalFBM(double x, double y, double z) { double sum = SingleValue(seed, x, y, z); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -496,7 +496,7 @@ private double SingleValueFractalBillow(double x, double y, double z) { double sum = Math.abs(SingleValue(seed, x, y, z)) * 2 - 1; double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -513,7 +513,7 @@ private double SingleValueFractalRigidMulti(double x, double y, double z) { double sum = 1 - Math.abs(SingleValue(seed, x, y, z)); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -538,7 +538,7 @@ private double SingleValue(long seed, double x, double y, double z) { long z1 = z0 + 1; double xs = 0, ys = 0, zs = 0; - switch(m_longerp) { + switch (m_longerp) { case Linear -> { xs = x - x0; ys = y - y0; @@ -571,7 +571,7 @@ public double GetValueFractal(double x, double y) { x *= m_frequency; y *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleValueFractalFBM(x, y); case Billow -> SingleValueFractalBillow(x, y); case RigidMulti -> SingleValueFractalRigidMulti(x, y); @@ -583,7 +583,7 @@ private double SingleValueFractalFBM(double x, double y) { double sum = SingleValue(seed, x, y); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -599,7 +599,7 @@ private double SingleValueFractalBillow(double x, double y) { double sum = Math.abs(SingleValue(seed, x, y)) * 2 - 1; double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; amp *= m_gain; @@ -614,7 +614,7 @@ private double SingleValueFractalRigidMulti(double x, double y) { double sum = 1 - Math.abs(SingleValue(seed, x, y)); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -636,7 +636,7 @@ private double SingleValue(long seed, double x, double y) { long y1 = y0 + 1; double xs = 0, ys = 0; - switch(m_longerp) { + switch (m_longerp) { case Linear -> { xs = x - x0; ys = y - y0; @@ -663,7 +663,7 @@ public double GetPerlinFractal(double x, double y, double z) { y *= m_frequency; z *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SinglePerlinFractalFBM(x, y, z); case Billow -> SinglePerlinFractalBillow(x, y, z); case RigidMulti -> SinglePerlinFractalRigidMulti(x, y, z); @@ -675,7 +675,7 @@ private double SinglePerlinFractalFBM(double x, double y, double z) { double sum = SinglePerlin(seed, x, y, z); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -692,7 +692,7 @@ private double SinglePerlinFractalBillow(double x, double y, double z) { double sum = Math.abs(SinglePerlin(seed, x, y, z)) * 2 - 1; double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -709,7 +709,7 @@ private double SinglePerlinFractalRigidMulti(double x, double y, double z) { double sum = 1 - Math.abs(SinglePerlin(seed, x, y, z)); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -734,7 +734,7 @@ private double SinglePerlin(long seed, double x, double y, double z) { long z1 = z0 + 1; double xs = 0, ys = 0, zs = 0; - switch(m_longerp) { + switch (m_longerp) { case Linear -> { xs = x - x0; ys = y - y0; @@ -774,7 +774,7 @@ public double GetPerlinFractal(double x, double y) { x *= m_frequency; y *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SinglePerlinFractalFBM(x, y); case Billow -> SinglePerlinFractalBillow(x, y); case RigidMulti -> SinglePerlinFractalRigidMulti(x, y); @@ -786,7 +786,7 @@ private double SinglePerlinFractalFBM(double x, double y) { double sum = SinglePerlin(seed, x, y); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -802,7 +802,7 @@ private double SinglePerlinFractalBillow(double x, double y) { double sum = Math.abs(SinglePerlin(seed, x, y)) * 2 - 1; double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -818,7 +818,7 @@ private double SinglePerlinFractalRigidMulti(double x, double y) { double sum = 1 - Math.abs(SinglePerlin(seed, x, y)); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -840,7 +840,7 @@ private double SinglePerlin(long seed, double x, double y) { long y1 = y0 + 1; double xs = 0, ys = 0; - switch(m_longerp) { + switch (m_longerp) { case Linear -> { xs = x - x0; ys = y - y0; @@ -872,7 +872,7 @@ public double GetSimplexFractal(double x, double y, double z) { y *= m_frequency; z *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleSimplexFractalFBM(x, y, z); case Billow -> SingleSimplexFractalBillow(x, y, z); case RigidMulti -> SingleSimplexFractalRigidMulti(x, y, z); @@ -884,7 +884,7 @@ private double SingleSimplexFractalFBM(double x, double y, double z) { double sum = SingleSimplex(seed, x, y, z); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -901,7 +901,7 @@ private double SingleSimplexFractalBillow(double x, double y, double z) { double sum = Math.abs(SingleSimplex(seed, x, y, z)) * 2 - 1; double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -918,7 +918,7 @@ private double SingleSimplexFractalRigidMulti(double x, double y, double z) { double sum = 1 - Math.abs(SingleSimplex(seed, x, y, z)); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -948,15 +948,15 @@ private double SingleSimplex(long seed, double x, double y, double z) { long i1, j1, k1; long i2, j2, k2; - if(x0 >= y0) { - if(y0 >= z0) { + if (x0 >= y0) { + if (y0 >= z0) { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 1; k2 = 0; - } else if(x0 >= z0) { + } else if (x0 >= z0) { i1 = 1; j1 = 0; k1 = 0; @@ -974,14 +974,14 @@ private double SingleSimplex(long seed, double x, double y, double z) { } } else // x0 < y0 { - if(y0 < z0) { + if (y0 < z0) { i1 = 0; j1 = 0; k1 = 1; i2 = 0; j2 = 1; k2 = 1; - } else if(x0 < z0) { + } else if (x0 < z0) { i1 = 0; j1 = 1; k1 = 0; @@ -1012,7 +1012,7 @@ private double SingleSimplex(long seed, double x, double y, double z) { double n0, n1, n2, n3; t = 0.6 - x0 * x0 - y0 * y0 - z0 * z0; - if(t < 0) + if (t < 0) n0 = 0; else { t *= t; @@ -1020,7 +1020,7 @@ private double SingleSimplex(long seed, double x, double y, double z) { } t = 0.6 - x1 * x1 - y1 * y1 - z1 * z1; - if(t < 0) + if (t < 0) n1 = 0; else { t *= t; @@ -1028,7 +1028,7 @@ private double SingleSimplex(long seed, double x, double y, double z) { } t = 0.6 - x2 * x2 - y2 * y2 - z2 * z2; - if(t < 0) + if (t < 0) n2 = 0; else { t *= t; @@ -1036,7 +1036,7 @@ private double SingleSimplex(long seed, double x, double y, double z) { } t = 0.6 - x3 * x3 - y3 * y3 - z3 * z3; - if(t < 0) + if (t < 0) n3 = 0; else { t *= t; @@ -1050,7 +1050,7 @@ public double GetSimplexFractal(double x, double y) { x *= m_frequency; y *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleSimplexFractalFBM(x, y); case Billow -> SingleSimplexFractalBillow(x, y); case RigidMulti -> SingleSimplexFractalRigidMulti(x, y); @@ -1062,7 +1062,7 @@ private double SingleSimplexFractalFBM(double x, double y) { double sum = SingleSimplex(seed, x, y); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -1078,7 +1078,7 @@ private double SingleSimplexFractalBillow(double x, double y) { double sum = Math.abs(SingleSimplex(seed, x, y)) * 2 - 1; double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -1094,7 +1094,7 @@ private double SingleSimplexFractalRigidMulti(double x, double y) { double sum = 1 - Math.abs(SingleSimplex(seed, x, y)); double amp = 1; - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { x *= m_lacunarity; y *= m_lacunarity; @@ -1122,7 +1122,7 @@ private double SingleSimplex(long seed, double x, double y) { double y0 = y - Y0; long i1, j1; - if(x0 > y0) { + if (x0 > y0) { i1 = 1; j1 = 0; } else { @@ -1138,7 +1138,7 @@ private double SingleSimplex(long seed, double x, double y) { double n0, n1, n2; t = 0.5 - x0 * x0 - y0 * y0; - if(t < 0) + if (t < 0) n0 = 0; else { t *= t; @@ -1146,7 +1146,7 @@ private double SingleSimplex(long seed, double x, double y) { } t = 0.5 - x1 * x1 - y1 * y1; - if(t < 0) + if (t < 0) n1 = 0; else { t *= t; @@ -1154,7 +1154,7 @@ private double SingleSimplex(long seed, double x, double y) { } t = 0.5 - x2 * x2 - y2 * y2; - if(t < 0) + if (t < 0) n2 = 0; else { t *= t; @@ -1224,35 +1224,35 @@ private double SingleSimplex(long seed, double x, double y, double z, double w) double w4 = w0 - 1 + 4 * G4; t = 0.6 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0; - if(t < 0) + if (t < 0) n0 = 0; else { t *= t; n0 = t * t * GradCoord4D(seed, i, j, k, l, x0, y0, z0, w0); } t = 0.6 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1; - if(t < 0) + if (t < 0) n1 = 0; else { t *= t; n1 = t * t * GradCoord4D(seed, i + i1, j + j1, k + k1, l + l1, x1, y1, z1, w1); } t = 0.6 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2; - if(t < 0) + if (t < 0) n2 = 0; else { t *= t; n2 = t * t * GradCoord4D(seed, i + i2, j + j2, k + k2, l + l2, x2, y2, z2, w2); } t = 0.6 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3; - if(t < 0) + if (t < 0) n3 = 0; else { t *= t; n3 = t * t * GradCoord4D(seed, i + i3, j + j3, k + k3, l + l3, x3, y3, z3, w3); } t = 0.6 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4; - if(t < 0) + if (t < 0) n4 = 0; else { t *= t; @@ -1268,7 +1268,7 @@ public double GetCubicFractal(double x, double y, double z) { y *= m_frequency; z *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleCubicFractalFBM(x, y, z); case Billow -> SingleCubicFractalBillow(x, y, z); case RigidMulti -> SingleCubicFractalRigidMulti(x, y, z); @@ -1281,7 +1281,7 @@ private double SingleCubicFractalFBM(double x, double y, double z) { double amp = 1; long i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -1299,7 +1299,7 @@ private double SingleCubicFractalBillow(double x, double y, double z) { double amp = 1; long i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -1317,7 +1317,7 @@ private double SingleCubicFractalRigidMulti(double x, double y, double z) { double amp = 1; long i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; z *= m_lacunarity; @@ -1359,7 +1359,7 @@ public double GetCubicFractal(double x, double y) { x *= m_frequency; y *= m_frequency; - return switch(m_fractalType) { + return switch (m_fractalType) { case FBM -> SingleCubicFractalFBM(x, y); case Billow -> SingleCubicFractalBillow(x, y); case RigidMulti -> SingleCubicFractalRigidMulti(x, y); @@ -1372,7 +1372,7 @@ private double SingleCubicFractalFBM(double x, double y) { double amp = 1; long i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; @@ -1389,7 +1389,7 @@ private double SingleCubicFractalBillow(double x, double y) { double amp = 1; long i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; @@ -1406,7 +1406,7 @@ private double SingleCubicFractalRigidMulti(double x, double y) { double amp = 1; long i = 0; - while(++i < m_octaves) { + while (++i < m_octaves) { x *= m_lacunarity; y *= m_lacunarity; @@ -1447,7 +1447,7 @@ public double GetCellular(double x, double y, double z) { y *= m_frequency; z *= m_frequency; - return switch(m_cellularReturnType) { + return switch (m_cellularReturnType) { case CellValue, NoiseLookup, Distance -> SingleCellular(x, y, z); default -> SingleCellular2Edge(x, y, z); }; @@ -1461,11 +1461,11 @@ private double SingleCellular(double x, double y, double z) { double distance = 999999; long xc = 0, yc = 0, zc = 0; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { case Euclidean: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { - for(long zi = zr - 1; zi <= zr + 1; zi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { + for (long zi = zr - 1; zi <= zr + 1; zi++) { Double3 vec = CELL_3D[(int) hash3D(m_seed, xi, yi, zi) & 255]; double vecX = xi - x + vec.x; @@ -1474,7 +1474,7 @@ private double SingleCellular(double x, double y, double z) { double newDistance = vecX * vecX + vecY * vecY + vecZ * vecZ; - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1485,9 +1485,9 @@ private double SingleCellular(double x, double y, double z) { } break; case Manhattan: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { - for(long zi = zr - 1; zi <= zr + 1; zi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { + for (long zi = zr - 1; zi <= zr + 1; zi++) { Double3 vec = CELL_3D[(int) hash3D(m_seed, xi, yi, zi) & 255]; double vecX = xi - x + vec.x; @@ -1496,7 +1496,7 @@ private double SingleCellular(double x, double y, double z) { double newDistance = Math.abs(vecX) + Math.abs(vecY) + Math.abs(vecZ); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1507,9 +1507,9 @@ private double SingleCellular(double x, double y, double z) { } break; case Natural: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { - for(long zi = zr - 1; zi <= zr + 1; zi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { + for (long zi = zr - 1; zi <= zr + 1; zi++) { Double3 vec = CELL_3D[(int) hash3D(m_seed, xi, yi, zi) & 255]; double vecX = xi - x + vec.x; @@ -1518,7 +1518,7 @@ private double SingleCellular(double x, double y, double z) { double newDistance = (Math.abs(vecX) + Math.abs(vecY) + Math.abs(vecZ)) + (vecX * vecX + vecY * vecY + vecZ * vecZ); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1530,7 +1530,7 @@ private double SingleCellular(double x, double y, double z) { break; } - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: return valCoord3D(0, xc, yc, zc); @@ -1553,11 +1553,11 @@ private double SingleCellular2Edge(double x, double y, double z) { double distance = 999999; double distance2 = 999999; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { case Euclidean: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { - for(long zi = zr - 1; zi <= zr + 1; zi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { + for (long zi = zr - 1; zi <= zr + 1; zi++) { Double3 vec = CELL_3D[(int) hash3D(m_seed, xi, yi, zi) & 255]; double vecX = xi - x + vec.x; @@ -1573,9 +1573,9 @@ private double SingleCellular2Edge(double x, double y, double z) { } break; case Manhattan: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { - for(long zi = zr - 1; zi <= zr + 1; zi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { + for (long zi = zr - 1; zi <= zr + 1; zi++) { Double3 vec = CELL_3D[(int) hash3D(m_seed, xi, yi, zi) & 255]; double vecX = xi - x + vec.x; @@ -1591,9 +1591,9 @@ private double SingleCellular2Edge(double x, double y, double z) { } break; case Natural: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { - for(long zi = zr - 1; zi <= zr + 1; zi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { + for (long zi = zr - 1; zi <= zr + 1; zi++) { Double3 vec = CELL_3D[(int) hash3D(m_seed, xi, yi, zi) & 255]; double vecX = xi - x + vec.x; @@ -1612,7 +1612,7 @@ private double SingleCellular2Edge(double x, double y, double z) { break; } - return switch(m_cellularReturnType) { + return switch (m_cellularReturnType) { case Distance2 -> distance2 - 1; case Distance2Add -> distance2 + distance - 1; case Distance2Sub -> distance2 - distance - 1; @@ -1626,7 +1626,7 @@ public double GetCellular(double x, double y) { x *= m_frequency; y *= m_frequency; - return switch(m_cellularReturnType) { + return switch (m_cellularReturnType) { case CellValue, NoiseLookup, Distance -> SingleCellular(x, y); default -> SingleCellular2Edge(x, y); }; @@ -1639,11 +1639,11 @@ private double SingleCellular(double x, double y) { double distance = 999999; long xc = 0, yc = 0; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { default: case Euclidean: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { Double2 vec = CELL_2D[(int) hash2D(m_seed, xi, yi) & 255]; double vecX = xi - x + vec.x; @@ -1651,7 +1651,7 @@ private double SingleCellular(double x, double y) { double newDistance = vecX * vecX + vecY * vecY; - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1660,8 +1660,8 @@ private double SingleCellular(double x, double y) { } break; case Manhattan: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { Double2 vec = CELL_2D[(int) hash2D(m_seed, xi, yi) & 255]; double vecX = xi - x + vec.x; @@ -1669,7 +1669,7 @@ private double SingleCellular(double x, double y) { double newDistance = (Math.abs(vecX) + Math.abs(vecY)); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1678,8 +1678,8 @@ private double SingleCellular(double x, double y) { } break; case Natural: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { Double2 vec = CELL_2D[(int) hash2D(m_seed, xi, yi) & 255]; double vecX = xi - x + vec.x; @@ -1687,7 +1687,7 @@ private double SingleCellular(double x, double y) { double newDistance = (Math.abs(vecX) + Math.abs(vecY)) + (vecX * vecX + vecY * vecY); - if(newDistance < distance) { + if (newDistance < distance) { distance = newDistance; xc = xi; yc = yi; @@ -1697,7 +1697,7 @@ private double SingleCellular(double x, double y) { break; } - switch(m_cellularReturnType) { + switch (m_cellularReturnType) { case CellValue: return valCoord2D(0, xc, yc); @@ -1719,11 +1719,11 @@ private double SingleCellular2Edge(double x, double y) { double distance = 999999; double distance2 = 999999; - switch(m_cellularDistanceFunction) { + switch (m_cellularDistanceFunction) { default: case Euclidean: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { Double2 vec = CELL_2D[(int) hash2D(m_seed, xi, yi) & 255]; double vecX = xi - x + vec.x; @@ -1737,8 +1737,8 @@ private double SingleCellular2Edge(double x, double y) { } break; case Manhattan: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { Double2 vec = CELL_2D[(int) hash2D(m_seed, xi, yi) & 255]; double vecX = xi - x + vec.x; @@ -1752,8 +1752,8 @@ private double SingleCellular2Edge(double x, double y) { } break; case Natural: - for(long xi = xr - 1; xi <= xr + 1; xi++) { - for(long yi = yr - 1; yi <= yr + 1; yi++) { + for (long xi = xr - 1; xi <= xr + 1; xi++) { + for (long yi = yr - 1; yi <= yr + 1; yi++) { Double2 vec = CELL_2D[(int) hash2D(m_seed, xi, yi) & 255]; double vecX = xi - x + vec.x; @@ -1768,7 +1768,7 @@ private double SingleCellular2Edge(double x, double y) { break; } - return switch(m_cellularReturnType) { + return switch (m_cellularReturnType) { case Distance2 -> distance2 - 1; case Distance2Add -> distance2 + distance - 1; case Distance2Sub -> distance2 - distance - 1; @@ -1789,7 +1789,7 @@ public void GradientPerturbFractal(Vector3f v3) { SingleGradientPerturb(seed, amp, m_frequency, v3); - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { freq *= m_lacunarity; amp *= m_gain; SingleGradientPerturb(++seed, amp, freq, v3); @@ -1809,7 +1809,7 @@ private void SingleGradientPerturb(long seed, double perturbAmp, double frequenc long z1 = z0 + 1; double xs = 0, ys = 0, zs = 0; - switch(m_longerp) { + switch (m_longerp) { case Linear -> { xs = xf - x0; ys = yf - y0; @@ -1875,7 +1875,7 @@ public void GradientPerturbFractal(Vector2f v2) { SingleGradientPerturb(seed, amp, m_frequency, v2); - for(long i = 1; i < m_octaves; i++) { + for (long i = 1; i < m_octaves; i++) { freq *= m_lacunarity; amp *= m_gain; SingleGradientPerturb(++seed, amp, freq, v2); @@ -1892,7 +1892,7 @@ private void SingleGradientPerturb(long seed, double perturbAmp, double frequenc long y1 = y0 + 1; double xs = 0, ys = 0; - switch(m_longerp) { + switch (m_longerp) { case Linear -> { xs = xf - x0; ys = yf - y0; diff --git a/src/main/java/com/volmit/iris/util/noise/InterpolatedNoise.java b/src/main/java/com/volmit/iris/util/noise/InterpolatedNoise.java index a4d7d10fe..f146fa483 100644 --- a/src/main/java/com/volmit/iris/util/noise/InterpolatedNoise.java +++ b/src/main/java/com/volmit/iris/util/noise/InterpolatedNoise.java @@ -44,7 +44,7 @@ public double noise(double x, double z) { @Override public double noise(double x, double y, double z) { - if(z == 0) { + if (z == 0) { return noise(x, y); } diff --git a/src/main/java/com/volmit/iris/util/noise/PerlinNoise.java b/src/main/java/com/volmit/iris/util/noise/PerlinNoise.java index aca2e1efd..7681f99c5 100644 --- a/src/main/java/com/volmit/iris/util/noise/PerlinNoise.java +++ b/src/main/java/com/volmit/iris/util/noise/PerlinNoise.java @@ -35,7 +35,7 @@ public double f(double v) { @Override public double noise(double x) { - if(octaves <= 1) { + if (octaves <= 1) { return f(n.GetPerlin(x, 0)); } @@ -43,7 +43,7 @@ public double noise(double x) { double m = 0; double v = 0; - for(int i = 0; i < octaves; i++) { + for (int i = 0; i < octaves; i++) { v += n.GetPerlin((x * (f == 1 ? f++ : (f *= 2))), 0) * f; m += f; } @@ -53,14 +53,14 @@ public double noise(double x) { @Override public double noise(double x, double z) { - if(octaves <= 1) { + if (octaves <= 1) { return f(n.GetPerlin(x, z)); } double f = 1; double m = 0; double v = 0; - for(int i = 0; i < octaves; i++) { + for (int i = 0; i < octaves; i++) { f = f == 1 ? f + 1 : f * 2; v += n.GetPerlin((x * f), (z * f)) * f; m += f; @@ -71,14 +71,14 @@ public double noise(double x, double z) { @Override public double noise(double x, double y, double z) { - if(octaves <= 1) { + if (octaves <= 1) { return f(n.GetPerlin(x, y, z)); } double f = 1; double m = 0; double v = 0; - for(int i = 0; i < octaves; i++) { + for (int i = 0; i < octaves; i++) { f = f == 1 ? f + 1 : f * 2; v += n.GetPerlin((x * f), (y * f), (z * f)) * f; m += f; diff --git a/src/main/java/com/volmit/iris/util/noise/RarityCellGenerator.java b/src/main/java/com/volmit/iris/util/noise/RarityCellGenerator.java index 42f631e69..268f2bfde 100644 --- a/src/main/java/com/volmit/iris/util/noise/RarityCellGenerator.java +++ b/src/main/java/com/volmit/iris/util/noise/RarityCellGenerator.java @@ -28,29 +28,29 @@ public RarityCellGenerator(RNG rng) { } public T get(double x, double z, KList b) { - if(b.size() == 0) { + if (b.size() == 0) { return null; } - if(b.size() == 1) { + if (b.size() == 1) { return b.get(0); } KList rarityMapped = new KList<>(); boolean o = false; int max = 1; - for(T i : b) { - if(i.getRarity() > max) { + for (T i : b) { + if (i.getRarity() > max) { max = i.getRarity(); } } max++; - for(T i : b) { - for(int j = 0; j < max - i.getRarity(); j++) { + for (T i : b) { + for (int j = 0; j < max - i.getRarity(); j++) { //noinspection AssignmentUsedAsCondition - if(o = !o) { + if (o = !o) { rarityMapped.add(i); } else { rarityMapped.add(0, i); @@ -58,11 +58,11 @@ public T get(double x, double z, KList b) { } } - if(rarityMapped.size() == 1) { + if (rarityMapped.size() == 1) { return rarityMapped.get(0); } - if(rarityMapped.isEmpty()) { + if (rarityMapped.isEmpty()) { throw new RuntimeException("BAD RARITY MAP! RELATED TO: " + b.toString(", or possibly ")); } diff --git a/src/main/java/com/volmit/iris/util/noise/SimplexNoise.java b/src/main/java/com/volmit/iris/util/noise/SimplexNoise.java index 71f39b89f..5ad097b4f 100644 --- a/src/main/java/com/volmit/iris/util/noise/SimplexNoise.java +++ b/src/main/java/com/volmit/iris/util/noise/SimplexNoise.java @@ -35,7 +35,7 @@ public double f(double v) { @Override public double noise(double x) { - if(octaves <= 1) { + if (octaves <= 1) { return f(n.GetSimplex(x, 0d)); } @@ -43,7 +43,7 @@ public double noise(double x) { double m = 0; double v = 0; - for(int i = 0; i < octaves; i++) { + for (int i = 0; i < octaves; i++) { v += n.GetSimplex((x * (f == 1 ? f++ : (f *= 2))), 0d) * f; m += f; } @@ -53,14 +53,14 @@ public double noise(double x) { @Override public double noise(double x, double z) { - if(octaves <= 1) { + if (octaves <= 1) { return f(n.GetSimplex(x, z)); } double f = 1; double m = 0; double v = 0; - for(int i = 0; i < octaves; i++) { + for (int i = 0; i < octaves; i++) { f = f == 1 ? f + 1 : f * 2; v += n.GetSimplex((x * f), (z * f)) * f; m += f; @@ -71,14 +71,14 @@ public double noise(double x, double z) { @Override public double noise(double x, double y, double z) { - if(octaves <= 1) { + if (octaves <= 1) { return f(n.GetSimplex(x, y, z)); } double f = 1; double m = 0; double v = 0; - for(int i = 0; i < octaves; i++) { + for (int i = 0; i < octaves; i++) { f = f == 1 ? f + 1 : f * 2; v += n.GetSimplex((x * f), (y * f), (z * f)) * f; m += f; diff --git a/src/main/java/com/volmit/iris/util/parallel/BurstExecutor.java b/src/main/java/com/volmit/iris/util/parallel/BurstExecutor.java index ffb4cf5ad..dc512a9f3 100644 --- a/src/main/java/com/volmit/iris/util/parallel/BurstExecutor.java +++ b/src/main/java/com/volmit/iris/util/parallel/BurstExecutor.java @@ -44,12 +44,12 @@ public BurstExecutor(ExecutorService executor, int burstSizeEstimate) { @SuppressWarnings("UnusedReturnValue") public Future queue(Runnable r) { - if(!multicore) { + if (!multicore) { r.run(); return CompletableFuture.completedFuture(null); } - synchronized(futures) { + synchronized (futures) { Future c = executor.submit(r); futures.add(c); @@ -58,16 +58,16 @@ public Future queue(Runnable r) { } public BurstExecutor queue(List r) { - if(!multicore) { - for(Runnable i : new KList<>(r)) { + if (!multicore) { + for (Runnable i : new KList<>(r)) { i.run(); } return this; } - synchronized(futures) { - for(Runnable i : new KList<>(r)) { + synchronized (futures) { + for (Runnable i : new KList<>(r)) { queue(i); } } @@ -76,16 +76,16 @@ public BurstExecutor queue(List r) { } public BurstExecutor queue(Runnable[] r) { - if(!multicore) { - for(Runnable i : new KList<>(r)) { + if (!multicore) { + for (Runnable i : new KList<>(r)) { i.run(); } return this; } - synchronized(futures) { - for(Runnable i : r) { + synchronized (futures) { + for (Runnable i : r) { queue(i); } } @@ -94,22 +94,22 @@ public BurstExecutor queue(Runnable[] r) { } public void complete() { - if(!multicore) { + if (!multicore) { return; } - synchronized(futures) { - if(futures.isEmpty()) { + synchronized (futures) { + if (futures.isEmpty()) { return; } try { - for(Future i : futures) { + for (Future i : futures) { i.get(); } futures.clear(); - } catch(InterruptedException | ExecutionException e) { + } catch (InterruptedException | ExecutionException e) { Iris.reportError(e); } } diff --git a/src/main/java/com/volmit/iris/util/parallel/GridLock.java b/src/main/java/com/volmit/iris/util/parallel/GridLock.java index 46735c2b4..1afafe7fe 100644 --- a/src/main/java/com/volmit/iris/util/parallel/GridLock.java +++ b/src/main/java/com/volmit/iris/util/parallel/GridLock.java @@ -82,7 +82,7 @@ public boolean tryLock(int x, int z) { public boolean tryLock(int x, int z, long timeout) { try { return locks.get(x, 0, z).tryLock(timeout, TimeUnit.MILLISECONDS); - } catch(InterruptedException e) { + } catch (InterruptedException e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/util/parallel/HyperLock.java b/src/main/java/com/volmit/iris/util/parallel/HyperLock.java index ac7d62cdf..c40294552 100644 --- a/src/main/java/com/volmit/iris/util/parallel/HyperLock.java +++ b/src/main/java/com/volmit/iris/util/parallel/HyperLock.java @@ -45,15 +45,15 @@ public HyperLock(int capacity) { public HyperLock(int capacity, boolean fair) { this.fair = fair; locks = new ConcurrentLinkedHashMap.Builder() - .initialCapacity(capacity) - .maximumWeightedCapacity(capacity) - .listener((k, v) -> { - if(v.isLocked() || v.isHeldByCurrentThread()) { - Iris.warn("InfiniLock Eviction of " + k + " still has locks on it!"); - } - }) - .concurrencyLevel(32) - .build(); + .initialCapacity(capacity) + .maximumWeightedCapacity(capacity) + .listener((k, v) -> { + if (v.isLocked() || v.isHeldByCurrentThread()) { + Iris.warn("InfiniLock Eviction of " + k + " still has locks on it!"); + } + }) + .concurrencyLevel(32) + .build(); } public void with(int x, int z, Runnable r) { @@ -73,12 +73,12 @@ public void withNasty(int x, int z, NastyRunnable r) throws Throwable { Throwable ee = null; try { r.run(); - } catch(Throwable e) { + } catch (Throwable e) { ee = e; } finally { unlock(x, z); - if(ee != null) { + if (ee != null) { throw ee; } } @@ -89,12 +89,12 @@ public void withIO(int x, int z, IORunnable r) throws IOException { IOException ee = null; try { r.run(); - } catch(IOException e) { + } catch (IOException e) { ee = e; } finally { unlock(x, z); - if(ee != null) { + if (ee != null) { throw ee; } } @@ -114,7 +114,7 @@ public boolean tryLock(int x, int z) { public boolean tryLock(int x, int z, long timeout) { try { return getLock(x, z).tryLock(timeout, TimeUnit.MILLISECONDS); - } catch(InterruptedException e) { + } catch (InterruptedException e) { Iris.reportError(e); } @@ -126,7 +126,7 @@ private ReentrantLock getLock(int x, int z) { } public void lock(int x, int z) { - if(!enabled) { + if (!enabled) { return; } @@ -134,7 +134,7 @@ public void lock(int x, int z) { } public void unlock(int x, int z) { - if(!enabled) { + if (!enabled) { return; } diff --git a/src/main/java/com/volmit/iris/util/parallel/MultiBurst.java b/src/main/java/com/volmit/iris/util/parallel/MultiBurst.java index a7b017c83..cf840572e 100644 --- a/src/main/java/com/volmit/iris/util/parallel/MultiBurst.java +++ b/src/main/java/com/volmit/iris/util/parallel/MultiBurst.java @@ -49,20 +49,20 @@ public MultiBurst(String name, int priority) { private synchronized ExecutorService getService() { last.set(M.ms()); - if(service == null || service.isShutdown()) { + if (service == null || service.isShutdown()) { service = new ForkJoinPool(IrisSettings.getThreadCount(IrisSettings.get().getConcurrency().getParallelism()), - new ForkJoinPool.ForkJoinWorkerThreadFactory() { - int m = 0; - - @Override - public ForkJoinWorkerThread newThread(ForkJoinPool pool) { - final ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); - worker.setPriority(priority); - worker.setName(name + " " + ++m); - return worker; - } - }, - (t, e) -> e.printStackTrace(), true); + new ForkJoinPool.ForkJoinWorkerThreadFactory() { + int m = 0; + + @Override + public ForkJoinWorkerThread newThread(ForkJoinPool pool) { + final ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); + worker.setPriority(priority); + worker.setName(name + " " + ++m); + return worker; + } + }, + (t, e) -> e.printStackTrace(), true); } return service; @@ -73,7 +73,7 @@ public void burst(Runnable... r) { } public void burst(boolean multicore, Runnable... r) { - if(multicore) { + if (multicore) { burst(r); } else { sync(r); @@ -85,7 +85,7 @@ public void burst(List r) { } public void burst(boolean multicore, List r) { - if(multicore) { + if (multicore) { burst(r); } else { sync(r); @@ -93,19 +93,19 @@ public void burst(boolean multicore, List r) { } private void sync(List r) { - for(Runnable i : new KList<>(r)) { + for (Runnable i : new KList<>(r)) { i.run(); } } public void sync(Runnable... r) { - for(Runnable i : r) { + for (Runnable i : r) { i.run(); } } public void sync(KList r) { - for(Runnable i : r) { + for (Runnable i : r) { i.run(); } } @@ -145,25 +145,25 @@ public Future completeValue(Callable o) { } public void close() { - if(service != null) { + if (service != null) { service.shutdown(); PrecisionStopwatch p = PrecisionStopwatch.start(); try { - while(!service.awaitTermination(1, TimeUnit.SECONDS)) { + while (!service.awaitTermination(1, TimeUnit.SECONDS)) { Iris.info("Still waiting to shutdown burster..."); - if(p.getMilliseconds() > 7000) { + if (p.getMilliseconds() > 7000) { Iris.warn("Forcing Shutdown..."); try { service.shutdownNow(); - } catch(Throwable e) { + } catch (Throwable e) { } break; } } - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/util/particle/FastParticle.java b/src/main/java/com/volmit/iris/util/particle/FastParticle.java index c05a08035..4052dbdd2 100644 --- a/src/main/java/com/volmit/iris/util/particle/FastParticle.java +++ b/src/main/java/com/volmit/iris/util/particle/FastParticle.java @@ -34,9 +34,9 @@ public final class FastParticle { private static final ParticleSender PARTICLE_SENDER; static { - if(FastReflection.optionalClass("org.bukkit.Particle$DustOptions").isPresent()) { + if (FastReflection.optionalClass("org.bukkit.Particle$DustOptions").isPresent()) { PARTICLE_SENDER = new ParticleSender.ParticleSender1_13(); - } else if(FastReflection.optionalClass("org.bukkit.Particle").isPresent()) { + } else if (FastReflection.optionalClass("org.bukkit.Particle").isPresent()) { PARTICLE_SENDER = new ParticleSender.ParticleSenderImpl(); } else { PARTICLE_SENDER = new ParticleSenderLegacy(); @@ -80,7 +80,7 @@ public static void spawnParticle(World world, ParticleType particle, double x, d public static void spawnParticle(World world, ParticleType particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data) { spawnParticle(world, particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, - offsetZ, data); + offsetZ, data); } public static void spawnParticle(World world, ParticleType particle, double x, double y, double z, int count, @@ -170,7 +170,7 @@ public static void spawnParticle(Player player, ParticleType particle, doubl private static void sendParticle(Object receiver, ParticleType particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, Object data) { - if(!particle.isSupported()) { + if (!particle.isSupported()) { throw new IllegalArgumentException("The particle '" + particle + "' is not compatible with your server version"); } diff --git a/src/main/java/com/volmit/iris/util/particle/FastReflection.java b/src/main/java/com/volmit/iris/util/particle/FastReflection.java index e95f21cf6..ee5994fb6 100644 --- a/src/main/java/com/volmit/iris/util/particle/FastReflection.java +++ b/src/main/java/com/volmit/iris/util/particle/FastReflection.java @@ -66,7 +66,7 @@ public static Optional> obcOptionalClass(String className) { public static Optional> optionalClass(String className) { try { return Optional.of(Class.forName(className)); - } catch(ClassNotFoundException e) { + } catch (ClassNotFoundException e) { Iris.reportError(e); return Optional.empty(); } diff --git a/src/main/java/com/volmit/iris/util/particle/ParticleSender.java b/src/main/java/com/volmit/iris/util/particle/ParticleSender.java index 31e43c6a7..d9ac0a401 100644 --- a/src/main/java/com/volmit/iris/util/particle/ParticleSender.java +++ b/src/main/java/com/volmit/iris/util/particle/ParticleSender.java @@ -51,8 +51,8 @@ class ParticleSenderImpl implements ParticleSender { public void spawnParticle(Object receiver, ParticleType particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, Object data) { Particle bukkitParticle = Particle.valueOf(particle.toString()); - if(data instanceof Color) { - if(particle.getDataType() == Color.class) { + if (data instanceof Color) { + if (particle.getDataType() == Color.class) { Color color = (Color) data; count = 0; offsetX = color(color.getRed()); @@ -63,9 +63,9 @@ public void spawnParticle(Object receiver, ParticleType particle, double x, doub data = null; } - if(receiver instanceof World) { + if (receiver instanceof World) { ((World) receiver).spawnParticle(bukkitParticle, x, y, z, count, offsetX, offsetY, offsetZ, extra, data); - } else if(receiver instanceof Player) { + } else if (receiver instanceof Player) { ((Player) receiver).spawnParticle(bukkitParticle, x, y, z, count, offsetX, offsetY, offsetZ, extra, data); } } @@ -74,7 +74,7 @@ public void spawnParticle(Object receiver, ParticleType particle, double x, doub public Particle getParticle(ParticleType particle) { try { return Particle.valueOf(particle.toString()); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { Iris.reportError(e); return null; } @@ -95,13 +95,13 @@ class ParticleSender1_13 extends ParticleSenderImpl { public void spawnParticle(Object receiver, ParticleType particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, Object data) { Particle bukkitParticle = Particle.valueOf(particle.toString()); - if(bukkitParticle.getDataType() == Particle.DustOptions.class) { - if(data instanceof Color) { + if (bukkitParticle.getDataType() == Particle.DustOptions.class) { + if (data instanceof Color) { data = new Particle.DustOptions((Color) data, 1); - } else if(data == null) { + } else if (data == null) { data = new Particle.DustOptions(Color.RED, 1); } - } else if(bukkitParticle.getDataType() == BlockData.class && data instanceof MaterialData) { + } else if (bukkitParticle.getDataType() == BlockData.class && data instanceof MaterialData) { data = Bukkit.createBlockData(((MaterialData) data).getItemType()); } @@ -110,11 +110,11 @@ public void spawnParticle(Object receiver, ParticleType particle, double x, doub @Override public boolean isValidDataBukkit(Particle particle, Object data) { - if(particle.getDataType() == Particle.DustOptions.class && data instanceof Color) { + if (particle.getDataType() == Particle.DustOptions.class && data instanceof Color) { return true; } - if(particle.getDataType() == BlockData.class && data instanceof MaterialData) { + if (particle.getDataType() == BlockData.class && data instanceof MaterialData) { return true; } diff --git a/src/main/java/com/volmit/iris/util/particle/ParticleSenderLegacy.java b/src/main/java/com/volmit/iris/util/particle/ParticleSenderLegacy.java index 3b46f1e3c..1668de313 100644 --- a/src/main/java/com/volmit/iris/util/particle/ParticleSenderLegacy.java +++ b/src/main/java/com/volmit/iris/util/particle/ParticleSenderLegacy.java @@ -64,25 +64,25 @@ class ParticleSenderLegacy implements ParticleSender { Class craftPlayerClass = FastReflection.obcClass("entity.CraftPlayer"); Class craftWorldClass = FastReflection.obcClass("CraftWorld"); - if(SERVER_IS_1_8) { + if (SERVER_IS_1_8) { PACKET_PARTICLE = packetParticleClass.getConstructor(ENUM_PARTICLE, boolean.class, float.class, - float.class, float.class, float.class, float.class, float.class, float.class, int.class, - int[].class); + float.class, float.class, float.class, float.class, float.class, float.class, int.class, + int[].class); WORLD_SEND_PARTICLE = worldClass.getDeclaredMethod("sendParticles", entityPlayerClass, ENUM_PARTICLE, - boolean.class, double.class, double.class, double.class, int.class, double.class, double.class, - double.class, double.class, int[].class); + boolean.class, double.class, double.class, double.class, int.class, double.class, double.class, + double.class, double.class, int[].class); } else { PACKET_PARTICLE = packetParticleClass.getConstructor(String.class, float.class, float.class, float.class, - float.class, float.class, float.class, float.class, int.class); + float.class, float.class, float.class, float.class, int.class); WORLD_SEND_PARTICLE = worldClass.getDeclaredMethod("a", String.class, double.class, double.class, - double.class, int.class, double.class, double.class, double.class, double.class); + double.class, int.class, double.class, double.class, double.class, double.class); } WORLD_GET_HANDLE = craftWorldClass.getDeclaredMethod("getHandle"); PLAYER_GET_HANDLE = craftPlayerClass.getDeclaredMethod("getHandle"); PLAYER_CONNECTION = playerClass.getField("playerConnection"); SEND_PACKET = playerConnectionClass.getMethod("sendPacket", FastReflection.nmsClass("Packet")); - } catch(ReflectiveOperationException e) { + } catch (ReflectiveOperationException e) { throw new ExceptionInInitializerError(e); } } @@ -93,8 +93,8 @@ public void spawnParticle(Object receiver, ParticleType particle, double x, doub try { int[] datas = toData(particle, data); - if(data instanceof Color) { - if(particle.getDataType() == Color.class) { + if (data instanceof Color) { + if (particle.getDataType() == Color.class) { Color color = (Color) data; count = 0; offsetX = color(color.getRed()); @@ -104,32 +104,32 @@ public void spawnParticle(Object receiver, ParticleType particle, double x, doub } } - if(receiver instanceof World) { + if (receiver instanceof World) { Object worldServer = WORLD_GET_HANDLE.invoke(receiver); - if(SERVER_IS_1_8) { + if (SERVER_IS_1_8) { WORLD_SEND_PARTICLE.invoke(worldServer, null, getEnumParticle(particle), true, x, y, z, count, offsetX, offsetY, offsetZ, extra, datas); } else { String particleName = particle.getLegacyName() + (datas.length != 2 ? "" : "_" + datas[0] + "_" + datas[1]); WORLD_SEND_PARTICLE.invoke(worldServer, particleName, x, y, z, count, offsetX, offsetY, offsetZ, extra); } - } else if(receiver instanceof Player) { + } else if (receiver instanceof Player) { Object packet; - if(SERVER_IS_1_8) { + if (SERVER_IS_1_8) { packet = PACKET_PARTICLE.newInstance(getEnumParticle(particle), true, (float) x, (float) y, - (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count, datas); + (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count, datas); } else { String particleName = particle.getLegacyName() + (datas.length != 2 ? "" : "_" + datas[0] + "_" + datas[1]); packet = PACKET_PARTICLE.newInstance(particleName, (float) x, (float) y, (float) z, - (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); + (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); } Object entityPlayer = PLAYER_GET_HANDLE.invoke(receiver); Object playerConnection = PLAYER_CONNECTION.get(entityPlayer); SEND_PACKET.invoke(playerConnection, packet); } - } catch(ReflectiveOperationException e) { + } catch (ReflectiveOperationException e) { Iris.reportError(e); throw new RuntimeException(e); } @@ -142,13 +142,13 @@ public boolean isValidData(Object particle, Object data) { @Override public Object getParticle(ParticleType particle) { - if(!SERVER_IS_1_8) { + if (!SERVER_IS_1_8) { return particle.getLegacyName(); } try { return getEnumParticle(particle); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { Iris.reportError(e); return null; } @@ -160,23 +160,23 @@ private Object getEnumParticle(ParticleType particleType) { private int[] toData(ParticleType particle, Object data) { Class dataType = particle.getDataType(); - if(dataType == ItemStack.class) { - if(!(data instanceof ItemStack itemStack)) { - return SERVER_IS_1_8 ? new int[2] : new int[] {1, 0}; + if (dataType == ItemStack.class) { + if (!(data instanceof ItemStack itemStack)) { + return SERVER_IS_1_8 ? new int[2] : new int[]{1, 0}; } - return new int[] {itemStack.getType().getId(), itemStack.getDurability()}; + return new int[]{itemStack.getType().getId(), itemStack.getDurability()}; } - if(dataType == MaterialData.class) { - if(!(data instanceof MaterialData materialData)) { - return SERVER_IS_1_8 ? new int[1] : new int[] {1, 0}; + if (dataType == MaterialData.class) { + if (!(data instanceof MaterialData materialData)) { + return SERVER_IS_1_8 ? new int[1] : new int[]{1, 0}; } - if(SERVER_IS_1_8) { - return new int[] {materialData.getItemType().getId() + (materialData.getData() << 12)}; + if (SERVER_IS_1_8) { + return new int[]{materialData.getItemType().getId() + (materialData.getData() << 12)}; } else { - return new int[] {materialData.getItemType().getId(), materialData.getData()}; + return new int[]{materialData.getItemType().getId(), materialData.getData()}; } } diff --git a/src/main/java/com/volmit/iris/util/particle/ParticleType.java b/src/main/java/com/volmit/iris/util/particle/ParticleType.java index 0cf8425f2..25da1bd75 100644 --- a/src/main/java/com/volmit/iris/util/particle/ParticleType.java +++ b/src/main/java/com/volmit/iris/util/particle/ParticleType.java @@ -145,14 +145,14 @@ public enum ParticleType { public static ParticleType getParticle(String particleName) { try { return ParticleType.valueOf(particleName.toUpperCase()); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { Iris.reportError(e); - for(ParticleType particle : values()) { - if(particle.getName().equalsIgnoreCase(particleName)) { + for (ParticleType particle : values()) { + if (particle.getName().equalsIgnoreCase(particleName)) { return particle; } - if(particle.hasLegacyName() && particle.getLegacyName().equalsIgnoreCase(particleName)) { + if (particle.hasLegacyName() && particle.getLegacyName().equalsIgnoreCase(particleName)) { return particle; } } @@ -165,7 +165,7 @@ public boolean hasLegacyName() { } public String getLegacyName() { - if(!hasLegacyName()) { + if (!hasLegacyName()) { throw new IllegalStateException("Particle " + name() + " don't have legacy name"); } return legacyName; @@ -180,11 +180,11 @@ public boolean isSupported() { } public Class getDataType() { - return switch(this) { + return switch (this) { case ITEM_CRACK -> ItemStack.class; case BLOCK_CRACK, BLOCK_DUST, FALLING_DUST -> //noinspection deprecation - MaterialData.class; + MaterialData.class; case REDSTONE -> Color.class; default -> Void.class; }; diff --git a/src/main/java/com/volmit/iris/util/plugin/Chunks.java b/src/main/java/com/volmit/iris/util/plugin/Chunks.java index 41322880e..f6454dafd 100644 --- a/src/main/java/com/volmit/iris/util/plugin/Chunks.java +++ b/src/main/java/com/volmit/iris/util/plugin/Chunks.java @@ -25,14 +25,14 @@ public class Chunks { public static boolean isSafe(World w, int x, int z) { return w.isChunkLoaded(x, z) - && w.isChunkLoaded(x + 1, z) - && w.isChunkLoaded(x, z + 1) - && w.isChunkLoaded(x - 1, z) - && w.isChunkLoaded(x, z - 1) - && w.isChunkLoaded(x - 1, z - 1) - && w.isChunkLoaded(x + 1, z + 1) - && w.isChunkLoaded(x + 1, z - 1) - && w.isChunkLoaded(x - 1, z + 1); + && w.isChunkLoaded(x + 1, z) + && w.isChunkLoaded(x, z + 1) + && w.isChunkLoaded(x - 1, z) + && w.isChunkLoaded(x, z - 1) + && w.isChunkLoaded(x - 1, z - 1) + && w.isChunkLoaded(x + 1, z + 1) + && w.isChunkLoaded(x + 1, z - 1) + && w.isChunkLoaded(x - 1, z + 1); } public static boolean isSafe(Location l) { @@ -42,7 +42,7 @@ public static boolean isSafe(Location l) { public static boolean hasPlayersNearby(Location at) { try { return !at.getWorld().getNearbyEntities(at, 32, 32, 32, (i) -> i instanceof Player).isEmpty(); - } catch(Throwable ignored) { + } catch (Throwable ignored) { return false; } } diff --git a/src/main/java/com/volmit/iris/util/plugin/ICommand.java b/src/main/java/com/volmit/iris/util/plugin/ICommand.java index 3314ac380..067198766 100644 --- a/src/main/java/com/volmit/iris/util/plugin/ICommand.java +++ b/src/main/java/com/volmit/iris/util/plugin/ICommand.java @@ -52,8 +52,7 @@ public interface ICommand { /** * Add a node to this command * - * @param node - * the node + * @param node the node */ void addNode(String node); @@ -61,10 +60,8 @@ public interface ICommand { * Handle a command. If this is a subcommand, parameters after the subcommand * will be adapted in args for you * - * @param sender - * the volume sender (pre-tagged) - * @param args - * the arguments after this command node + * @param sender the volume sender (pre-tagged) + * @param args the arguments after this command node * @return return true to mark it as handled */ boolean handle(VolmitSender sender, String[] args); diff --git a/src/main/java/com/volmit/iris/util/plugin/Metrics.java b/src/main/java/com/volmit/iris/util/plugin/Metrics.java index ad2969008..6b02d0c72 100644 --- a/src/main/java/com/volmit/iris/util/plugin/Metrics.java +++ b/src/main/java/com/volmit/iris/util/plugin/Metrics.java @@ -64,13 +64,13 @@ public class Metrics { static { // You can use the property to disable the check in your test environment - if(System.getProperty("bstats.relocatecheck") == null || !System.getProperty("bstats.relocatecheck").equals("false")) { + if (System.getProperty("bstats.relocatecheck") == null || !System.getProperty("bstats.relocatecheck").equals("false")) { // Maven's Relocate is clever and changes strings, too. So we have to use this little "trick" ... :D final String defaultPackage = new String( - new byte[] {'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's', '.', 'b', 'u', 'k', 'k', 'i', 't'}); - final String examplePackage = new String(new byte[] {'y', 'o', 'u', 'r', '.', 'p', 'a', 'c', 'k', 'a', 'g', 'e'}); + new byte[]{'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's', '.', 'b', 'u', 'k', 'k', 'i', 't'}); + final String examplePackage = new String(new byte[]{'y', 'o', 'u', 'r', '.', 'p', 'a', 'c', 'k', 'a', 'g', 'e'}); // We want to make sure nobody just copy & pastes the example and use the wrong package names - if(Metrics.class.getPackage().getName().equals(defaultPackage) || Metrics.class.getPackage().getName().equals(examplePackage)) { + if (Metrics.class.getPackage().getName().equals(defaultPackage) || Metrics.class.getPackage().getName().equals(examplePackage)) { throw new IllegalStateException("bStats Metrics class has not been relocated correctly!"); } } @@ -90,14 +90,12 @@ public class Metrics { /** * Class constructor. * - * @param plugin - * The plugin which stats should be submitted. - * @param pluginId - * The id of the plugin. - * It can be found at What is my plugin id? + * @param plugin The plugin which stats should be submitted. + * @param pluginId The id of the plugin. + * It can be found at What is my plugin id? */ public Metrics(Plugin plugin, int pluginId) { - if(plugin == null) { + if (plugin == null) { throw new IllegalArgumentException("Plugin cannot be null!"); } this.plugin = plugin; @@ -109,7 +107,7 @@ public Metrics(Plugin plugin, int pluginId) { YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile); // Check if the config file exists - if(!config.isSet("serverUuid")) { + if (!config.isSet("serverUuid")) { // Add default values config.addDefault("enabled", true); @@ -124,15 +122,15 @@ public Metrics(Plugin plugin, int pluginId) { // Inform the server owners about bStats config.options().header( - """ - bStats collects some data for plugin authors like how many servers are using their plugins. - To honor their work, you should not disable it. - This has nearly no effect on the server performance! - Check out https://bStats.org/ to learn more :)""" + """ + bStats collects some data for plugin authors like how many servers are using their plugins. + To honor their work, you should not disable it. + This has nearly no effect on the server performance! + Check out https://bStats.org/ to learn more :)""" ).copyDefaults(true); try { config.save(configFile); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } } @@ -144,21 +142,21 @@ public Metrics(Plugin plugin, int pluginId) { logSentData = config.getBoolean("logSentData", false); logResponseStatusText = config.getBoolean("logResponseStatusText", false); - if(enabled) { + if (enabled) { boolean found = false; // Search for all other bStats Metrics classes to see if we are the first one - for(Class service : Bukkit.getServicesManager().getKnownServices()) { + for (Class service : Bukkit.getServicesManager().getKnownServices()) { try { service.getField("B_STATS_VERSION"); // Our identifier :) found = true; // We aren't the first break; - } catch(NoSuchFieldException e) { + } catch (NoSuchFieldException e) { Iris.reportError(e); } } // Register our service Bukkit.getServicesManager().register(Metrics.class, this, plugin, ServicePriority.Normal); - if(!found) { + if (!found) { // We are the first! startSubmitting(); } @@ -168,21 +166,18 @@ public Metrics(Plugin plugin, int pluginId) { /** * Sends the data to the bStats server. * - * @param plugin - * Any plugin. It's just used to get a logger instance. - * @param data - * The data to send. - * @throws Exception - * If the request failed. + * @param plugin Any plugin. It's just used to get a logger instance. + * @param data The data to send. + * @throws Exception If the request failed. */ private static void sendData(Plugin plugin, JsonObject data) throws Exception { - if(data == null) { + if (data == null) { throw new IllegalArgumentException("Data cannot be null!"); } - if(Bukkit.isPrimaryThread()) { + if (Bukkit.isPrimaryThread()) { throw new IllegalAccessException("This method must not be called from the main thread!"); } - if(logSentData) { + if (logSentData) { plugin.getLogger().info("Sending data to bStats: " + data); } HttpsURLConnection connection = (HttpsURLConnection) new URL(URL).openConnection(); @@ -201,19 +196,19 @@ private static void sendData(Plugin plugin, JsonObject data) throws Exception { // Send data connection.setDoOutput(true); - try(DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) { + try (DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) { outputStream.write(compressedData); } StringBuilder builder = new StringBuilder(); - try(BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { + try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { String line; - while((line = bufferedReader.readLine()) != null) { + while ((line = bufferedReader.readLine()) != null) { builder.append(line); } } - if(logResponseStatusText) { + if (logResponseStatusText) { plugin.getLogger().info("Sent data to bStats and received response: " + builder); } } @@ -221,18 +216,16 @@ private static void sendData(Plugin plugin, JsonObject data) throws Exception { /** * Gzips the given String. * - * @param str - * The string to gzip. + * @param str The string to gzip. * @return The gzipped String. - * @throws IOException - * If the compression failed. + * @throws IOException If the compression failed. */ private static byte[] compress(final String str) throws IOException { - if(str == null) { + if (str == null) { return null; } ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - try(GZIPOutputStream gzip = new GZIPOutputStream(outputStream)) { + try (GZIPOutputStream gzip = new GZIPOutputStream(outputStream)) { gzip.write(str.getBytes(StandardCharsets.UTF_8)); } return outputStream.toByteArray(); @@ -250,11 +243,10 @@ public boolean isEnabled() { /** * Adds a custom chart. * - * @param chart - * The chart to add. + * @param chart The chart to add. */ public void addCustomChart(CustomChart chart) { - if(chart == null) { + if (chart == null) { throw new IllegalArgumentException("Chart cannot be null!"); } charts.add(chart); @@ -268,7 +260,7 @@ private void startSubmitting() { timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { - if(!plugin.isEnabled()) { // Plugin was disabled + if (!plugin.isEnabled()) { // Plugin was disabled timer.cancel(); return; } @@ -298,10 +290,10 @@ public JsonObject getPluginData() { data.addProperty("id", pluginId); // Append the id of the plugin data.addProperty("pluginVersion", pluginVersion); // Append the version of the plugin JsonArray customCharts = new JsonArray(); - for(CustomChart customChart : charts) { + for (CustomChart customChart : charts) { // Add the data of the custom charts JsonObject chart = customChart.getRequestJsonObject(); - if(chart == null) { // If the chart is null, we skip it + if (chart == null) { // If the chart is null, we skip it continue; } customCharts.add(chart); @@ -324,9 +316,9 @@ private JsonObject getServerData() { // This fixes java.lang.NoSuchMethodError: org.bukkit.Bukkit.getOnlinePlayers()Ljava/util/Collection; Method onlinePlayersMethod = Class.forName("org.bukkit.Server").getMethod("getOnlinePlayers"); playerAmount = onlinePlayersMethod.getReturnType().equals(Collection.class) - ? ((Collection) onlinePlayersMethod.invoke(Bukkit.getServer())).size() - : ((Player[]) onlinePlayersMethod.invoke(Bukkit.getServer())).length; - } catch(Exception e) { + ? ((Collection) onlinePlayersMethod.invoke(Bukkit.getServer())).size() + : ((Player[]) onlinePlayersMethod.invoke(Bukkit.getServer())).length; + } catch (Exception e) { Iris.reportError(e); playerAmount = Bukkit.getOnlinePlayers().size(); // Just use the new method if the Reflection failed } @@ -367,39 +359,40 @@ private void submitData() { JsonArray pluginData = new JsonArray(); // Search for all other bStats Metrics classes to get their plugin data - for(Class service : Bukkit.getServicesManager().getKnownServices()) { + for (Class service : Bukkit.getServicesManager().getKnownServices()) { try { service.getField("B_STATS_VERSION"); // Our identifier :) - for(RegisteredServiceProvider provider : Bukkit.getServicesManager().getRegistrations(service)) { + for (RegisteredServiceProvider provider : Bukkit.getServicesManager().getRegistrations(service)) { try { Object plugin = provider.getService().getMethod("getPluginData").invoke(provider.getProvider()); - if(plugin instanceof JsonObject) { + if (plugin instanceof JsonObject) { pluginData.add((JsonObject) plugin); } else { // old bstats version compatibility try { Class jsonObjectJsonSimple = Class.forName("org.json.simple.JSONObject"); - if(plugin.getClass().isAssignableFrom(jsonObjectJsonSimple)) { + if (plugin.getClass().isAssignableFrom(jsonObjectJsonSimple)) { Method jsonStringGetter = jsonObjectJsonSimple.getDeclaredMethod("toJSONString"); jsonStringGetter.setAccessible(true); String jsonString = (String) jsonStringGetter.invoke(plugin); JsonObject object = new JsonParser().parse(jsonString).getAsJsonObject(); pluginData.add(object); } - } catch(ClassNotFoundException e) { + } catch (ClassNotFoundException e) { Iris.reportError(e); // minecraft version 1.14+ - if(logFailedRequests) { + if (logFailedRequests) { this.plugin.getLogger().log(Level.SEVERE, "Encountered unexpected exception", e); } } } - } catch(NullPointerException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) { + } catch (NullPointerException | NoSuchMethodException | IllegalAccessException | + InvocationTargetException ignored) { Iris.reportError(ignored); } } - } catch(NoSuchFieldException e) { + } catch (NoSuchFieldException e) { Iris.reportError(e); } } @@ -411,10 +404,10 @@ private void submitData() { try { // Send the data sendData(plugin, data); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); // Something went wrong! :( - if(logFailedRequests) { + if (logFailedRequests) { plugin.getLogger().log(Level.WARNING, "Could not submit plugin stats of " + plugin.getName(), e); } } @@ -432,11 +425,10 @@ public static abstract class CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. + * @param chartId The id of the chart. */ CustomChart(String chartId) { - if(chartId == null || chartId.isEmpty()) { + if (chartId == null || chartId.isEmpty()) { throw new IllegalArgumentException("ChartId cannot be null or empty!"); } this.chartId = chartId; @@ -447,14 +439,14 @@ private JsonObject getRequestJsonObject() { chart.addProperty("chartId", chartId); try { JsonObject data = getChartData(); - if(data == null) { + if (data == null) { // If the data is null we don't send the chart. return null; } chart.add("data", data); - } catch(Throwable t) { + } catch (Throwable t) { Iris.reportError(t); - if(logFailedRequests) { + if (logFailedRequests) { Bukkit.getLogger().log(Level.WARNING, "Failed to get data for custom chart with id " + chartId, t); } return null; @@ -476,10 +468,8 @@ public static class SimplePie extends CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. - * @param callable - * The callable which is used to request the chart data. + * @param chartId The id of the chart. + * @param callable The callable which is used to request the chart data. */ public SimplePie(String chartId, Callable callable) { super(chartId); @@ -490,7 +480,7 @@ public SimplePie(String chartId, Callable callable) { protected JsonObject getChartData() throws Exception { JsonObject data = new JsonObject(); String value = callable.call(); - if(value == null || value.isEmpty()) { + if (value == null || value.isEmpty()) { // Null = skip the chart return null; } @@ -509,10 +499,8 @@ public static class AdvancedPie extends CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. - * @param callable - * The callable which is used to request the chart data. + * @param chartId The id of the chart. + * @param callable The callable which is used to request the chart data. */ public AdvancedPie(String chartId, Callable> callable) { super(chartId); @@ -524,19 +512,19 @@ protected JsonObject getChartData() throws Exception { JsonObject data = new JsonObject(); JsonObject values = new JsonObject(); Map map = callable.call(); - if(map == null || map.isEmpty()) { + if (map == null || map.isEmpty()) { // Null = skip the chart return null; } boolean allSkipped = true; - for(Map.Entry entry : map.entrySet()) { - if(entry.getValue() == 0) { + for (Map.Entry entry : map.entrySet()) { + if (entry.getValue() == 0) { continue; // Skip this invalid } allSkipped = false; values.addProperty(entry.getKey(), entry.getValue()); } - if(allSkipped) { + if (allSkipped) { // Null = skip the chart return null; } @@ -555,10 +543,8 @@ public static class DrilldownPie extends CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. - * @param callable - * The callable which is used to request the chart data. + * @param chartId The id of the chart. + * @param callable The callable which is used to request the chart data. */ public DrilldownPie(String chartId, Callable>> callable) { super(chartId); @@ -570,24 +556,24 @@ public JsonObject getChartData() throws Exception { JsonObject data = new JsonObject(); JsonObject values = new JsonObject(); Map> map = callable.call(); - if(map == null || map.isEmpty()) { + if (map == null || map.isEmpty()) { // Null = skip the chart return null; } boolean reallyAllSkipped = true; - for(Map.Entry> entryValues : map.entrySet()) { + for (Map.Entry> entryValues : map.entrySet()) { JsonObject value = new JsonObject(); boolean allSkipped = true; - for(Map.Entry valueEntry : map.get(entryValues.getKey()).entrySet()) { + for (Map.Entry valueEntry : map.get(entryValues.getKey()).entrySet()) { value.addProperty(valueEntry.getKey(), valueEntry.getValue()); allSkipped = false; } - if(!allSkipped) { + if (!allSkipped) { reallyAllSkipped = false; values.add(entryValues.getKey(), value); } } - if(reallyAllSkipped) { + if (reallyAllSkipped) { // Null = skip the chart return null; } @@ -606,10 +592,8 @@ public static class SingleLineChart extends CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. - * @param callable - * The callable which is used to request the chart data. + * @param chartId The id of the chart. + * @param callable The callable which is used to request the chart data. */ public SingleLineChart(String chartId, Callable callable) { super(chartId); @@ -620,7 +604,7 @@ public SingleLineChart(String chartId, Callable callable) { protected JsonObject getChartData() throws Exception { JsonObject data = new JsonObject(); int value = callable.call(); - if(value == 0) { + if (value == 0) { // Null = skip the chart return null; } @@ -640,10 +624,8 @@ public static class MultiLineChart extends CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. - * @param callable - * The callable which is used to request the chart data. + * @param chartId The id of the chart. + * @param callable The callable which is used to request the chart data. */ public MultiLineChart(String chartId, Callable> callable) { super(chartId); @@ -655,19 +637,19 @@ protected JsonObject getChartData() throws Exception { JsonObject data = new JsonObject(); JsonObject values = new JsonObject(); Map map = callable.call(); - if(map == null || map.isEmpty()) { + if (map == null || map.isEmpty()) { // Null = skip the chart return null; } boolean allSkipped = true; - for(Map.Entry entry : map.entrySet()) { - if(entry.getValue() == 0) { + for (Map.Entry entry : map.entrySet()) { + if (entry.getValue() == 0) { continue; // Skip this invalid } allSkipped = false; values.addProperty(entry.getKey(), entry.getValue()); } - if(allSkipped) { + if (allSkipped) { // Null = skip the chart return null; } @@ -687,10 +669,8 @@ public static class SimpleBarChart extends CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. - * @param callable - * The callable which is used to request the chart data. + * @param chartId The id of the chart. + * @param callable The callable which is used to request the chart data. */ public SimpleBarChart(String chartId, Callable> callable) { super(chartId); @@ -702,11 +682,11 @@ protected JsonObject getChartData() throws Exception { JsonObject data = new JsonObject(); JsonObject values = new JsonObject(); Map map = callable.call(); - if(map == null || map.isEmpty()) { + if (map == null || map.isEmpty()) { // Null = skip the chart return null; } - for(Map.Entry entry : map.entrySet()) { + for (Map.Entry entry : map.entrySet()) { JsonArray categoryValues = new JsonArray(); categoryValues.add(new JsonPrimitive(entry.getValue())); values.add(entry.getKey(), categoryValues); @@ -727,10 +707,8 @@ public static class AdvancedBarChart extends CustomChart { /** * Class constructor. * - * @param chartId - * The id of the chart. - * @param callable - * The callable which is used to request the chart data. + * @param chartId The id of the chart. + * @param callable The callable which is used to request the chart data. */ public AdvancedBarChart(String chartId, Callable> callable) { super(chartId); @@ -742,23 +720,23 @@ protected JsonObject getChartData() throws Exception { JsonObject data = new JsonObject(); JsonObject values = new JsonObject(); Map map = callable.call(); - if(map == null || map.isEmpty()) { + if (map == null || map.isEmpty()) { // Null = skip the chart return null; } boolean allSkipped = true; - for(Map.Entry entry : map.entrySet()) { - if(entry.getValue().length == 0) { + for (Map.Entry entry : map.entrySet()) { + if (entry.getValue().length == 0) { continue; // Skip this invalid } allSkipped = false; JsonArray categoryValues = new JsonArray(); - for(int categoryValue : entry.getValue()) { + for (int categoryValue : entry.getValue()) { categoryValues.add(new JsonPrimitive(categoryValue)); } values.add(entry.getKey(), categoryValues); } - if(allSkipped) { + if (allSkipped) { // Null = skip the chart return null; } diff --git a/src/main/java/com/volmit/iris/util/plugin/MetricsLite.java b/src/main/java/com/volmit/iris/util/plugin/MetricsLite.java index bf8c51fa1..7ffe47200 100644 --- a/src/main/java/com/volmit/iris/util/plugin/MetricsLite.java +++ b/src/main/java/com/volmit/iris/util/plugin/MetricsLite.java @@ -64,14 +64,14 @@ public class MetricsLite { static { // You can use the property to disable the check in your test environment - if(System.getProperty("bstats.relocatecheck") == null || !System.getProperty("bstats.relocatecheck").equals("false")) { + if (System.getProperty("bstats.relocatecheck") == null || !System.getProperty("bstats.relocatecheck").equals("false")) { // Maven's Relocate is clever and changes strings, too. So we have to use this // little "trick" ... :D - final String defaultPackage = new String(new byte[] {'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's', '.', 'b', 'u', 'k', 'k', 'i', 't'}); - final String examplePackage = new String(new byte[] {'y', 'o', 'u', 'r', '.', 'p', 'a', 'c', 'k', 'a', 'g', 'e'}); + final String defaultPackage = new String(new byte[]{'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's', '.', 'b', 'u', 'k', 'k', 'i', 't'}); + final String examplePackage = new String(new byte[]{'y', 'o', 'u', 'r', '.', 'p', 'a', 'c', 'k', 'a', 'g', 'e'}); // We want to make sure nobody just copy & pastes the example and use the wrong // package names - if(MetricsLite.class.getPackage().getName().equals(defaultPackage) || MetricsLite.class.getPackage().getName().equals(examplePackage)) { + if (MetricsLite.class.getPackage().getName().equals(defaultPackage) || MetricsLite.class.getPackage().getName().equals(examplePackage)) { throw new IllegalStateException("bStats Metrics class has not been relocated correctly!"); } } @@ -88,15 +88,13 @@ public class MetricsLite { /** * Class constructor. * - * @param plugin - * The plugin which stats should be submitted. - * @param pluginId - * The id of the plugin. It can be found at - * What is my - * plugin id? + * @param plugin The plugin which stats should be submitted. + * @param pluginId The id of the plugin. It can be found at + * What is my + * plugin id? */ public MetricsLite(Plugin plugin, int pluginId) { - if(plugin == null) { + if (plugin == null) { throw new IllegalArgumentException("Plugin cannot be null!"); } this.plugin = plugin; @@ -108,7 +106,7 @@ public MetricsLite(Plugin plugin, int pluginId) { YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile); // Check if the config file exists - if(!config.isSet("serverUuid")) { + if (!config.isSet("serverUuid")) { // Add default values config.addDefault("enabled", true); @@ -123,13 +121,13 @@ public MetricsLite(Plugin plugin, int pluginId) { // Inform the server owners about bStats config.options().header(""" - bStats collects some data for plugin authors like how many servers are using their plugins. - To honor their work, you should not disable it. - This has nearly no effect on the server performance! - Check out https://bStats.org/ to learn more :)""").copyDefaults(true); + bStats collects some data for plugin authors like how many servers are using their plugins. + To honor their work, you should not disable it. + This has nearly no effect on the server performance! + Check out https://bStats.org/ to learn more :)""").copyDefaults(true); try { config.save(configFile); - } catch(IOException e) { + } catch (IOException e) { Iris.reportError(e); } } @@ -140,21 +138,21 @@ public MetricsLite(Plugin plugin, int pluginId) { enabled = config.getBoolean("enabled", true); logSentData = config.getBoolean("logSentData", false); logResponseStatusText = config.getBoolean("logResponseStatusText", false); - if(enabled) { + if (enabled) { boolean found = false; // Search for all other bStats Metrics classes to see if we are the first one - for(Class service : Bukkit.getServicesManager().getKnownServices()) { + for (Class service : Bukkit.getServicesManager().getKnownServices()) { try { service.getField("B_STATS_VERSION"); // Our identifier :) found = true; // We aren't the first break; - } catch(NoSuchFieldException e) { + } catch (NoSuchFieldException e) { Iris.reportError(e); } } // Register our service Bukkit.getServicesManager().register(MetricsLite.class, this, plugin, ServicePriority.Normal); - if(!found) { + if (!found) { // We are the first! startSubmitting(); } @@ -164,21 +162,18 @@ public MetricsLite(Plugin plugin, int pluginId) { /** * Sends the data to the bStats server. * - * @param plugin - * Any plugin. It's just used to get a logger instance. - * @param data - * The data to send. - * @throws Exception - * If the request failed. + * @param plugin Any plugin. It's just used to get a logger instance. + * @param data The data to send. + * @throws Exception If the request failed. */ private static void sendData(Plugin plugin, JsonObject data) throws Exception { - if(data == null) { + if (data == null) { throw new IllegalArgumentException("Data cannot be null!"); } - if(Bukkit.isPrimaryThread()) { + if (Bukkit.isPrimaryThread()) { throw new IllegalAccessException("This method must not be called from the main thread!"); } - if(logSentData) { + if (logSentData) { plugin.getLogger().info("Sending data to bStats: " + data); } HttpsURLConnection connection = (HttpsURLConnection) new URL(URL).openConnection(); @@ -197,19 +192,19 @@ private static void sendData(Plugin plugin, JsonObject data) throws Exception { // Send data connection.setDoOutput(true); - try(DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) { + try (DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) { outputStream.write(compressedData); } StringBuilder builder = new StringBuilder(); - try(BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { + try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { String line; - while((line = bufferedReader.readLine()) != null) { + while ((line = bufferedReader.readLine()) != null) { builder.append(line); } } - if(logResponseStatusText) { + if (logResponseStatusText) { plugin.getLogger().info("Sent data to bStats and received response: " + builder); } } @@ -217,18 +212,16 @@ private static void sendData(Plugin plugin, JsonObject data) throws Exception { /** * Gzips the given String. * - * @param str - * The string to gzip. + * @param str The string to gzip. * @return The gzipped String. - * @throws IOException - * If the compression failed. + * @throws IOException If the compression failed. */ private static byte[] compress(final String str) throws IOException { - if(str == null) { + if (str == null) { return null; } ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - try(GZIPOutputStream gzip = new GZIPOutputStream(outputStream)) { + try (GZIPOutputStream gzip = new GZIPOutputStream(outputStream)) { gzip.write(str.getBytes(StandardCharsets.UTF_8)); } return outputStream.toByteArray(); @@ -251,7 +244,7 @@ private void startSubmitting() { timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { - if(!plugin.isEnabled()) { // Plugin was disabled + if (!plugin.isEnabled()) { // Plugin was disabled timer.cancel(); return; } @@ -302,7 +295,7 @@ private JsonObject getServerData() { // org.bukkit.Bukkit.getOnlinePlayers()Ljava/util/Collection; Method onlinePlayersMethod = Class.forName("org.bukkit.Server").getMethod("getOnlinePlayers"); playerAmount = onlinePlayersMethod.getReturnType().equals(Collection.class) ? ((Collection) onlinePlayersMethod.invoke(Bukkit.getServer())).size() : ((Player[]) onlinePlayersMethod.invoke(Bukkit.getServer())).length; - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); playerAmount = Bukkit.getOnlinePlayers().size(); // Just use the new method if the Reflection failed } @@ -343,38 +336,39 @@ private void submitData() { JsonArray pluginData = new JsonArray(); // Search for all other bStats Metrics classes to get their plugin data - for(Class service : Bukkit.getServicesManager().getKnownServices()) { + for (Class service : Bukkit.getServicesManager().getKnownServices()) { try { service.getField("B_STATS_VERSION"); // Our identifier :) - for(RegisteredServiceProvider provider : Bukkit.getServicesManager().getRegistrations(service)) { + for (RegisteredServiceProvider provider : Bukkit.getServicesManager().getRegistrations(service)) { try { Object plugin = provider.getService().getMethod("getPluginData").invoke(provider.getProvider()); - if(plugin instanceof JsonObject) { + if (plugin instanceof JsonObject) { pluginData.add((JsonObject) plugin); } else { // old bstats version compatibility try { Class jsonObjectJsonSimple = Class.forName("org.json.simple.JSONObject"); - if(plugin.getClass().isAssignableFrom(jsonObjectJsonSimple)) { + if (plugin.getClass().isAssignableFrom(jsonObjectJsonSimple)) { Method jsonStringGetter = jsonObjectJsonSimple.getDeclaredMethod("toJSONString"); jsonStringGetter.setAccessible(true); String jsonString = (String) jsonStringGetter.invoke(plugin); JsonObject object = new JsonParser().parse(jsonString).getAsJsonObject(); pluginData.add(object); } - } catch(ClassNotFoundException e) { + } catch (ClassNotFoundException e) { Iris.reportError(e); // minecraft version 1.14+ - if(logFailedRequests) { + if (logFailedRequests) { this.plugin.getLogger().log(Level.SEVERE, "Encountered unexpected exception ", e); } } } - } catch(NullPointerException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) { + } catch (NullPointerException | NoSuchMethodException | IllegalAccessException | + InvocationTargetException ignored) { Iris.reportError(ignored); } } - } catch(NoSuchFieldException e) { + } catch (NoSuchFieldException e) { Iris.reportError(e); } } @@ -387,10 +381,10 @@ private void submitData() { try { // Send the data sendData(plugin, data); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); // Something went wrong! :( - if(logFailedRequests) { + if (logFailedRequests) { plugin.getLogger().log(Level.WARNING, "Could not submit plugin stats of " + plugin.getName(), e); } } diff --git a/src/main/java/com/volmit/iris/util/plugin/MortarCommand.java b/src/main/java/com/volmit/iris/util/plugin/MortarCommand.java index b7c0c03f1..8e30d0186 100644 --- a/src/main/java/com/volmit/iris/util/plugin/MortarCommand.java +++ b/src/main/java/com/volmit/iris/util/plugin/MortarCommand.java @@ -45,10 +45,8 @@ public abstract class MortarCommand implements ICommand { * Override this with a super constructor as most commands shouldn't change * these parameters * - * @param node - * the node (primary node) i.e. volume - * @param nodes - * the aliases. i.e. v, vol, bile + * @param node the node (primary node) i.e. volume + * @param nodes the aliases. i.e. v, vol, bile */ public MortarCommand(String node, String... nodes) { category = ""; @@ -62,19 +60,19 @@ public MortarCommand(String node, String... nodes) { @Override public KList handleTab(VolmitSender sender, String[] args) { KList v = new KList<>(); - if(args.length == 0) { - for(MortarCommand i : getChildren()) { + if (args.length == 0) { + for (MortarCommand i : getChildren()) { v.add(i.getNode()); } } addTabOptions(sender, args, v); - if(v.isEmpty()) { + if (v.isEmpty()) { return null; } - if(sender.isPlayer() && IrisSettings.get().getGeneral().isCommandSounds()) { + if (sender.isPlayer() && IrisSettings.get().getGeneral().isCommandSounds()) { sender.playSound(Sound.ENTITY_ITEM_FRAME_ROTATE_ITEM, 0.25f, 1.7f); } @@ -86,9 +84,9 @@ public KList handleTab(VolmitSender sender, String[] args) { public void printHelp(VolmitSender sender) { boolean b = false; - for(MortarCommand i : getChildren()) { - for(String j : i.getRequiredPermissions()) { - if(!sender.hasPermission(j)) { + for (MortarCommand i : getChildren()) { + for (String j : i.getRequiredPermissions()) { + if (!sender.hasPermission(j)) { } } @@ -97,11 +95,11 @@ public void printHelp(VolmitSender sender) { sender.sendMessage("" + C.GREEN + i.getNode() + " " + "" + (getArgsUsage().trim().isEmpty() ? "" : (C.WHITE + i.getArgsUsage())) + C.GRAY + " - " + i.getDescription()); } - if(!b) { + if (!b) { sender.sendMessage("There are either no sub-commands or you do not have permission to use them."); } - if(sender.isPlayer() && IrisSettings.get().getGeneral().isCommandSounds()) { + if (sender.isPlayer() && IrisSettings.get().getGeneral().isCommandSounds()) { sender.playSound(Sound.ITEM_BOOK_PAGE_TURN, 0.28f, 1.4f); sender.playSound(Sound.ITEM_AXE_STRIP, 0.35f, 1.7f); } @@ -118,7 +116,7 @@ protected void setDescription(String description) { } protected void requiresPermission(MortarPermission node) { - if(node == null) { + if (node == null) { return; } @@ -126,7 +124,7 @@ protected void requiresPermission(MortarPermission node) { } protected void requiresPermission(String node) { - if(node == null) { + if (node == null) { return; } @@ -134,19 +132,19 @@ protected void requiresPermission(String node) { } public void rejectAny(int past, VolmitSender sender, String[] a) { - if(a.length > past) { + if (a.length > past) { int p = past; StringBuilder m = new StringBuilder(); - for(String i : a) { + for (String i : a) { p--; - if(p < 0) { + if (p < 0) { m.append(i).append(", "); } } - if(!m.toString().trim().isEmpty()) { + if (!m.toString().trim().isEmpty()) { sender.sendMessage("Parameters Ignored: " + m); } } @@ -179,21 +177,22 @@ public KList getChildren() { private KList buildChildren() { KList p = new KList<>(); - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Command.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Command.class)) { try { i.setAccessible(true); MortarCommand pc = (MortarCommand) i.getType().getConstructor().newInstance(); Command c = i.getAnnotation(Command.class); - if(!c.value().trim().isEmpty()) { + if (!c.value().trim().isEmpty()) { pc.setCategory(c.value().trim()); } else { pc.setCategory(getCategory()); } p.add(pc); - } catch(IllegalArgumentException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | InstantiationException | + InvocationTargetException | NoSuchMethodException | SecurityException e) { Iris.reportError(e); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/plugin/MortarPermission.java b/src/main/java/com/volmit/iris/util/plugin/MortarPermission.java index 3789663f5..3466db3c9 100644 --- a/src/main/java/com/volmit/iris/util/plugin/MortarPermission.java +++ b/src/main/java/com/volmit/iris/util/plugin/MortarPermission.java @@ -30,13 +30,14 @@ public abstract class MortarPermission { private MortarPermission parent; public MortarPermission() { - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Permission.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Permission.class)) { try { MortarPermission px = (MortarPermission) i.getType().getConstructor().newInstance(); px.setParent(this); i.set(Modifier.isStatic(i.getModifiers()) ? null : this, px); - } catch(IllegalArgumentException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | InstantiationException | + InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); Iris.reportError(e); } @@ -47,11 +48,11 @@ public MortarPermission() { public KList getChildren() { KList p = new KList<>(); - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Permission.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Permission.class)) { try { p.add((MortarPermission) i.get(Modifier.isStatic(i.getModifiers()) ? null : this)); - } catch(IllegalArgumentException | IllegalAccessException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | SecurityException e) { e.printStackTrace(); Iris.reportError(e); } @@ -62,7 +63,7 @@ public KList getChildren() { } public String getFullNode() { - if(hasParent()) { + if (hasParent()) { return getParent().getFullNode() + "." + getNode(); } diff --git a/src/main/java/com/volmit/iris/util/plugin/PluginRegistry.java b/src/main/java/com/volmit/iris/util/plugin/PluginRegistry.java index f2336a306..a762f2ed9 100644 --- a/src/main/java/com/volmit/iris/util/plugin/PluginRegistry.java +++ b/src/main/java/com/volmit/iris/util/plugin/PluginRegistry.java @@ -38,7 +38,7 @@ public KList getRegistries() { } public T get(String s) { - if(!registry.containsKey(s)) { + if (!registry.containsKey(s)) { return null; } @@ -54,7 +54,7 @@ public void unregister(String s) { } public T resolve(String id) { - if(registry.isEmpty()) { + if (registry.isEmpty()) { return null; } diff --git a/src/main/java/com/volmit/iris/util/plugin/PluginRegistryGroup.java b/src/main/java/com/volmit/iris/util/plugin/PluginRegistryGroup.java index 9ecbe60b2..f6de8db3e 100644 --- a/src/main/java/com/volmit/iris/util/plugin/PluginRegistryGroup.java +++ b/src/main/java/com/volmit/iris/util/plugin/PluginRegistryGroup.java @@ -25,12 +25,12 @@ public class PluginRegistryGroup { private final KMap> registries = new KMap<>(); public T resolve(String namespace, String id) { - if(registries.isEmpty()) { + if (registries.isEmpty()) { return null; } PluginRegistry r = registries.get(namespace); - if(r == null) { + if (r == null) { return null; } @@ -52,8 +52,8 @@ public PluginRegistry getRegistry(String namespace) { public KList compile() { KList l = new KList<>(); registries.values().forEach((i) - -> i.getRegistries().forEach((j) - -> l.add(i.getNamespace() + ":" + j))); + -> i.getRegistries().forEach((j) + -> l.add(i.getNamespace() + ":" + j))); return l; } } diff --git a/src/main/java/com/volmit/iris/util/plugin/RouterCommand.java b/src/main/java/com/volmit/iris/util/plugin/RouterCommand.java index 91c71b6db..e412a3ddc 100644 --- a/src/main/java/com/volmit/iris/util/plugin/RouterCommand.java +++ b/src/main/java/com/volmit/iris/util/plugin/RouterCommand.java @@ -34,10 +34,8 @@ public class RouterCommand extends org.bukkit.command.Command { /** * The router command routes commands to bukkit executors * - * @param realCommand - * the real command - * @param ex - * the executor + * @param realCommand the real command + * @param ex the executor */ public RouterCommand(ICommand realCommand, CommandExecutor ex) { super(realCommand.getNode().toLowerCase()); diff --git a/src/main/java/com/volmit/iris/util/plugin/VirtualCommand.java b/src/main/java/com/volmit/iris/util/plugin/VirtualCommand.java index 187f75661..789c88661 100644 --- a/src/main/java/com/volmit/iris/util/plugin/VirtualCommand.java +++ b/src/main/java/com/volmit/iris/util/plugin/VirtualCommand.java @@ -51,14 +51,14 @@ public VirtualCommand(ICommand command, String tag) { children = new KMap<>(); this.tag = tag; - for(Field i : command.getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Command.class)) { + for (Field i : command.getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Command.class)) { try { Command cc = i.getAnnotation(Command.class); ICommand cmd = (ICommand) i.getType().getConstructor().newInstance(); new V(command, true, true).set(i.getName(), cmd); children.put(cmd.getAllNodes(), new VirtualCommand(cmd, cc.value().trim().isEmpty() ? tag : cc.value().trim())); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); e.printStackTrace(); } @@ -86,12 +86,12 @@ public boolean hit(CommandSender sender, KList chain, String label) { VolmitSender vs = new VolmitSender(sender); vs.setTag(tag); - if(label != null) { + if (label != null) { vs.setCommand(label); } - if(chain.isEmpty()) { - if(!checkPermissions(sender, command)) { + if (chain.isEmpty()) { + if (!checkPermissions(sender, command)) { return true; } @@ -100,15 +100,15 @@ public boolean hit(CommandSender sender, KList chain, String label) { String nl = chain.get(0); - for(KList i : children.k()) { - for(String j : i) { - if(j.equalsIgnoreCase(nl)) { + for (KList i : children.k()) { + for (String j : i) { + if (j.equalsIgnoreCase(nl)) { vs.setCommand(chain.get(0)); VirtualCommand cmd = children.get(i); KList c = chain.copy(); c.remove(0); - if(cmd.hit(sender, c, vs.getCommand())) { - if(vs.isPlayer() && IrisSettings.get().getGeneral().isCommandSounds()) { + if (cmd.hit(sender, c, vs.getCommand())) { + if (vs.isPlayer() && IrisSettings.get().getGeneral().isCommandSounds()) { vs.player().getWorld().playSound(vs.player().getLocation(), Sound.ITEM_AXE_STRIP, 0.35f, 1.8f); } @@ -118,7 +118,7 @@ public boolean hit(CommandSender sender, KList chain, String label) { } } - if(!checkPermissions(sender, command)) { + if (!checkPermissions(sender, command)) { return true; } @@ -129,11 +129,11 @@ public KList hitTab(CommandSender sender, KList chain, String la VolmitSender vs = new VolmitSender(sender); vs.setTag(tag); - if(label != null) + if (label != null) vs.setCommand(label); - if(chain.isEmpty()) { - if(!checkPermissions(sender, command)) { + if (chain.isEmpty()) { + if (!checkPermissions(sender, command)) { return null; } @@ -142,22 +142,22 @@ public KList hitTab(CommandSender sender, KList chain, String la String nl = chain.get(0); - for(KList i : children.k()) { - for(String j : i) { - if(j.equalsIgnoreCase(nl)) { + for (KList i : children.k()) { + for (String j : i) { + if (j.equalsIgnoreCase(nl)) { vs.setCommand(chain.get(0)); VirtualCommand cmd = children.get(i); KList c = chain.copy(); c.remove(0); KList v = cmd.hitTab(sender, c, vs.getCommand()); - if(v != null) { + if (v != null) { return v; } } } } - if(!checkPermissions(sender, command)) { + if (!checkPermissions(sender, command)) { return null; } @@ -168,14 +168,14 @@ public KList hitTab(CommandSender sender, KList chain, String la private boolean checkPermissions(CommandSender sender, ICommand command2) { boolean failed = false; - for(String i : command.getRequiredPermissions()) { - if(!sender.hasPermission(i)) { + for (String i : command.getRequiredPermissions()) { + if (!sender.hasPermission(i)) { failed = true; Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, () -> sender.sendMessage("- " + C.WHITE + i), 0); } } - if(failed) { + if (failed) { sender.sendMessage("Insufficient Permissions"); return false; } diff --git a/src/main/java/com/volmit/iris/util/plugin/VolmitPlugin.java b/src/main/java/com/volmit/iris/util/plugin/VolmitPlugin.java index 955369b25..130f8b686 100644 --- a/src/main/java/com/volmit/iris/util/plugin/VolmitPlugin.java +++ b/src/main/java/com/volmit/iris/util/plugin/VolmitPlugin.java @@ -94,7 +94,7 @@ private void outputInfo() { outputPluginInfo(); outputCommandInfo(); outputPermissionInfo(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -103,7 +103,7 @@ private void outputInfo() { private void outputPermissionInfo() throws IOException { FileConfiguration fc = new YamlConfiguration(); - for(MortarPermission i : permissionCache) { + for (MortarPermission i : permissionCache) { chain(i, fc); } @@ -113,7 +113,7 @@ private void outputPermissionInfo() throws IOException { private void chain(MortarPermission i, FileConfiguration fc) { KList ff = new KList<>(); - for(MortarPermission j : i.getChildren()) { + for (MortarPermission j : i.getChildren()) { ff.add(j.getFullNode()); } @@ -121,7 +121,7 @@ private void chain(MortarPermission i, FileConfiguration fc) { fc.set(i.getFullNode().replaceAll("\\Q.\\E", ",") + "." + "default", i.isDefault()); fc.set(i.getFullNode().replaceAll("\\Q.\\E", ",") + "." + "children", ff); - for(MortarPermission j : i.getChildren()) { + for (MortarPermission j : i.getChildren()) { chain(j, fc); } } @@ -129,7 +129,7 @@ private void chain(MortarPermission i, FileConfiguration fc) { private void outputCommandInfo() throws IOException { FileConfiguration fc = new YamlConfiguration(); - for(MortarCommand i : commandCache) { + for (MortarCommand i : commandCache) { chain(i, "/", fc); } @@ -142,7 +142,7 @@ private void chain(MortarCommand i, String c, FileConfiguration fc) { fc.set(n + "." + "required-permissions", i.getRequiredPermissions()); fc.set(n + "." + "aliases", i.getAllNodes()); - for(MortarCommand j : i.getChildren()) { + for (MortarCommand j : i.getChildren()) { chain(j, n, fc); } } @@ -157,8 +157,8 @@ private void outputPluginInfo() throws IOException { private void registerPermissions() { permissionCache = new KList<>(); - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Permission.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Permission.class)) { try { i.setAccessible(true); MortarPermission pc = (MortarPermission) i.getType().getConstructor().newInstance(); @@ -166,7 +166,8 @@ private void registerPermissions() { registerPermission(pc); permissionCache.add(pc); v("Registered Permissions " + pc.getFullNode() + " (" + i.getName() + ")"); - } catch(IllegalArgumentException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | InstantiationException | + InvocationTargetException | NoSuchMethodException | SecurityException e) { Iris.reportError(e); w("Failed to register permission (field " + i.getName() + ")"); e.printStackTrace(); @@ -174,10 +175,10 @@ private void registerPermissions() { } } - for(org.bukkit.permissions.Permission i : computePermissions()) { + for (org.bukkit.permissions.Permission i : computePermissions()) { try { Bukkit.getPluginManager().addPermission(i); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -186,13 +187,13 @@ private void registerPermissions() { private KList computePermissions() { KList g = new KList<>(); - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Permission.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Permission.class)) { try { MortarPermission x = (MortarPermission) i.get(Modifier.isStatic(i.getModifiers()) ? null : this); g.add(toPermission(x)); g.addAll(computePermissions(x)); - } catch(IllegalArgumentException | IllegalAccessException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | SecurityException e) { Iris.reportError(e); e.printStackTrace(); } @@ -205,12 +206,12 @@ private KList computePermissions() { private KList computePermissions(MortarPermission p) { KList g = new KList<>(); - if(p == null) { + if (p == null) { return g; } - for(MortarPermission i : p.getChildren()) { - if(i == null) { + for (MortarPermission i : p.getChildren()) { + if (i == null) { continue; } @@ -222,7 +223,7 @@ private KList computePermissions(MortarPermis } private org.bukkit.permissions.Permission toPermission(MortarPermission p) { - if(p == null) { + if (p == null) { return null; } @@ -230,7 +231,7 @@ private org.bukkit.permissions.Permission toPermission(MortarPermission p) { perm.setDescription(p.getDescription() == null ? "" : p.getDescription()); perm.setDefault(p.isDefault() ? PermissionDefault.TRUE : PermissionDefault.OP); - for(MortarPermission i : p.getChildren()) { + for (MortarPermission i : p.getChildren()) { perm.getChildren().put(i.getFullNode(), true); } @@ -250,19 +251,19 @@ public void onDisable() { } private void tickController(IController i) { - if(bad) { + if (bad) { return; } - if(i.getTickInterval() < 0) { + if (i.getTickInterval() < 0) { return; } M.tick++; - if(M.interval(i.getTickInterval())) { + if (M.interval(i.getTickInterval())) { try { i.tick(); - } catch(Throwable e) { + } catch (Throwable e) { w("Failed to tick controller " + i.getName()); e.printStackTrace(); Iris.reportError(e); @@ -271,16 +272,16 @@ private void tickController(IController i) { } private void registerInstance() { - if(bad) { + if (bad) { return; } - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Instance.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Instance.class)) { try { i.setAccessible(true); i.set(Modifier.isStatic(i.getModifiers()) ? null : this, this); v("Registered Instance " + i.getName()); - } catch(IllegalArgumentException | IllegalAccessException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | SecurityException e) { w("Failed to register instance (field " + i.getName() + ")"); e.printStackTrace(); Iris.reportError(e); @@ -290,16 +291,16 @@ private void registerInstance() { } private void unregisterInstance() { - if(bad) { + if (bad) { return; } - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(Instance.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(Instance.class)) { try { i.setAccessible(true); i.set(Modifier.isStatic(i.getModifiers()) ? null : this, null); v("Unregistered Instance " + i.getName()); - } catch(IllegalArgumentException | IllegalAccessException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | SecurityException e) { w("Failed to unregister instance (field " + i.getName() + ")"); e.printStackTrace(); Iris.reportError(e); @@ -309,14 +310,14 @@ private void unregisterInstance() { } private void registerCommands() { - if(bad) { + if (bad) { return; } commands = new KMap<>(); commandCache = new KList<>(); - for(Field i : getClass().getDeclaredFields()) { - if(i.isAnnotationPresent(com.volmit.iris.util.plugin.Command.class)) { + for (Field i : getClass().getDeclaredFields()) { + if (i.isAnnotationPresent(com.volmit.iris.util.plugin.Command.class)) { try { i.setAccessible(true); MortarCommand pc = (MortarCommand) i.getType().getConstructor().newInstance(); @@ -324,7 +325,8 @@ private void registerCommands() { registerCommand(pc, c.value()); commandCache.add(pc); v("Registered Commands /" + pc.getNode() + " (" + i.getName() + ")"); - } catch(IllegalArgumentException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException | SecurityException e) { + } catch (IllegalArgumentException | IllegalAccessException | InstantiationException | + InvocationTargetException | NoSuchMethodException | SecurityException e) { w("Failed to register command (field " + i.getName() + ")"); e.printStackTrace(); Iris.reportError(e); @@ -339,21 +341,21 @@ public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) { KList chain = new KList<>(); - for(String i : args) { - if(i.trim().isEmpty()) { + for (String i : args) { + if (i.trim().isEmpty()) { continue; } chain.add(i.trim()); } - for(KList i : commands.k()) { - for(String j : i) { - if(j.equalsIgnoreCase(alias)) { + for (KList i : commands.k()) { + for (String j : i) { + if (j.equalsIgnoreCase(alias)) { VirtualCommand cmd = commands.get(i); List v = cmd.hitTab(sender, chain.copy(), alias); - if(v != null) { + if (v != null) { return v; } } @@ -365,19 +367,19 @@ public List onTabComplete(CommandSender sender, Command command, @Override public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String label, String[] args) { - if(bad) { + if (bad) { return false; } KList chain = new KList<>(); chain.add(args); - for(KList i : commands.k()) { - for(String j : i) { - if(j.equalsIgnoreCase(label)) { + for (KList i : commands.k()) { + for (String j : i) { + if (j.equalsIgnoreCase(label)) { VirtualCommand cmd = commands.get(i); - if(cmd.hit(sender, chain.copy(), label)) { + if (cmd.hit(sender, chain.copy(), label)) { return true; } } @@ -392,14 +394,14 @@ public void registerCommand(ICommand cmd) { } public void registerCommand(ICommand cmd, String subTag) { - if(bad) { + if (bad) { return; } commands.put(cmd.getAllNodes(), new VirtualCommand(cmd, subTag.trim().isEmpty() ? getTag() : getTag(subTag.trim()))); PluginCommand cc = getCommand(cmd.getNode().toLowerCase()); - if(cc != null) { + if (cc != null) { cc.setExecutor(this); cc.setUsage(getName() + ":" + getClass().toString() + ":" + cmd.getNode()); } else { @@ -410,7 +412,7 @@ public void registerCommand(ICommand cmd, String subTag) { } public void unregisterCommand(ICommand cmd) { - if(bad) { + if (bad) { return; } try { @@ -418,14 +420,14 @@ public void unregisterCommand(ICommand cmd) { Map k = new V(m).get("knownCommands"); - for(Iterator> it = k.entrySet().iterator(); it.hasNext(); ) { + for (Iterator> it = k.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = it.next(); - if(entry.getValue() instanceof Command) { + if (entry.getValue() instanceof Command) { org.bukkit.command.Command c = entry.getValue(); String u = c.getUsage(); - if(u != null && u.equals(getName() + ":" + getClass().toString() + ":" + cmd.getNode())) { - if(c.unregister(m)) { + if (u != null && u.equals(getName() + ":" + getClass().toString() + ":" + cmd.getNode())) { + if (c.unregister(m)) { it.remove(); v("Unregistered Command /" + cmd.getNode()); } else { @@ -434,14 +436,14 @@ public void unregisterCommand(ICommand cmd) { } } } - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(); Iris.reportError(e); } } public String getTag() { - if(bad) { + if (bad) { return ""; } return getTag(""); @@ -458,20 +460,20 @@ public void unregisterListener(Listener l) { } public void unregisterListeners() { - if(bad) { + if (bad) { return; } HandlerList.unregisterAll((Listener) this); } public void unregisterCommands() { - if(bad) { + if (bad) { return; } - for(VirtualCommand i : commands.v()) { + for (VirtualCommand i : commands.v()) { try { unregisterCommand(i.getCommand()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -479,10 +481,10 @@ public void unregisterCommands() { } private void unregisterPermissions() { - if(bad) { + if (bad) { return; } - for(org.bukkit.permissions.Permission i : computePermissions()) { + for (org.bukkit.permissions.Permission i : computePermissions()) { Bukkit.getPluginManager().removePermission(i); v("Unregistered Permission " + i.getName()); } @@ -503,7 +505,7 @@ public File getDataFileList(String pre, String[] strings) { } public File getDataFolder(String... strings) { - if(strings.length == 0) { + if (strings.length == 0) { return super.getDataFolder(); } @@ -514,7 +516,7 @@ public File getDataFolder(String... strings) { } public File getDataFolderNoCreate(String... strings) { - if(strings.length == 0) { + if (strings.length == 0) { return super.getDataFolder(); } @@ -526,7 +528,7 @@ public File getDataFolderNoCreate(String... strings) { public File getDataFolderList(String pre, String[] strings) { KList v = new KList<>(strings); v.add(0, pre); - if(v.size() == 0) { + if (v.size() == 0) { return super.getDataFolder(); } File f = new File(getDataFolder(), v.toString(File.separator)); diff --git a/src/main/java/com/volmit/iris/util/plugin/VolmitSender.java b/src/main/java/com/volmit/iris/util/plugin/VolmitSender.java index 1e0e3bbb1..217b44054 100644 --- a/src/main/java/com/volmit/iris/util/plugin/VolmitSender.java +++ b/src/main/java/com/volmit/iris/util/plugin/VolmitSender.java @@ -69,8 +69,7 @@ public class VolmitSender implements CommandSender { /** * Wrap a command sender * - * @param s - * the command sender + * @param s the command sender */ public VolmitSender(CommandSender s) { tag = ""; @@ -104,7 +103,7 @@ public static KList paginate(KList all, int linesPerPage, int page, At hasNext.set(page < totalPages - 1); KList d = new KList<>(); - for(int i = linesPerPage * page; i < Math.min(all.size(), linesPerPage * (page + 1)); i++) { + for (int i = linesPerPage * page; i < Math.min(all.size(), linesPerPage * (page + 1)); i++) { d.add(all.get(i)); } @@ -123,8 +122,7 @@ public String getTag() { /** * Set a command tag (prefix for sendMessage) * - * @param tag - * the tag + * @param tag the tag */ public void setTag(String tag) { this.tag = tag; @@ -228,14 +226,14 @@ public void hr() { public void sendTitle(String title, String subtitle, int i, int s, int o) { Iris.audiences.player(player()).showTitle(Title.title( - createComponent(title), - createComponent(subtitle), - Title.Times.times(Duration.ofMillis(i), Duration.ofMillis(s), Duration.ofMillis(o)))); + createComponent(title), + createComponent(subtitle), + Title.Times.times(Duration.ofMillis(i), Duration.ofMillis(s), Duration.ofMillis(o)))); } public void sendProgress(double percent, String thing) { //noinspection IfStatementWithIdenticalBranches - if(percent < 0) { + if (percent < 0) { int l = 44; int g = (int) (1D * l); sendTitle(C.IRIS + thing + " ", 0, 500, 250); @@ -258,13 +256,13 @@ public void sendActionNoProcessing(String action) { public void sendTitle(String subtitle, int i, int s, int o) { Iris.audiences.player(player()).showTitle(Title.title( - createNoPrefixComponent(" "), - createNoPrefixComponent(subtitle), - Title.Times.times(Duration.ofMillis(i), Duration.ofMillis(s), Duration.ofMillis(o)))); + createNoPrefixComponent(" "), + createNoPrefixComponent(subtitle), + Title.Times.times(Duration.ofMillis(i), Duration.ofMillis(s), Duration.ofMillis(o)))); } private Component createNoPrefixComponent(String message) { - if(!IrisSettings.get().getGeneral().canUseCustomColors(this)) { + if (!IrisSettings.get().getGeneral().canUseCustomColors(this)) { String t = C.translateAlternateColorCodes('&', MiniMessage.miniMessage().stripTags(message)); return MiniMessage.miniMessage().deserialize(t); } @@ -279,7 +277,7 @@ private Component createNoPrefixComponentNoProcessing(String message) { } private Component createComponent(String message) { - if(!IrisSettings.get().getGeneral().canUseCustomColors(this)) { + if (!IrisSettings.get().getGeneral().canUseCustomColors(this)) { String t = C.translateAlternateColorCodes('&', MiniMessage.miniMessage().stripTags(getTag() + message)); return MiniMessage.miniMessage().deserialize(t); } @@ -290,7 +288,7 @@ private Component createComponent(String message) { } private Component createComponentRaw(String message) { - if(!IrisSettings.get().getGeneral().canUseCustomColors(this)) { + if (!IrisSettings.get().getGeneral().canUseCustomColors(this)) { String t = C.translateAlternateColorCodes('&', MiniMessage.miniMessage().stripTags(getTag() + message)); return MiniMessage.miniMessage().deserialize(t); } @@ -303,7 +301,7 @@ public void showWaiting(String passive, CompletableFuture f) { AtomicInteger v = new AtomicInteger(); AtomicReference g = new AtomicReference<>(); v.set(J.ar(() -> { - if(f.isDone() && g.get() != null) { + if (f.isDone() && g.get() != null) { J.car(v.get()); sendAction(" "); return; @@ -314,9 +312,9 @@ public void showWaiting(String passive, CompletableFuture f) { J.a(() -> { try { g.set(f.get()); - } catch(InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); - } catch(ExecutionException e) { + } catch (ExecutionException e) { e.printStackTrace(); } }); @@ -325,23 +323,23 @@ public void showWaiting(String passive, CompletableFuture f) { @Override public void sendMessage(String message) { - if(s instanceof CommandDummy) { + if (s instanceof CommandDummy) { return; } - if((!IrisSettings.get().getGeneral().isUseCustomColorsIngame() && s instanceof Player) || !IrisSettings.get().getGeneral().isUseConsoleCustomColors()) { + if ((!IrisSettings.get().getGeneral().isUseCustomColorsIngame() && s instanceof Player) || !IrisSettings.get().getGeneral().isUseConsoleCustomColors()) { s.sendMessage(C.translateAlternateColorCodes('&', getTag() + message)); return; } - if(message.contains("")) { + if (message.contains("")) { s.sendMessage(C.translateAlternateColorCodes('&', getTag() + message.replaceAll("\\Q\\E", ""))); return; } try { Iris.audiences.sender(s).sendMessage(createComponent(message)); - } catch(Throwable e) { + } catch (Throwable e) { String t = C.translateAlternateColorCodes('&', getTag() + message); String a = C.aura(t, IrisSettings.get().getGeneral().getSpinh(), IrisSettings.get().getGeneral().getSpins(), IrisSettings.get().getGeneral().getSpinb()); @@ -355,23 +353,23 @@ public void sendMessageBasic(String message) { } public void sendMessageRaw(String message) { - if(s instanceof CommandDummy) { + if (s instanceof CommandDummy) { return; } - if((!IrisSettings.get().getGeneral().isUseCustomColorsIngame() && s instanceof Player) || !IrisSettings.get().getGeneral().isUseConsoleCustomColors()) { + if ((!IrisSettings.get().getGeneral().isUseCustomColorsIngame() && s instanceof Player) || !IrisSettings.get().getGeneral().isUseConsoleCustomColors()) { s.sendMessage(C.translateAlternateColorCodes('&', message)); return; } - if(message.contains("")) { + if (message.contains("")) { s.sendMessage(message.replaceAll("\\Q\\E", "")); return; } try { Iris.audiences.sender(s).sendMessage(createComponentRaw(message)); - } catch(Throwable e) { + } catch (Throwable e) { String t = C.translateAlternateColorCodes('&', getTag() + message); String a = C.aura(t, IrisSettings.get().getGeneral().getSpinh(), IrisSettings.get().getGeneral().getSpins(), IrisSettings.get().getGeneral().getSpinb()); @@ -382,7 +380,7 @@ public void sendMessageRaw(String message) { @Override public void sendMessage(String[] messages) { - for(String str : messages) + for (String str : messages) sendMessage(str); } @@ -413,21 +411,21 @@ public Spigot spigot() { private String pickRandoms(int max, VirtualDecreeCommand i) { KList m = new KList<>(); - for(int ix = 0; ix < max; ix++) { + for (int ix = 0; ix < max; ix++) { m.add((i.isNode() - ? (i.getNode().getParameters().isNotEmpty()) - ? "<#aebef2>✦ <#5ef288>" - + i.getParentPath() - + " <#42ecf5>" - + i.getName() + " " - + i.getNode().getParameters().shuffleCopy(RNG.r).convert((f) - -> (f.isRequired() || RNG.r.b(0.5) - ? "<#f2e15e>" + f.getNames().getRandom() + "=" - + "<#d665f0>" + f.example() - : "")) - .toString(" ") - : "" - : "")); + ? (i.getNode().getParameters().isNotEmpty()) + ? "<#aebef2>✦ <#5ef288>" + + i.getParentPath() + + " <#42ecf5>" + + i.getName() + " " + + i.getNode().getParameters().shuffleCopy(RNG.r).convert((f) + -> (f.isRequired() || RNG.r.b(0.5) + ? "<#f2e15e>" + f.getNames().getRandom() + "=" + + "<#d665f0>" + f.example() + : "")) + .toString(" ") + : "" + : "")); } return m.removeDuplicates().convert((iff) -> iff.replaceAll("\\Q \\E", " ")).toString("\n"); @@ -442,7 +440,7 @@ public void sendHeader(String name, int overrideLength) { String sf = "["; String se = "]"; - if(name.trim().isEmpty()) { + if (name.trim().isEmpty()) { sendMessageRaw("" + sf + s + "" + s + se); } else { sendMessageRaw("" + sf + s + si + " " + name + " " + so + s + se); @@ -458,8 +456,8 @@ public void sendDecreeHelp(VirtualDecreeCommand v) { } public void sendDecreeHelp(VirtualDecreeCommand v, int page) { - if(!isPlayer()) { - for(VirtualDecreeCommand i : v.getNodes()) { + if (!isPlayer()) { + for (VirtualDecreeCommand i : v.getNodes()) { sendDecreeHelpNode(i); } @@ -470,27 +468,27 @@ public void sendDecreeHelp(VirtualDecreeCommand v, int page) { sendMessageRaw("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); - if(v.getNodes().isNotEmpty()) { + if (v.getNodes().isNotEmpty()) { sendHeader(v.getPath() + (page > 0 ? (" {" + (page + 1) + "}") : "")); - if(isPlayer() && v.getParent() != null) { + if (isPlayer() && v.getParent() != null) { sendMessageRaw("Click to go back to <#3299bf>" + Form.capitalize(v.getParent().getName()) + " Help" + "'><#f58571>〈 Back"); } AtomicBoolean next = new AtomicBoolean(false); - for(VirtualDecreeCommand i : paginate(v.getNodes(), 17, page, next)) { + for (VirtualDecreeCommand i : paginate(v.getNodes(), 17, page, next)) { sendDecreeHelpNode(i); } String s = ""; int l = 75 - (page > 0 ? 10 : 0) - (next.get() ? 10 : 0); - if(page > 0) { + if (page > 0) { s += "Click to go back to page " + page + "'>〈 Page " + page + " "; } s += "" + Form.repeat(" ", l) + ""; - if(next.get()) { + if (next.get()) { s += " Click to go to back to page " + (page + 2) + "'>Page " + (page + 2) + " ❭"; } @@ -501,7 +499,7 @@ public void sendDecreeHelp(VirtualDecreeCommand v, int page) { } public void sendDecreeHelpNode(VirtualDecreeCommand i) { - if(isPlayer() || s instanceof CommandDummy) { + if (isPlayer() || s instanceof CommandDummy) { sendMessageRaw(helpCache.computeIfAbsent(i.getPath(), (k) -> { String newline = "\n"; @@ -512,8 +510,8 @@ public void sendDecreeHelpNode(VirtualDecreeCommand i) { String description = "<#3fe05a>✎ <#6ad97d>" + i.getDescription(); String usage = "<#bbe03f>✒ <#a8e0a2>"; String onClick; - if(i.isNode()) { - if(i.getNode().getParameters().isEmpty()) { + if (i.isNode()) { + if (i.getNode().getParameters().isEmpty()) { usage += "There are no parameters. Click to type command."; onClick = "suggest_command"; } else { @@ -527,16 +525,16 @@ public void sendDecreeHelpNode(VirtualDecreeCommand i) { String suggestion = ""; String suggestions = ""; - if(i.isNode() && i.getNode().getParameters().isNotEmpty()) { + if (i.isNode() && i.getNode().getParameters().isNotEmpty()) { suggestion += newline + "<#aebef2>✦ <#5ef288>" + i.getParentPath() + " <#42ecf5>" + i.getName() + " " - + i.getNode().getParameters().convert((f) -> "<#d665f0>" + f.example()).toString(" "); + + i.getNode().getParameters().convert((f) -> "<#d665f0>" + f.example()).toString(" "); suggestions += newline + "" + pickRandoms(Math.min(i.getNode().getParameters().size() + 1, 5), i); } /// Params StringBuilder nodes = new StringBuilder(); - if(i.isNode()) { - for(DecreeParameter p : i.getNode().getParameters()) { + if (i.isNode()) { + for (DecreeParameter p : i.getNode().getParameters()) { String nTitle = "" + p.getName(); String nHoverTitle = p.getNames().convert((ff) -> "<#d665f0>" + ff).toString(", "); @@ -544,13 +542,13 @@ public void sendDecreeHelpNode(VirtualDecreeCommand i) { String nUsage; String fullTitle; Iris.debug("Contextual: " + p.isContextual() + " / player: " + isPlayer()); - if(p.isContextual() && (isPlayer() || s instanceof CommandDummy)) { + if (p.isContextual() && (isPlayer() || s instanceof CommandDummy)) { fullTitle = "<#ffcc00>[" + nTitle + "<#ffcc00>] "; nUsage = "<#ff9900>➱ <#ffcc00>The value may be derived from environment context."; - } else if(p.isRequired()) { + } else if (p.isRequired()) { fullTitle = "[" + nTitle + "] "; nUsage = "<#db4321>⚠ <#faa796>This parameter is required."; - } else if(p.hasDefault()) { + } else if (p.hasDefault()) { fullTitle = "<#4f4f4f>⊰" + nTitle + "<#4f4f4f>⊱"; nUsage = "<#2181db>✔ <#78dcf0>Defaults to \"" + p.getParam().defaultValue() + "\" if undefined."; } else { @@ -560,14 +558,14 @@ public void sendDecreeHelpNode(VirtualDecreeCommand i) { String type = "<#cc00ff>✢ <#ff33cc>This parameter is of type " + p.getType().getSimpleName() + "."; nodes - .append("") - .append(fullTitle) - .append(""); + .append("") + .append(fullTitle) + .append(""); } } else { nodes = new StringBuilder(" - Category of Commands"); @@ -575,21 +573,21 @@ public void sendDecreeHelpNode(VirtualDecreeCommand i) { /// Wrapper String wrapper = - "" + - "" + - "" + - " " + - nodes; + "" + + "" + + "" + + " " + + nodes; return wrapper; })); @@ -599,7 +597,7 @@ public void sendDecreeHelpNode(VirtualDecreeCommand i) { } public void playSound(Sound sound, float volume, float pitch) { - if(isPlayer()) { + if (isPlayer()) { player().playSound(player().getLocation(), sound, volume, pitch); } } diff --git a/src/main/java/com/volmit/iris/util/reflect/V.java b/src/main/java/com/volmit/iris/util/reflect/V.java index 7e6f7296a..919092365 100644 --- a/src/main/java/com/volmit/iris/util/reflect/V.java +++ b/src/main/java/com/volmit/iris/util/reflect/V.java @@ -52,9 +52,9 @@ public V(Object o, boolean local) { public T get(Class t) { try { return local ? Violator.getDeclaredAnnotation(o.getClass(), t) : Violator.getAnnotation(o.getClass(), t); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(!suppress) { + if (!suppress) { e.printStackTrace(); } } @@ -65,9 +65,9 @@ public T get(Class t) { public T get(Class t, String mn, Class... pars) { try { return local ? Violator.getDeclaredAnnotation(Violator.getDeclaredMethod(o.getClass(), mn, pars), t) : Violator.getAnnotation(Violator.getMethod(o.getClass(), mn, pars), t); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(!suppress) { + if (!suppress) { e.printStackTrace(); } } @@ -78,9 +78,9 @@ public T get(Class t, String mn, Class... public T get(Class t, String mn) { try { return local ? Violator.getDeclaredAnnotation(Violator.getDeclaredField(o.getClass(), mn), t) : Violator.getAnnotation(Violator.getField(o.getClass(), mn), t); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(!suppress) { + if (!suppress) { e.printStackTrace(); } } @@ -92,9 +92,9 @@ public T get(Class t, String mn) { public T get(String field) { try { return (T) (local ? Violator.getDeclaredField(o.getClass(), field) : Violator.getField(o.getClass(), field)).get(o); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(!suppress) { + if (!suppress) { e.printStackTrace(); } } @@ -109,15 +109,15 @@ public Object getSelf() { public Object invoke(String method, Object... parameters) { KList> par = new KList<>(); - for(Object i : parameters) { + for (Object i : parameters) { par.add(i.getClass()); } try { return (local ? Violator.getDeclaredMethod(o.getClass(), method, par.toArray(new Class[0])) : Violator.getMethod(o.getClass(), method, par.toArray(new Class[0]))).invoke(o, parameters); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(!suppress) { + if (!suppress) { e.printStackTrace(); } } @@ -129,9 +129,9 @@ public void set(String field, Object value) { try { // https://github.com/VolmitSoftware/Mortar/issues/5 (local ? Violator.getDeclaredField(o.getClass(), field) : Violator.getField(o.getClass(), field)).set(o, value); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); - if(!suppress) { + if (!suppress) { e.printStackTrace(); } } diff --git a/src/main/java/com/volmit/iris/util/reflect/Violator.java b/src/main/java/com/volmit/iris/util/reflect/Violator.java index 639c275b7..bc29f19a7 100644 --- a/src/main/java/com/volmit/iris/util/reflect/Violator.java +++ b/src/main/java/com/volmit/iris/util/reflect/Violator.java @@ -31,23 +31,23 @@ public class Violator { protected static final ConcurrentSkipListMap nodes = new ConcurrentSkipListMap<>(); private static String id(Object o, Object h) { - if(o instanceof Field) { + if (o instanceof Field) { return id(((Field) o).getDeclaringClass(), null) + "." + ((Field) o).getName(); } - if(o instanceof String) { + if (o instanceof String) { return (String) o; } - if(o instanceof Class) { + if (o instanceof Class) { return ((Class) o).getCanonicalName(); } - if(o instanceof Constructor co) { + if (o instanceof Constructor co) { StringBuilder mx = new StringBuilder(); - for(Class i : co.getParameterTypes()) { + for (Class i : co.getParameterTypes()) { mx.append(",").append(i.getCanonicalName()); } @@ -56,10 +56,10 @@ private static String id(Object o, Object h) { return id(co.getDeclaringClass(), null) + "(" + mx + ")"; } - if(o instanceof Method) { + if (o instanceof Method) { StringBuilder mx = new StringBuilder(); - for(Class i : ((Method) o).getParameterTypes()) { + for (Class i : ((Method) o).getParameterTypes()) { mx.append(",").append(i.getCanonicalName()); } @@ -68,7 +68,7 @@ private static String id(Object o, Object h) { return id(((Method) o).getDeclaringClass(), null) + "." + ((Method) o).getName() + "(" + mx + ")"; } - if(o instanceof Annotation a) { + if (o instanceof Annotation a) { return "@" + a.annotationType().getCanonicalName() + "[" + id(h, null) + "]"; } @@ -91,13 +91,13 @@ private static Object g(String n) { public static Constructor getConstructor(Class c, Class... params) throws NoSuchMethodException, SecurityException { StringBuilder mx = new StringBuilder(); - for(Class i : params) { + for (Class i : params) { mx.append(",").append(i.getCanonicalName()); } mx = new StringBuilder(mx.length() >= 1 ? mx.substring(1) : mx.toString()); - if(!h(id(c, null) + "(" + mx + ")")) { + if (!h(id(c, null) + "(" + mx + ")")) { Constructor co = c.getConstructor(params); co.setAccessible(true); p(id(co, null), co); @@ -108,15 +108,15 @@ public static Constructor getConstructor(Class c, Class... params) thro @SuppressWarnings("rawtypes") public static Field getField(Class c, String name) throws Throwable { - if(!h(id(c, null) + "." + name)) { + if (!h(id(c, null) + "." + name)) { try { Field f = c.getField(name); f.setAccessible(true); p(id(c, null) + "." + name, f); - } catch(NoSuchFieldException e) { + } catch (NoSuchFieldException e) { Iris.reportError(e); Class s = c.getSuperclass(); - if(null == s) { + if (null == s) { throw e; } Field f = s.getField(name); @@ -130,15 +130,15 @@ public static Field getField(Class c, String name) throws Throwable { @SuppressWarnings("rawtypes") public static Field getDeclaredField(Class c, String name) throws Throwable { - if(!h(id(c, null) + "." + name)) { + if (!h(id(c, null) + "." + name)) { try { Field f = c.getDeclaredField(name); f.setAccessible(true); p(id(c, null) + "." + name, f); - } catch(NoSuchFieldException e) { + } catch (NoSuchFieldException e) { Iris.reportError(e); Class s = c.getSuperclass(); - if(null == s) { + if (null == s) { throw e; } Field f = s.getDeclaredField(name); @@ -154,14 +154,14 @@ public static Method getMethod(Class c, String name, Class... pars) throws String iv = ""; StringBuilder mx = new StringBuilder(); - for(Class i : pars) { + for (Class i : pars) { mx.append(",").append(i.getCanonicalName()); } mx = new StringBuilder(mx.length() >= 1 ? mx.substring(1) : mx.toString()); iv = id(c, null) + "." + name + "(" + mx + ")"; - if(!h(iv)) { + if (!h(iv)) { Method f = c.getMethod(name, pars); f.setAccessible(true); p(iv, f); @@ -174,14 +174,14 @@ public static Method getMethod(Class c, String name, Class... pars) throws public static T construct(Class c, Object... parameters) { KList> cv = new KList<>(); - for(Object i : parameters) { + for (Object i : parameters) { cv.add(i.getClass()); } try { Constructor co = getConstructor(c, cv.toArray(new Class[0])); return (T) co.newInstance(parameters); - } catch(Exception e) { + } catch (Exception e) { Iris.reportError(e); e.printStackTrace(); } @@ -193,14 +193,14 @@ public static Method getDeclaredMethod(Class c, String name, Class... pars String iv = ""; StringBuilder mx = new StringBuilder(); - for(Class i : pars) { + for (Class i : pars) { mx.append(",").append(i.getCanonicalName()); } mx = new StringBuilder(mx.length() >= 1 ? mx.substring(1) : mx.toString()); iv = id(c, null) + "." + name + "(" + mx + ")"; - if(!h(iv)) { + if (!h(iv)) { Method f = c.getDeclaredMethod(name, pars); f.setAccessible(true); p(iv, f); @@ -211,7 +211,7 @@ public static Method getDeclaredMethod(Class c, String name, Class... pars @SuppressWarnings("unchecked") public static T getAnnotation(Class c, Class a) { - if(!h("@" + a.getCanonicalName() + "[" + c.getCanonicalName() + "]")) { + if (!h("@" + a.getCanonicalName() + "[" + c.getCanonicalName() + "]")) { T f = c.getAnnotation(a); p(id(f, c), f); } @@ -221,7 +221,7 @@ public static T getAnnotation(Class c, Class T getDeclaredAnnotation(Class c, Class a) { - if(!h("@" + a.getCanonicalName() + "[" + c.getCanonicalName() + "]")) { + if (!h("@" + a.getCanonicalName() + "[" + c.getCanonicalName() + "]")) { T f = c.getDeclaredAnnotation(a); p(id(f, c), f); } @@ -231,7 +231,7 @@ public static T getDeclaredAnnotation(Class c, Class T getAnnotation(Field c, Class a) { - if(!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { + if (!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { T f = c.getAnnotation(a); p(id(f, c), f); } @@ -241,7 +241,7 @@ public static T getAnnotation(Field c, Class @SuppressWarnings("unchecked") public static T getDeclaredAnnotation(Field c, Class a) { - if(!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { + if (!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { T f = c.getDeclaredAnnotation(a); p(id(f, c), f); } @@ -251,7 +251,7 @@ public static T getDeclaredAnnotation(Field c, Class T getAnnotation(Method c, Class a) { - if(!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { + if (!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { T f = c.getAnnotation(a); p(id(f, c), f); } @@ -261,7 +261,7 @@ public static T getAnnotation(Method c, Class T getDeclaredAnnotation(Method c, Class a) { - if(!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { + if (!h("@" + a.getCanonicalName() + "[" + id(c, null) + "]")) { T f = c.getDeclaredAnnotation(a); p(id(f, c), f); diff --git a/src/main/java/com/volmit/iris/util/scheduling/Callback.java b/src/main/java/com/volmit/iris/util/scheduling/Callback.java index cb816e354..2979e2f5c 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/Callback.java +++ b/src/main/java/com/volmit/iris/util/scheduling/Callback.java @@ -21,8 +21,7 @@ /** * Callback for async workers * - * @param - * the type of object to be returned in the runnable + * @param the type of object to be returned in the runnable * @author cyberpwn */ @FunctionalInterface @@ -30,8 +29,7 @@ public interface Callback { /** * Called when the callback calls back... * - * @param t - * the object to be called back + * @param t the object to be called back */ void run(T t); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/ChronoLatch.java b/src/main/java/com/volmit/iris/util/scheduling/ChronoLatch.java index 629221de5..096ebcd91 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/ChronoLatch.java +++ b/src/main/java/com/volmit/iris/util/scheduling/ChronoLatch.java @@ -40,7 +40,7 @@ public boolean couldFlip() { } public boolean flip() { - if(System.currentTimeMillis() - since > interval) { + if (System.currentTimeMillis() - since > interval) { since = System.currentTimeMillis(); return true; } diff --git a/src/main/java/com/volmit/iris/util/scheduling/GroupedExecutor.java b/src/main/java/com/volmit/iris/util/scheduling/GroupedExecutor.java index 2c951f66c..eb86f5e2d 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/GroupedExecutor.java +++ b/src/main/java/com/volmit/iris/util/scheduling/GroupedExecutor.java @@ -37,7 +37,7 @@ public GroupedExecutor(int threadLimit, int priority, String name) { xc = 1; mirror = new KMap<>(); - if(threadLimit == 1) { + if (threadLimit == 1) { service = Executors.newSingleThreadExecutor((r) -> { Thread t = new Thread(r); @@ -46,7 +46,7 @@ public GroupedExecutor(int threadLimit, int priority, String name) { return t; }); - } else if(threadLimit > 1) { + } else if (threadLimit > 1) { final ForkJoinWorkerThreadFactory factory = pool -> { final ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); worker.setName(name + " " + xc++); @@ -68,16 +68,16 @@ public GroupedExecutor(int threadLimit, int priority, String name) { } public void waitFor(String g) { - if(g == null) { + if (g == null) { return; } - if(!mirror.containsKey(g)) { + if (!mirror.containsKey(g)) { return; } - while(true) { - if(mirror.get(g) == 0) { + while (true) { + if (mirror.get(g) == 0) { break; } } @@ -89,7 +89,7 @@ public void queue(String q, NastyRunnable r) { { try { r.run(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/IrisLock.java b/src/main/java/com/volmit/iris/util/scheduling/IrisLock.java index 6a84d654b..ab0fe0c63 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/IrisLock.java +++ b/src/main/java/com/volmit/iris/util/scheduling/IrisLock.java @@ -26,7 +26,7 @@ @Data @Accessors( - chain = true + chain = true ) public class IrisLock { private transient final ReentrantLock lock; @@ -39,7 +39,7 @@ public IrisLock(String name) { } public void lock() { - if(disabled) { + if (disabled) { return; } @@ -47,12 +47,12 @@ public void lock() { } public void unlock() { - if(disabled) { + if (disabled) { return; } try { lock.unlock(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/J.java b/src/main/java/com/volmit/iris/util/scheduling/J.java index 2b865d29e..a669317df 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/J.java +++ b/src/main/java/com/volmit/iris/util/scheduling/J.java @@ -43,18 +43,18 @@ public class J { private static boolean started = false; public static void dofor(int a, Function c, int ch, Consumer d) { - for(int i = a; c.apply(i); i += ch) { + for (int i = a; c.apply(i); i += ch) { c.apply(i); } } public static boolean doif(Supplier c, Runnable g) { try { - if(c.get()) { + if (c.get()) { g.run(); return true; } - } catch(NullPointerException e) { + } catch (NullPointerException e) { Iris.reportError(e); // TODO: Fix this because this is just a suppression for an NPE on g return false; @@ -67,7 +67,7 @@ public static void arun(Runnable a) { MultiBurst.burst.lazy(() -> { try { a.run(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Failed to run async task"); e.printStackTrace(); @@ -79,7 +79,7 @@ public static void a(Runnable a) { MultiBurst.burst.lazy(() -> { try { a.run(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); Iris.error("Failed to run async task"); e.printStackTrace(); @@ -88,7 +88,7 @@ public static void a(Runnable a) { } public static void aBukkit(Runnable a) { - if(!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { return; } Bukkit.getScheduler().scheduleAsyncDelayedTask(Iris.instance, a); @@ -105,7 +105,7 @@ public static void attemptAsync(NastyRunnable r) { public static R attemptResult(NastyFuture r, R onError) { try { return r.run(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -116,7 +116,7 @@ public static R attemptResult(NastyFuture r, R onError) { public static R attemptFunction(NastyFunction r, T param, R onError) { try { return r.run(param); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -135,7 +135,7 @@ public static boolean attempt(NastyRunnable r) { public static T attemptResult(NastySupplier r) { try { return r.get(); - } catch(Throwable e) { + } catch (Throwable e) { return null; } } @@ -143,7 +143,7 @@ public static T attemptResult(NastySupplier r) { public static Throwable attemptCatch(NastyRunnable r) { try { r.run(); - } catch(Throwable e) { + } catch (Throwable e) { return e; } @@ -153,7 +153,7 @@ public static Throwable attemptCatch(NastyRunnable r) { public static T attempt(Supplier t, T i) { try { return t.get(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); return i; } @@ -163,17 +163,17 @@ public static T attempt(Supplier t, T i) { * Dont call this unless you know what you are doing! */ public static void executeAfterStartupQueue() { - if(started) { + if (started) { return; } started = true; - for(Runnable r : afterStartup) { + for (Runnable r : afterStartup) { s(r); } - for(Runnable r : afterStartupAsync) { + for (Runnable r : afterStartupAsync) { a(r); } @@ -188,11 +188,10 @@ public static void executeAfterStartupQueue() { * If you dont know if you should queue this or not, do so, it's pretty * forgiving. * - * @param r - * the runnable + * @param r the runnable */ public static void ass(Runnable r) { - if(started) { + if (started) { s(r); } else { afterStartup.add(r); @@ -206,11 +205,10 @@ public static void ass(Runnable r) { * If you dont know if you should queue this or not, do so, it's pretty * forgiving. * - * @param r - * the runnable + * @param r the runnable */ public static void asa(Runnable r) { - if(started) { + if (started) { a(r); } else { afterStartupAsync.add(r); @@ -220,11 +218,10 @@ public static void asa(Runnable r) { /** * Queue a sync task * - * @param r - * the runnable + * @param r the runnable */ public static void s(Runnable r) { - if(!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { return; } Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, r); @@ -233,7 +230,7 @@ public static void s(Runnable r) { public static CompletableFuture sfut(Runnable r) { CompletableFuture f = new CompletableFuture(); - if(!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { return null; } Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, () -> { @@ -246,7 +243,7 @@ public static CompletableFuture sfut(Runnable r) { public static CompletableFuture sfut(Runnable r, int delay) { CompletableFuture f = new CompletableFuture(); - if(!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { return null; } Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, () -> { @@ -268,18 +265,16 @@ public static CompletableFuture afut(Runnable r) { /** * Queue a sync task * - * @param r - * the runnable - * @param delay - * the delay to wait in ticks before running + * @param r the runnable + * @param delay the delay to wait in ticks before running */ public static void s(Runnable r, int delay) { try { - if(!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { return; } Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, r, delay); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } } @@ -287,8 +282,7 @@ public static void s(Runnable r, int delay) { /** * Cancel a sync repeating task * - * @param id - * the task id + * @param id the task id */ public static void csr(int id) { Bukkit.getScheduler().cancelTask(id); @@ -297,14 +291,12 @@ public static void csr(int id) { /** * Start a sync repeating task * - * @param r - * the runnable - * @param interval - * the interval + * @param r the runnable + * @param interval the interval * @return the task id */ public static int sr(Runnable r, int interval) { - if(!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { return -1; } return Bukkit.getScheduler().scheduleSyncRepeatingTask(Iris.instance, r, 0, interval); @@ -313,12 +305,9 @@ public static int sr(Runnable r, int interval) { /** * Start a sync repeating task for a limited amount of ticks * - * @param r - * the runnable - * @param interval - * the interval in ticks - * @param intervals - * the maximum amount of intervals to run + * @param r the runnable + * @param interval the interval in ticks + * @param intervals the maximum amount of intervals to run */ public static void sr(Runnable r, int interval, int intervals) { FinalInteger fi = new FinalInteger(0); @@ -329,7 +318,7 @@ public void run() { fi.add(1); r.run(); - if(fi.get() >= intervals) { + if (fi.get() >= intervals) { cancel(); } } @@ -339,14 +328,12 @@ public void run() { /** * Call an async task dealyed * - * @param r - * the runnable - * @param delay - * the delay to wait before running + * @param r the runnable + * @param delay the delay to wait before running */ @SuppressWarnings("deprecation") public static void a(Runnable r, int delay) { - if(Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { Bukkit.getScheduler().scheduleAsyncDelayedTask(Iris.instance, r, delay); } } @@ -354,8 +341,7 @@ public static void a(Runnable r, int delay) { /** * Cancel an async repeat task * - * @param id - * the id + * @param id the id */ public static void car(int id) { Bukkit.getScheduler().cancelTask(id); @@ -364,15 +350,13 @@ public static void car(int id) { /** * Start an async repeat task * - * @param r - * the runnable - * @param interval - * the interval in ticks + * @param r the runnable + * @param interval the interval in ticks * @return the task id */ @SuppressWarnings("deprecation") public static int ar(Runnable r, int interval) { - if(!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { + if (!Bukkit.getPluginManager().isPluginEnabled(Iris.instance)) { return -1; } return Bukkit.getScheduler().scheduleAsyncRepeatingTask(Iris.instance, r, 0, interval); @@ -381,12 +365,9 @@ public static int ar(Runnable r, int interval) { /** * Start an async repeating task for a limited time * - * @param r - * the runnable - * @param interval - * the interval - * @param intervals - * the intervals to run + * @param r the runnable + * @param interval the interval + * @param intervals the intervals to run */ public static void ar(Runnable r, int interval, int intervals) { FinalInteger fi = new FinalInteger(0); @@ -397,7 +378,7 @@ public void run() { fi.add(1); r.run(); - if(fi.get() >= intervals) { + if (fi.get() >= intervals) { cancel(); } } diff --git a/src/main/java/com/volmit/iris/util/scheduling/Looper.java b/src/main/java/com/volmit/iris/util/scheduling/Looper.java index 11e080a36..e5be20b84 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/Looper.java +++ b/src/main/java/com/volmit/iris/util/scheduling/Looper.java @@ -25,20 +25,20 @@ public abstract class Looper extends Thread { @SuppressWarnings("BusyWait") public void run() { Iris.service(PreservationSVC.class).register(this); - while(!interrupted()) { + while (!interrupted()) { try { long m = loop(); - if(m < 0) { + if (m < 0) { break; } //noinspection BusyWait Thread.sleep(m); - } catch(InterruptedException e) { + } catch (InterruptedException e) { Iris.reportError(e); break; - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/O.java b/src/main/java/com/volmit/iris/util/scheduling/O.java index 7218bc214..3c97d1c99 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/O.java +++ b/src/main/java/com/volmit/iris/util/scheduling/O.java @@ -33,7 +33,7 @@ public T get() { public O set(T t) { this.t = t; - if(observers != null && observers.hasElements()) { + if (observers != null && observers.hasElements()) { observers.forEach((o) -> o.onChanged(t, t)); } @@ -53,7 +53,7 @@ public O clearObservers() { @Override public O observe(Observer t) { - if(observers == null) { + if (observers == null) { observers = new KList<>(); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/PrecisionStopwatch.java b/src/main/java/com/volmit/iris/util/scheduling/PrecisionStopwatch.java index ffe47a10e..4fa5b3b3c 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/PrecisionStopwatch.java +++ b/src/main/java/com/volmit/iris/util/scheduling/PrecisionStopwatch.java @@ -45,7 +45,7 @@ public void begin() { } public void end() { - if(!profiling) { + if (!profiling) { return; } diff --git a/src/main/java/com/volmit/iris/util/scheduling/QueueExecutor.java b/src/main/java/com/volmit/iris/util/scheduling/QueueExecutor.java index 93215eeaf..0bb094b58 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/QueueExecutor.java +++ b/src/main/java/com/volmit/iris/util/scheduling/QueueExecutor.java @@ -35,16 +35,16 @@ public Queue queue() { @Override protected long loop() { - while(queue.hasNext()) { + while (queue.hasNext()) { try { queue.next().run(); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); e.printStackTrace(); } } - if(shutdown && !queue.hasNext()) { + if (shutdown && !queue.hasNext()) { interrupt(); return -1; } diff --git a/src/main/java/com/volmit/iris/util/scheduling/ShurikenQueue.java b/src/main/java/com/volmit/iris/util/scheduling/ShurikenQueue.java index c8968e50b..996574bef 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/ShurikenQueue.java +++ b/src/main/java/com/volmit/iris/util/scheduling/ShurikenQueue.java @@ -70,8 +70,8 @@ public T next() { public KList next(int amt) { KList t = new KList<>(); - for(int i = 0; i < amt; i++) { - if(!hasNext()) { + for (int i = 0; i < amt; i++) { + if (!hasNext()) { break; } diff --git a/src/main/java/com/volmit/iris/util/scheduling/TaskExecutor.java b/src/main/java/com/volmit/iris/util/scheduling/TaskExecutor.java index 617c2a067..a890a10a2 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/TaskExecutor.java +++ b/src/main/java/com/volmit/iris/util/scheduling/TaskExecutor.java @@ -39,7 +39,7 @@ public class TaskExecutor { public TaskExecutor(int threadLimit, int priority, String name) { xc = 1; - if(threadLimit == 1) { + if (threadLimit == 1) { service = Executors.newSingleThreadExecutor((r) -> { Thread t = new Thread(r); @@ -48,7 +48,7 @@ public TaskExecutor(int threadLimit, int priority, String name) { return t; }); - } else if(threadLimit > 1) { + } else if (threadLimit > 1) { final ForkJoinWorkerThreadFactory factory = pool -> { final ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); worker.setName(name + " " + xc++); @@ -102,7 +102,7 @@ public TaskGroup(TaskExecutor e) { } public TaskGroup queue(NastyRunnable... r) { - for(NastyRunnable i : r) { + for (NastyRunnable i : r) { tasks.add(new AssignedTask(i)); } @@ -110,7 +110,7 @@ public TaskGroup queue(NastyRunnable... r) { } public TaskGroup queue(KList r) { - for(NastyRunnable i : r) { + for (NastyRunnable i : r) { tasks.add(new AssignedTask(i)); } @@ -126,24 +126,24 @@ public TaskResult execute() { long msv = M.ns(); waiting: - while(true) { + while (true) { try { //noinspection BusyWait Thread.sleep(0); - } catch(InterruptedException ignored) { + } catch (InterruptedException ignored) { } - for(AssignedTask i : tasks) { - if(i.state.equals(TaskState.QUEUED) || i.state.equals(TaskState.RUNNING)) { + for (AssignedTask i : tasks) { + if (i.state.equals(TaskState.QUEUED) || i.state.equals(TaskState.RUNNING)) { continue waiting; } } timeElapsed = (double) (M.ns() - msv) / 1000000D; - for(AssignedTask i : tasks) { - if(i.state.equals(TaskState.COMPLETED)) { + for (AssignedTask i : tasks) { + if (i.state.equals(TaskState.COMPLETED)) { tasksCompleted++; } else { tasksFailed++; @@ -194,7 +194,7 @@ public void go(TaskExecutor e) { try { task.run(); state = TaskState.COMPLETED; - } catch(Throwable ex) { + } catch (Throwable ex) { Iris.reportError(ex); ex.printStackTrace(); Iris.reportError(ex); diff --git a/src/main/java/com/volmit/iris/util/scheduling/ThreadMonitor.java b/src/main/java/com/volmit/iris/util/scheduling/ThreadMonitor.java index fec26599d..6d167b9c1 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/ThreadMonitor.java +++ b/src/main/java/com/volmit/iris/util/scheduling/ThreadMonitor.java @@ -51,22 +51,22 @@ public static ThreadMonitor bind(Thread monitor) { } public void run() { - while(running) { + while (running) { try { //noinspection BusyWait Thread.sleep(0); State s = monitor.getState(); - if(lastState != s) { + if (lastState != s) { cycles++; pushState(s); } lastState = s; - if(cl.flip()) { + if (cl.flip()) { Iris.info("Cycles: " + Form.f(cycles) + " (" + Form.duration(sq.getAverage(), 2) + ")"); } - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); running = false; break; @@ -75,8 +75,8 @@ public void run() { } public void pushState(State s) { - if(s != State.RUNNABLE) { - if(st != null) { + if (s != State.RUNNABLE) { + if (st != null) { sq.put(st.getMilliseconds()); } } else { diff --git a/src/main/java/com/volmit/iris/util/scheduling/Wrapper.java b/src/main/java/com/volmit/iris/util/scheduling/Wrapper.java index 4eb9dc27d..2e15751ca 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/Wrapper.java +++ b/src/main/java/com/volmit/iris/util/scheduling/Wrapper.java @@ -43,24 +43,24 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if(this == obj) { + if (this == obj) { return true; } - if(obj == null) { + if (obj == null) { return false; } - if(!(obj instanceof Wrapper other)) { + if (!(obj instanceof Wrapper other)) { return false; } - if(t == null) { + if (t == null) { return other.t == null; } else return t.equals(other.t); } @Override public String toString() { - if(t != null) { + if (t != null) { return get().toString(); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/jobs/DownloadJob.java b/src/main/java/com/volmit/iris/util/scheduling/jobs/DownloadJob.java index e74e41f58..e4b922529 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/jobs/DownloadJob.java +++ b/src/main/java/com/volmit/iris/util/scheduling/jobs/DownloadJob.java @@ -38,7 +38,7 @@ public DownloadJob(String url, File destination) throws MalformedURLException { download.monitor(new DownloadMonitor() { @Override public void onUpdate(DL.DownloadState state, double progress, long elapsed, long estimated, long bps, long iobps, long size, long downloaded, long buffer, double bufferuse) { - if(size == -1) { + if (size == -1) { tw = 1; } else { tw = (int) (size / 100); @@ -57,10 +57,10 @@ public String getName() { public void execute() { try { download.start(); - while(download.isState(DL.DownloadState.DOWNLOADING)) { + while (download.isState(DL.DownloadState.DOWNLOADING)) { download.downloadChunk(); } - } catch(IOException e) { + } catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/jobs/Job.java b/src/main/java/com/volmit/iris/util/scheduling/jobs/Job.java index 471dddde4..a378770b5 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/jobs/Job.java +++ b/src/main/java/com/volmit/iris/util/scheduling/jobs/Job.java @@ -64,7 +64,7 @@ default void execute(VolmitSender sender, boolean silentMsg, Runnable whenComple PrecisionStopwatch p = PrecisionStopwatch.start(); CompletableFuture f = J.afut(this::execute); int c = J.ar(() -> { - if(sender.isPlayer()) { + if (sender.isPlayer()) { sender.sendProgress(getProgress(), getName()); } else { sender.sendMessage(getName() + ": " + getProgressString()); @@ -72,7 +72,7 @@ default void execute(VolmitSender sender, boolean silentMsg, Runnable whenComple }, sender.isPlayer() ? 0 : 20); f.whenComplete((fs, ff) -> { J.car(c); - if(!silentMsg) { + if (!silentMsg) { sender.sendMessage(C.AQUA + "Completed " + getName() + " in " + Form.duration(p.getMilliseconds(), 1)); } whenComplete.run(); diff --git a/src/main/java/com/volmit/iris/util/scheduling/jobs/JobCollection.java b/src/main/java/com/volmit/iris/util/scheduling/jobs/JobCollection.java index 52704b982..6b8fde875 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/jobs/JobCollection.java +++ b/src/main/java/com/volmit/iris/util/scheduling/jobs/JobCollection.java @@ -42,7 +42,7 @@ public String getName() { @Override public void execute() { - for(Job i : jobs) { + for (Job i : jobs) { status = i.getName(); i.execute(); } diff --git a/src/main/java/com/volmit/iris/util/scheduling/jobs/ParallelQueueJob.java b/src/main/java/com/volmit/iris/util/scheduling/jobs/ParallelQueueJob.java index 3d0c724c0..8fd80e9c2 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/jobs/ParallelQueueJob.java +++ b/src/main/java/com/volmit/iris/util/scheduling/jobs/ParallelQueueJob.java @@ -25,11 +25,11 @@ public abstract class ParallelQueueJob extends QueueJob { @Override public void execute() { - while(queue.isNotEmpty()) { + while (queue.isNotEmpty()) { BurstExecutor b = MultiBurst.burst.burst(queue.size()); KList q = queue.copy(); queue.clear(); - for(T i : q) { + for (T i : q) { b.queue(() -> { execute(i); completeWork(); diff --git a/src/main/java/com/volmit/iris/util/scheduling/jobs/QueueJob.java b/src/main/java/com/volmit/iris/util/scheduling/jobs/QueueJob.java index 481994ad7..f62cb2d0a 100644 --- a/src/main/java/com/volmit/iris/util/scheduling/jobs/QueueJob.java +++ b/src/main/java/com/volmit/iris/util/scheduling/jobs/QueueJob.java @@ -50,7 +50,7 @@ public QueueJob queue(KList f) { @Override public void execute() { totalWork = queue.size(); - while(queue.isNotEmpty()) { + while (queue.isNotEmpty()) { execute(queue.pop()); completeWork(); } diff --git a/src/main/java/com/volmit/iris/util/stream/ArraySignificance.java b/src/main/java/com/volmit/iris/util/stream/ArraySignificance.java index 5d718d25d..12c8dbcb1 100644 --- a/src/main/java/com/volmit/iris/util/stream/ArraySignificance.java +++ b/src/main/java/com/volmit/iris/util/stream/ArraySignificance.java @@ -36,8 +36,8 @@ public ArraySignificance(KList types, KList significance) { this.significance = significance; double s = 0; int v = 0; - for(int i = 0; i < significance.size(); i++) { - if(significance.get(i) > s) { + for (int i = 0; i < significance.size(); i++) { + if (significance.get(i) > s) { s = significance.get(i); v = i; } @@ -53,8 +53,8 @@ public KList getFactorTypes() { @Override public double getSignificance(T t) { - for(int i = 0; i < types.size(); i++) { - if(types.get(i).equals(t)) { + for (int i = 0; i < types.size(); i++) { + if (types.get(i).equals(t)) { return significance.get(i); } } diff --git a/src/main/java/com/volmit/iris/util/stream/ProceduralStream.java b/src/main/java/com/volmit/iris/util/stream/ProceduralStream.java index c6ed6bcff..e860f299a 100644 --- a/src/main/java/com/volmit/iris/util/stream/ProceduralStream.java +++ b/src/main/java/com/volmit/iris/util/stream/ProceduralStream.java @@ -48,7 +48,7 @@ public interface ProceduralStream extends ProceduralLayer, Interpolated { static ProceduralStream ofDouble(Function2 f) { try { return of(f, Interpolated.DOUBLE); - } catch(IncompatibleClassChangeError e) { + } catch (IncompatibleClassChangeError e) { Iris.warn(f.toString()); Iris.reportError(e); e.printStackTrace(); @@ -339,11 +339,11 @@ default ProceduralStream select(List types) { default ProceduralStream selectRarity(V... types) { KList rarityTypes = new KList<>(); int totalRarity = 0; - for(V i : types) { + for (V i : types) { totalRarity += IRare.get(i); } - for(V i : types) { + for (V i : types) { rarityTypes.addMultiple(i, totalRarity / IRare.get(i)); } @@ -356,7 +356,7 @@ default ProceduralStream selectRarity(List types) { default ProceduralStream selectRarity(List types, Function loader) { List r = new ArrayList<>(); - for(V f : types) { + for (V f : types) { r.add(loader.apply(f)); } return selectRarity(r); @@ -365,11 +365,11 @@ default ProceduralStream selectRarity(List types, Function int countPossibilities(List types, Function loader) { KList rarityTypes = new KList<>(); int totalRarity = 0; - for(V i : types) { + for (V i : types) { totalRarity += IRare.get(loader.apply(i)); } - for(V i : types) { + for (V i : types) { rarityTypes.addMultiple(i, totalRarity / IRare.get(loader.apply(i))); } @@ -394,13 +394,13 @@ default ProceduralStream style(RNG rng, IrisStyledRange range, IrisData default Hunk fastFill2DParallel(int x, int z) { Hunk hunk = Hunk.newAtomicHunk(16, 16, 1); BurstExecutor e = MultiBurst.burst.burst(256); - int i,j; + int i, j; - for(i = 0; i < 16; i++) { - for(j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) { int fi = i; int fj = j; - e.queue(() -> hunk.setRaw(fi, fj, 0, get(x+ fi, z+ fj))); + e.queue(() -> hunk.setRaw(fi, fj, 0, get(x + fi, z + fj))); } } @@ -409,24 +409,24 @@ default Hunk fastFill2DParallel(int x, int z) { } default void fastFill2DParallel(Hunk hunk, BurstExecutor e, int x, int z) { - int i,j; + int i, j; - for(i = 0; i < 16; i++) { - for(j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) { int fi = i; int fj = j; - e.queue(() -> hunk.setRaw(fi, fj, 0, get(x+ fi, z+ fj))); + e.queue(() -> hunk.setRaw(fi, fj, 0, get(x + fi, z + fj))); } } } default Hunk fastFill2D(int x, int z) { Hunk hunk = Hunk.newArrayHunk(16, 16, 1); - int i,j; + int i, j; - for(i = 0; i < 16; i++) { - for(j = 0; j < 16; j++) { - hunk.setRaw(i, j, 0, get(x+ i, z+ j)); + for (i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) { + hunk.setRaw(i, j, 0, get(x + i, z + j)); } } @@ -444,11 +444,11 @@ default void fill(Hunk h, double x, double y, double z, int parallelism) { default void fill2D(Hunk h, double x, double z, V v, int parallelism) { h.compute2D(parallelism, (xx, __, zz, hh) -> { - for(int i = 0; i < hh.getWidth(); i++) { - for(int k = 0; k < hh.getDepth(); k++) { + for (int i = 0; i < hh.getWidth(); i++) { + for (int k = 0; k < hh.getDepth(); k++) { double n = getDouble(i + x + xx, k + z + zz); - for(int j = 0; j < Math.min(h.getHeight(), n); j++) { + for (int j = 0; j < Math.min(h.getHeight(), n); j++) { hh.set(i, j, k, v); } } @@ -459,11 +459,11 @@ default void fill2D(Hunk h, double x, double z, V v, int parallelism) { default void fill2D(Hunk h, double x, double z, ProceduralStream v, int parallelism) { h.compute2D(parallelism, (xx, yy, zz, hh) -> { - for(int i = 0; i < hh.getWidth(); i++) { - for(int k = 0; k < hh.getDepth(); k++) { + for (int i = 0; i < hh.getWidth(); i++) { + for (int k = 0; k < hh.getDepth(); k++) { double n = getDouble(i + x + xx, k + z + zz); - for(int j = 0; j < Math.min(h.getHeight(), n); j++) { + for (int j = 0; j < Math.min(h.getHeight(), n); j++) { hh.set(i, j, k, v.get(i + x + xx, j + yy, k + z + zz)); } } @@ -474,11 +474,11 @@ default void fill2D(Hunk h, double x, double z, ProceduralStream v, in default void fill2DYLocked(Hunk h, double x, double z, V v, int parallelism) { h.compute2D(parallelism, (xx, yy, zz, hh) -> { - for(int i = 0; i < hh.getWidth(); i++) { - for(int k = 0; k < hh.getDepth(); k++) { + for (int i = 0; i < hh.getWidth(); i++) { + for (int k = 0; k < hh.getDepth(); k++) { double n = getDouble(i + x + xx, k + z + zz); - for(int j = 0; j < Math.min(h.getHeight(), n); j++) { + for (int j = 0; j < Math.min(h.getHeight(), n); j++) { hh.set(i, j, k, v); } } @@ -489,11 +489,11 @@ default void fill2DYLocked(Hunk h, double x, double z, V v, int paralleli default void fill2DYLocked(Hunk h, double x, double z, ProceduralStream v, int parallelism) { h.compute2D(parallelism, (xx, yy, zz, hh) -> { - for(int i = 0; i < hh.getWidth(); i++) { - for(int k = 0; k < hh.getDepth(); k++) { + for (int i = 0; i < hh.getWidth(); i++) { + for (int k = 0; k < hh.getDepth(); k++) { double n = getDouble(i + x + xx, k + z + zz); - for(int j = 0; j < Math.min(h.getHeight(), n); j++) { + for (int j = 0; j < Math.min(h.getHeight(), n); j++) { hh.set(i, j, k, v.get(i + x + xx, k + z + zz)); } } @@ -504,7 +504,7 @@ default void fill2DYLocked(Hunk h, double x, double z, ProceduralStream void fill3D(Hunk h, double x, int y, double z, V v, int parallelism) { h.compute3D(parallelism, (xx, yy, zz, hh) -> hh.iterate((xv, yv, zv) -> { - if(getDouble(xx + xv + x, yy + yv + y, zz + zv + z) > 0.5) { + if (getDouble(xx + xv + x, yy + yv + y, zz + zv + z) > 0.5) { hh.set(xv, yv, zv, v); } })); @@ -513,7 +513,7 @@ default void fill3D(Hunk h, double x, int y, double z, V v, int paralleli default void fill3D(Hunk h, double x, int y, double z, ProceduralStream v, int parallelism) { h.compute3D(parallelism, (xx, yy, zz, hh) -> hh.iterate((xv, yv, zv) -> { - if(getDouble(xx + xv + x, yy + yv + y, zz + zv + z) > 0.5) { + if (getDouble(xx + xv + x, yy + yv + y, zz + zv + z) > 0.5) { hh.set(xv, yv, zv, v.get(xx + xv + x, yy + yv + y, zz + zv + z)); } })); @@ -560,16 +560,16 @@ default double getDouble(double x, double y, double z) { ProceduralStream getSource(); default void fillChunk(int x, int z, T[] c) { - if(c.length != 256) { + if (c.length != 256) { throw new RuntimeException("Not 256 Length for chunk get"); } int xs = x << 4; int zs = z << 4; - for(int i = 0; i < 16; i++) { - for(int j = 0; j < 16; j++) { - c[Cache.to1D(i+xs, j+zs, 0, 16, 16)] = get(i+xs, j+zs); + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { + c[Cache.to1D(i + xs, j + zs, 0, 16, 16)] = get(i + xs, j + zs); } } } diff --git a/src/main/java/com/volmit/iris/util/stream/convert/AwareConversionStream2D.java b/src/main/java/com/volmit/iris/util/stream/convert/AwareConversionStream2D.java index 6fd4c3775..2ddecb93b 100644 --- a/src/main/java/com/volmit/iris/util/stream/convert/AwareConversionStream2D.java +++ b/src/main/java/com/volmit/iris/util/stream/convert/AwareConversionStream2D.java @@ -34,7 +34,7 @@ public AwareConversionStream2D(ProceduralStream stream, Function3 stream, Function4 stream, Function converter) { @Override public double toDouble(V t) { - if(t instanceof Double) { + if (t instanceof Double) { return (Double) t; } diff --git a/src/main/java/com/volmit/iris/util/stream/convert/SelectionStream.java b/src/main/java/com/volmit/iris/util/stream/convert/SelectionStream.java index 83c9df4d8..d4ee0038a 100644 --- a/src/main/java/com/volmit/iris/util/stream/convert/SelectionStream.java +++ b/src/main/java/com/volmit/iris/util/stream/convert/SelectionStream.java @@ -50,7 +50,7 @@ public T fromDouble(double d) { @Override public T get(double x, double z) { - if(options.length == 0) { + if (options.length == 0) { return null; } @@ -59,7 +59,7 @@ public T get(double x, double z) { @Override public T get(double x, double y, double z) { - if(options.length == 0) { + if (options.length == 0) { return null; } diff --git a/src/main/java/com/volmit/iris/util/stream/convert/SignificanceStream.java b/src/main/java/com/volmit/iris/util/stream/convert/SignificanceStream.java index b2a13d7b9..2353cb641 100644 --- a/src/main/java/com/volmit/iris/util/stream/convert/SignificanceStream.java +++ b/src/main/java/com/volmit/iris/util/stream/convert/SignificanceStream.java @@ -55,14 +55,14 @@ public K get(double x, double z) { double m = (360d / checks); double v = 0; - for(int i = 0; i < 360; i += m) { + for (int i = 0; i < 360; i += m) { double sin = Math.sin(Math.toRadians(i)); double cos = Math.cos(Math.toRadians(i)); double cx = x + ((radius * cos) - (radius * sin)); double cz = z + ((radius * sin) + (radius * cos)); T t = stream.get(cx, cz); - if(ke.addIfMissing(t)) { + if (ke.addIfMissing(t)) { va.add(1D); v++; } else { @@ -71,7 +71,7 @@ public K get(double x, double z) { } } - for(int i = 0; i < va.size(); i++) { + for (int i = 0; i < va.size(); i++) { va.set(i, va.get(i) / v); } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/BiHermiteStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/BiHermiteStream.java index e0604eb03..97350b912 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/BiHermiteStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/BiHermiteStream.java @@ -56,23 +56,23 @@ public T interpolate(double x, double y) { //@builder return getTypedSource().fromDouble(IrisInterpolation.bihermite( - getTypedSource().getDouble(x0, z0), - getTypedSource().getDouble(x0, z1), - getTypedSource().getDouble(x0, z2), - getTypedSource().getDouble(x0, z3), - getTypedSource().getDouble(x1, z0), - getTypedSource().getDouble(x1, z1), - getTypedSource().getDouble(x1, z2), - getTypedSource().getDouble(x1, z3), - getTypedSource().getDouble(x2, z0), - getTypedSource().getDouble(x2, z1), - getTypedSource().getDouble(x2, z2), - getTypedSource().getDouble(x2, z3), - getTypedSource().getDouble(x3, z0), - getTypedSource().getDouble(x3, z1), - getTypedSource().getDouble(x3, z2), - getTypedSource().getDouble(x3, z3), - px, pz, tension, bias)); + getTypedSource().getDouble(x0, z0), + getTypedSource().getDouble(x0, z1), + getTypedSource().getDouble(x0, z2), + getTypedSource().getDouble(x0, z3), + getTypedSource().getDouble(x1, z0), + getTypedSource().getDouble(x1, z1), + getTypedSource().getDouble(x1, z2), + getTypedSource().getDouble(x1, z3), + getTypedSource().getDouble(x2, z0), + getTypedSource().getDouble(x2, z1), + getTypedSource().getDouble(x2, z2), + getTypedSource().getDouble(x2, z3), + getTypedSource().getDouble(x3, z0), + getTypedSource().getDouble(x3, z1), + getTypedSource().getDouble(x3, z2), + getTypedSource().getDouble(x3, z3), + px, pz, tension, bias)); //@done } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/BiStarcastStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/BiStarcastStream.java index 05d696d67..d9529a9e9 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/BiStarcastStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/BiStarcastStream.java @@ -35,7 +35,7 @@ public T interpolate(double x, double y) { double m = (360D / checks); double v = 0; - for(int i = 0; i < 360; i += m) { + for (int i = 0; i < 360; i += m) { double sin = Math.sin(Math.toRadians(i)); double cos = Math.cos(Math.toRadians(i)); double cx = x + ((rad * cos) - (rad * sin)); diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/BicubicStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/BicubicStream.java index 288b46122..3b9302bcb 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/BicubicStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/BicubicStream.java @@ -48,23 +48,23 @@ public T interpolate(double x, double y) { //@builder return getTypedSource().fromDouble(IrisInterpolation.bicubic( - getTypedSource().getDouble(x0, z0), - getTypedSource().getDouble(x0, z1), - getTypedSource().getDouble(x0, z2), - getTypedSource().getDouble(x0, z3), - getTypedSource().getDouble(x1, z0), - getTypedSource().getDouble(x1, z1), - getTypedSource().getDouble(x1, z2), - getTypedSource().getDouble(x1, z3), - getTypedSource().getDouble(x2, z0), - getTypedSource().getDouble(x2, z1), - getTypedSource().getDouble(x2, z2), - getTypedSource().getDouble(x2, z3), - getTypedSource().getDouble(x3, z0), - getTypedSource().getDouble(x3, z1), - getTypedSource().getDouble(x3, z2), - getTypedSource().getDouble(x3, z3), - px, pz)); + getTypedSource().getDouble(x0, z0), + getTypedSource().getDouble(x0, z1), + getTypedSource().getDouble(x0, z2), + getTypedSource().getDouble(x0, z3), + getTypedSource().getDouble(x1, z0), + getTypedSource().getDouble(x1, z1), + getTypedSource().getDouble(x1, z2), + getTypedSource().getDouble(x1, z3), + getTypedSource().getDouble(x2, z0), + getTypedSource().getDouble(x2, z1), + getTypedSource().getDouble(x2, z2), + getTypedSource().getDouble(x2, z3), + getTypedSource().getDouble(x3, z0), + getTypedSource().getDouble(x3, z1), + getTypedSource().getDouble(x3, z2), + getTypedSource().getDouble(x3, z3), + px, pz)); //@done } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/BilinearStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/BilinearStream.java index a7e0cf373..e92d9f53a 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/BilinearStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/BilinearStream.java @@ -44,11 +44,11 @@ public T interpolate(double x, double y) { //@builder return getTypedSource().fromDouble(IrisInterpolation.blerp( - getTypedSource().getDouble(x1, z1), - getTypedSource().getDouble(x2, z1), - getTypedSource().getDouble(x1, z2), - getTypedSource().getDouble(x2, z2), - px, pz)); + getTypedSource().getDouble(x1, z1), + getTypedSource().getDouble(x2, z1), + getTypedSource().getDouble(x1, z2), + getTypedSource().getDouble(x2, z2), + px, pz)); //@done } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolated.java b/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolated.java index b61fb2acb..9833c58ce 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolated.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolated.java @@ -58,7 +58,7 @@ public T fromDouble(double d) { T fromDouble(double d); default InterpolatorFactory interpolate() { - if(this instanceof ProceduralStream) { + if (this instanceof ProceduralStream) { return new InterpolatorFactory<>((ProceduralStream) this); } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolator.java b/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolator.java index 6df5068b0..22e600a93 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolator.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/Interpolator.java @@ -23,7 +23,7 @@ public interface Interpolator { @SuppressWarnings("unchecked") default InterpolatorFactory into() { - if(this instanceof ProceduralStream) { + if (this instanceof ProceduralStream) { return new InterpolatorFactory<>((ProceduralStream) this); } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/TriHermiteStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/TriHermiteStream.java index 0688599a4..079675397 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/TriHermiteStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/TriHermiteStream.java @@ -60,71 +60,71 @@ public T interpolate(double x, double y, double z) { //@builder return getTypedSource().fromDouble(IrisInterpolation.trihermite( - getTypedSource().getDouble(x0, y0, z0), - getTypedSource().getDouble(x0, y0, z1), - getTypedSource().getDouble(x0, y0, z2), - getTypedSource().getDouble(x0, y0, z3), - getTypedSource().getDouble(x1, y0, z0), - getTypedSource().getDouble(x1, y0, z1), - getTypedSource().getDouble(x1, y0, z2), - getTypedSource().getDouble(x1, y0, z3), - getTypedSource().getDouble(x2, y0, z0), - getTypedSource().getDouble(x2, y0, z1), - getTypedSource().getDouble(x2, y0, z2), - getTypedSource().getDouble(x2, y0, z3), - getTypedSource().getDouble(x3, y0, z0), - getTypedSource().getDouble(x3, y0, z1), - getTypedSource().getDouble(x3, y0, z2), - getTypedSource().getDouble(x3, y0, z3), - getTypedSource().getDouble(x0, y1, z0), - getTypedSource().getDouble(x0, y1, z1), - getTypedSource().getDouble(x0, y1, z2), - getTypedSource().getDouble(x0, y1, z3), - getTypedSource().getDouble(x1, y1, z0), - getTypedSource().getDouble(x1, y1, z1), - getTypedSource().getDouble(x1, y1, z2), - getTypedSource().getDouble(x1, y1, z3), - getTypedSource().getDouble(x2, y1, z0), - getTypedSource().getDouble(x2, y1, z1), - getTypedSource().getDouble(x2, y1, z2), - getTypedSource().getDouble(x2, y1, z3), - getTypedSource().getDouble(x3, y1, z0), - getTypedSource().getDouble(x3, y1, z1), - getTypedSource().getDouble(x3, y1, z2), - getTypedSource().getDouble(x3, y1, z3), - getTypedSource().getDouble(x0, y2, z0), - getTypedSource().getDouble(x0, y2, z1), - getTypedSource().getDouble(x0, y2, z2), - getTypedSource().getDouble(x0, y2, z3), - getTypedSource().getDouble(x1, y2, z0), - getTypedSource().getDouble(x1, y2, z1), - getTypedSource().getDouble(x1, y2, z2), - getTypedSource().getDouble(x1, y2, z3), - getTypedSource().getDouble(x2, y2, z0), - getTypedSource().getDouble(x2, y2, z1), - getTypedSource().getDouble(x2, y2, z2), - getTypedSource().getDouble(x2, y2, z3), - getTypedSource().getDouble(x3, y2, z0), - getTypedSource().getDouble(x3, y2, z1), - getTypedSource().getDouble(x3, y2, z2), - getTypedSource().getDouble(x3, y2, z3), - getTypedSource().getDouble(x0, y3, z0), - getTypedSource().getDouble(x0, y3, z1), - getTypedSource().getDouble(x0, y3, z2), - getTypedSource().getDouble(x0, y3, z3), - getTypedSource().getDouble(x1, y3, z0), - getTypedSource().getDouble(x1, y3, z1), - getTypedSource().getDouble(x1, y3, z2), - getTypedSource().getDouble(x1, y3, z3), - getTypedSource().getDouble(x2, y3, z0), - getTypedSource().getDouble(x2, y3, z1), - getTypedSource().getDouble(x2, y3, z2), - getTypedSource().getDouble(x2, y3, z3), - getTypedSource().getDouble(x3, y3, z0), - getTypedSource().getDouble(x3, y3, z1), - getTypedSource().getDouble(x3, y3, z2), - getTypedSource().getDouble(x3, y3, z3), - px, pz, py, tension, bias)); + getTypedSource().getDouble(x0, y0, z0), + getTypedSource().getDouble(x0, y0, z1), + getTypedSource().getDouble(x0, y0, z2), + getTypedSource().getDouble(x0, y0, z3), + getTypedSource().getDouble(x1, y0, z0), + getTypedSource().getDouble(x1, y0, z1), + getTypedSource().getDouble(x1, y0, z2), + getTypedSource().getDouble(x1, y0, z3), + getTypedSource().getDouble(x2, y0, z0), + getTypedSource().getDouble(x2, y0, z1), + getTypedSource().getDouble(x2, y0, z2), + getTypedSource().getDouble(x2, y0, z3), + getTypedSource().getDouble(x3, y0, z0), + getTypedSource().getDouble(x3, y0, z1), + getTypedSource().getDouble(x3, y0, z2), + getTypedSource().getDouble(x3, y0, z3), + getTypedSource().getDouble(x0, y1, z0), + getTypedSource().getDouble(x0, y1, z1), + getTypedSource().getDouble(x0, y1, z2), + getTypedSource().getDouble(x0, y1, z3), + getTypedSource().getDouble(x1, y1, z0), + getTypedSource().getDouble(x1, y1, z1), + getTypedSource().getDouble(x1, y1, z2), + getTypedSource().getDouble(x1, y1, z3), + getTypedSource().getDouble(x2, y1, z0), + getTypedSource().getDouble(x2, y1, z1), + getTypedSource().getDouble(x2, y1, z2), + getTypedSource().getDouble(x2, y1, z3), + getTypedSource().getDouble(x3, y1, z0), + getTypedSource().getDouble(x3, y1, z1), + getTypedSource().getDouble(x3, y1, z2), + getTypedSource().getDouble(x3, y1, z3), + getTypedSource().getDouble(x0, y2, z0), + getTypedSource().getDouble(x0, y2, z1), + getTypedSource().getDouble(x0, y2, z2), + getTypedSource().getDouble(x0, y2, z3), + getTypedSource().getDouble(x1, y2, z0), + getTypedSource().getDouble(x1, y2, z1), + getTypedSource().getDouble(x1, y2, z2), + getTypedSource().getDouble(x1, y2, z3), + getTypedSource().getDouble(x2, y2, z0), + getTypedSource().getDouble(x2, y2, z1), + getTypedSource().getDouble(x2, y2, z2), + getTypedSource().getDouble(x2, y2, z3), + getTypedSource().getDouble(x3, y2, z0), + getTypedSource().getDouble(x3, y2, z1), + getTypedSource().getDouble(x3, y2, z2), + getTypedSource().getDouble(x3, y2, z3), + getTypedSource().getDouble(x0, y3, z0), + getTypedSource().getDouble(x0, y3, z1), + getTypedSource().getDouble(x0, y3, z2), + getTypedSource().getDouble(x0, y3, z3), + getTypedSource().getDouble(x1, y3, z0), + getTypedSource().getDouble(x1, y3, z1), + getTypedSource().getDouble(x1, y3, z2), + getTypedSource().getDouble(x1, y3, z3), + getTypedSource().getDouble(x2, y3, z0), + getTypedSource().getDouble(x2, y3, z1), + getTypedSource().getDouble(x2, y3, z2), + getTypedSource().getDouble(x2, y3, z3), + getTypedSource().getDouble(x3, y3, z0), + getTypedSource().getDouble(x3, y3, z1), + getTypedSource().getDouble(x3, y3, z2), + getTypedSource().getDouble(x3, y3, z3), + px, pz, py, tension, bias)); //@done } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/TriStarcastStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/TriStarcastStream.java index 1c8db4b91..5c91ef598 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/TriStarcastStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/TriStarcastStream.java @@ -35,7 +35,7 @@ public T interpolate(double x, double y, double z) { double m = (360D / checks); double v = 0; - for(int i = 0; i < 360; i += m) { + for (int i = 0; i < 360; i += m) { double sin = Math.sin(Math.toRadians(i)); double cos = Math.cos(Math.toRadians(i)); double cx = x + ((rad * cos) - (rad * sin)); diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/TricubicStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/TricubicStream.java index 4ad809a27..bbb007aba 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/TricubicStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/TricubicStream.java @@ -56,74 +56,74 @@ public T interpolate(double x, double y, double z) { //@builder return getTypedSource().fromDouble(IrisInterpolation.tricubic( - getTypedSource().getDouble(x0, y0, z0), - getTypedSource().getDouble(x0, y0, z1), - getTypedSource().getDouble(x0, y0, z2), - getTypedSource().getDouble(x0, y0, z3), - getTypedSource().getDouble(x1, y0, z0), - getTypedSource().getDouble(x1, y0, z1), - getTypedSource().getDouble(x1, y0, z2), - getTypedSource().getDouble(x1, y0, z3), - getTypedSource().getDouble(x2, y0, z0), - getTypedSource().getDouble(x2, y0, z1), - getTypedSource().getDouble(x2, y0, z2), - getTypedSource().getDouble(x2, y0, z3), - getTypedSource().getDouble(x3, y0, z0), - getTypedSource().getDouble(x3, y0, z1), - getTypedSource().getDouble(x3, y0, z2), - getTypedSource().getDouble(x3, y0, z3), + getTypedSource().getDouble(x0, y0, z0), + getTypedSource().getDouble(x0, y0, z1), + getTypedSource().getDouble(x0, y0, z2), + getTypedSource().getDouble(x0, y0, z3), + getTypedSource().getDouble(x1, y0, z0), + getTypedSource().getDouble(x1, y0, z1), + getTypedSource().getDouble(x1, y0, z2), + getTypedSource().getDouble(x1, y0, z3), + getTypedSource().getDouble(x2, y0, z0), + getTypedSource().getDouble(x2, y0, z1), + getTypedSource().getDouble(x2, y0, z2), + getTypedSource().getDouble(x2, y0, z3), + getTypedSource().getDouble(x3, y0, z0), + getTypedSource().getDouble(x3, y0, z1), + getTypedSource().getDouble(x3, y0, z2), + getTypedSource().getDouble(x3, y0, z3), - getTypedSource().getDouble(x0, y1, z0), - getTypedSource().getDouble(x0, y1, z1), - getTypedSource().getDouble(x0, y1, z2), - getTypedSource().getDouble(x0, y1, z3), - getTypedSource().getDouble(x1, y1, z0), - getTypedSource().getDouble(x1, y1, z1), - getTypedSource().getDouble(x1, y1, z2), - getTypedSource().getDouble(x1, y1, z3), - getTypedSource().getDouble(x2, y1, z0), - getTypedSource().getDouble(x2, y1, z1), - getTypedSource().getDouble(x2, y1, z2), - getTypedSource().getDouble(x2, y1, z3), - getTypedSource().getDouble(x3, y1, z0), - getTypedSource().getDouble(x3, y1, z1), - getTypedSource().getDouble(x3, y1, z2), - getTypedSource().getDouble(x3, y1, z3), + getTypedSource().getDouble(x0, y1, z0), + getTypedSource().getDouble(x0, y1, z1), + getTypedSource().getDouble(x0, y1, z2), + getTypedSource().getDouble(x0, y1, z3), + getTypedSource().getDouble(x1, y1, z0), + getTypedSource().getDouble(x1, y1, z1), + getTypedSource().getDouble(x1, y1, z2), + getTypedSource().getDouble(x1, y1, z3), + getTypedSource().getDouble(x2, y1, z0), + getTypedSource().getDouble(x2, y1, z1), + getTypedSource().getDouble(x2, y1, z2), + getTypedSource().getDouble(x2, y1, z3), + getTypedSource().getDouble(x3, y1, z0), + getTypedSource().getDouble(x3, y1, z1), + getTypedSource().getDouble(x3, y1, z2), + getTypedSource().getDouble(x3, y1, z3), - getTypedSource().getDouble(x0, y2, z0), - getTypedSource().getDouble(x0, y2, z1), - getTypedSource().getDouble(x0, y2, z2), - getTypedSource().getDouble(x0, y2, z3), - getTypedSource().getDouble(x1, y2, z0), - getTypedSource().getDouble(x1, y2, z1), - getTypedSource().getDouble(x1, y2, z2), - getTypedSource().getDouble(x1, y2, z3), - getTypedSource().getDouble(x2, y2, z0), - getTypedSource().getDouble(x2, y2, z1), - getTypedSource().getDouble(x2, y2, z2), - getTypedSource().getDouble(x2, y2, z3), - getTypedSource().getDouble(x3, y2, z0), - getTypedSource().getDouble(x3, y2, z1), - getTypedSource().getDouble(x3, y2, z2), - getTypedSource().getDouble(x3, y2, z3), + getTypedSource().getDouble(x0, y2, z0), + getTypedSource().getDouble(x0, y2, z1), + getTypedSource().getDouble(x0, y2, z2), + getTypedSource().getDouble(x0, y2, z3), + getTypedSource().getDouble(x1, y2, z0), + getTypedSource().getDouble(x1, y2, z1), + getTypedSource().getDouble(x1, y2, z2), + getTypedSource().getDouble(x1, y2, z3), + getTypedSource().getDouble(x2, y2, z0), + getTypedSource().getDouble(x2, y2, z1), + getTypedSource().getDouble(x2, y2, z2), + getTypedSource().getDouble(x2, y2, z3), + getTypedSource().getDouble(x3, y2, z0), + getTypedSource().getDouble(x3, y2, z1), + getTypedSource().getDouble(x3, y2, z2), + getTypedSource().getDouble(x3, y2, z3), - getTypedSource().getDouble(x0, y3, z0), - getTypedSource().getDouble(x0, y3, z1), - getTypedSource().getDouble(x0, y3, z2), - getTypedSource().getDouble(x0, y3, z3), - getTypedSource().getDouble(x1, y3, z0), - getTypedSource().getDouble(x1, y3, z1), - getTypedSource().getDouble(x1, y3, z2), - getTypedSource().getDouble(x1, y3, z3), - getTypedSource().getDouble(x2, y3, z0), - getTypedSource().getDouble(x2, y3, z1), - getTypedSource().getDouble(x2, y3, z2), - getTypedSource().getDouble(x2, y3, z3), - getTypedSource().getDouble(x3, y3, z0), - getTypedSource().getDouble(x3, y3, z1), - getTypedSource().getDouble(x3, y3, z2), - getTypedSource().getDouble(x3, y3, z3), - px, pz, py)); + getTypedSource().getDouble(x0, y3, z0), + getTypedSource().getDouble(x0, y3, z1), + getTypedSource().getDouble(x0, y3, z2), + getTypedSource().getDouble(x0, y3, z3), + getTypedSource().getDouble(x1, y3, z0), + getTypedSource().getDouble(x1, y3, z1), + getTypedSource().getDouble(x1, y3, z2), + getTypedSource().getDouble(x1, y3, z3), + getTypedSource().getDouble(x2, y3, z0), + getTypedSource().getDouble(x2, y3, z1), + getTypedSource().getDouble(x2, y3, z2), + getTypedSource().getDouble(x2, y3, z3), + getTypedSource().getDouble(x3, y3, z0), + getTypedSource().getDouble(x3, y3, z1), + getTypedSource().getDouble(x3, y3, z2), + getTypedSource().getDouble(x3, y3, z3), + px, pz, py)); //@done } diff --git a/src/main/java/com/volmit/iris/util/stream/interpolation/TrilinearStream.java b/src/main/java/com/volmit/iris/util/stream/interpolation/TrilinearStream.java index 4be5f5d9f..bfbd78110 100644 --- a/src/main/java/com/volmit/iris/util/stream/interpolation/TrilinearStream.java +++ b/src/main/java/com/volmit/iris/util/stream/interpolation/TrilinearStream.java @@ -50,15 +50,15 @@ public T interpolate(double x, double y, double z) { //@builder return getTypedSource().fromDouble(IrisInterpolation.trilerp( - getTypedSource().getDouble(x1, y1, z1), - getTypedSource().getDouble(x2, y1, z1), - getTypedSource().getDouble(x1, y1, z2), - getTypedSource().getDouble(x2, y1, z2), - getTypedSource().getDouble(x1, y2, z1), - getTypedSource().getDouble(x2, y2, z1), - getTypedSource().getDouble(x1, y2, z2), - getTypedSource().getDouble(x2, y2, z2), - px, pz, py)); + getTypedSource().getDouble(x1, y1, z1), + getTypedSource().getDouble(x2, y1, z1), + getTypedSource().getDouble(x1, y1, z2), + getTypedSource().getDouble(x2, y1, z2), + getTypedSource().getDouble(x1, y2, z1), + getTypedSource().getDouble(x2, y2, z1), + getTypedSource().getDouble(x1, y2, z2), + getTypedSource().getDouble(x2, y2, z2), + px, pz, py)); //@done } diff --git a/src/main/java/com/volmit/iris/util/stream/utility/ContextInjectingStream.java b/src/main/java/com/volmit/iris/util/stream/utility/ContextInjectingStream.java index 0b9a05fa6..5e0ae3bb8 100644 --- a/src/main/java/com/volmit/iris/util/stream/utility/ContextInjectingStream.java +++ b/src/main/java/com/volmit/iris/util/stream/utility/ContextInjectingStream.java @@ -18,13 +18,13 @@ public ContextInjectingStream(ProceduralStream stream, Function3> 4 == chunkContext.getX() >> 4 && (int)z >> 4 == chunkContext.getZ() >> 4) { - T t = contextAccessor.apply(chunkContext, (int)x&15, (int)z&15); + if (chunkContext != null && (int) x >> 4 == chunkContext.getX() >> 4 && (int) z >> 4 == chunkContext.getZ() >> 4) { + T t = contextAccessor.apply(chunkContext, (int) x & 15, (int) z & 15); - if(t != null) { + if (t != null) { return t; } } diff --git a/src/main/java/com/volmit/iris/util/stream/utility/NullSafeStream.java b/src/main/java/com/volmit/iris/util/stream/utility/NullSafeStream.java index 864c9d3d3..b17dd0076 100644 --- a/src/main/java/com/volmit/iris/util/stream/utility/NullSafeStream.java +++ b/src/main/java/com/volmit/iris/util/stream/utility/NullSafeStream.java @@ -45,7 +45,7 @@ public T fromDouble(double d) { public T get(double x, double z) { T t = stream.get(x, z); - if(t == null) { + if (t == null) { return ifNull; } @@ -56,7 +56,7 @@ public T get(double x, double z) { public T get(double x, double y, double z) { T t = stream.get(x, y, z); - if(t == null) { + if (t == null) { return ifNull; } diff --git a/src/main/java/com/volmit/iris/util/stream/utility/ProfiledStream.java b/src/main/java/com/volmit/iris/util/stream/utility/ProfiledStream.java index 4b7a67f3d..e1002e545 100644 --- a/src/main/java/com/volmit/iris/util/stream/utility/ProfiledStream.java +++ b/src/main/java/com/volmit/iris/util/stream/utility/ProfiledStream.java @@ -32,9 +32,9 @@ public class ProfiledStream extends BasicStream { public static final AtomicInteger ids = new AtomicInteger(); + public static final KList> profiles = new KList<>(); private final int id; private final RollingSequence metrics; - public static final KList> profiles = new KList<>(); public ProfiledStream(ProceduralStream stream, int memory) { super(stream); @@ -46,7 +46,7 @@ public ProfiledStream(ProceduralStream stream, int memory) { public static void print(Consumer printer, ProceduralStream stream) { KList tails = getTails(stream); int ind = tails.size(); - for(ProfiledTail i : tails) { + for (ProfiledTail i : tails) { printer.accept(Form.repeat(" ", ind) + i); ind--; } @@ -56,11 +56,11 @@ private static KList> getAllChildren(ProceduralStream s) KList> v = new KList<>(); ProceduralStream cursor = s; - for(int i = 0; i < 32; i++) { + for (int i = 0; i < 32; i++) { v.add(cursor); cursor = nextChuld(cursor); - if(cursor == null) { + if (cursor == null) { break; } } @@ -74,7 +74,7 @@ private static ProceduralStream nextChuld(ProceduralStream s) { } private static ProfiledTail getTail(ProceduralStream t) { - if(t instanceof ProfiledStream s) { + if (t instanceof ProfiledStream s) { return new ProfiledTail(s.getId(), s.getMetrics(), s.getClass().getSimpleName().replaceAll("\\QStream\\E", "")); } @@ -85,15 +85,15 @@ private static ProfiledTail getTail(ProceduralStream t) { private static KList getTails(ProceduralStream t) { KList tails = new KList<>(); - for(ProceduralStream v : getAllChildren(t)) { + for (ProceduralStream v : getAllChildren(t)) { ProfiledTail p = getTail(v); - if(p != null) { + if (p != null) { tails.add(p); } } - if(tails.isEmpty()) { + if (tails.isEmpty()) { return null; } @@ -101,7 +101,7 @@ private static KList getTails(ProceduralStream t) { KList tailx = new KList<>(); tailx.add(cursor); - while(tails.isNotEmpty()) { + while (tails.isNotEmpty()) { tailx.add(cursor); ProfiledTail parent = tails.popLast(); parent.setChild(cursor); @@ -132,7 +132,7 @@ public T get(double x, double z) { T t = getTypedSource().get(x, z); try { metrics.put(p.getMilliseconds()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } @@ -145,7 +145,7 @@ public T get(double x, double y, double z) { T t = getTypedSource().get(x, y, z); try { metrics.put(p.getMilliseconds()); - } catch(Throwable e) { + } catch (Throwable e) { Iris.reportError(e); } diff --git a/src/main/java/com/volmit/iris/util/stream/utility/SemaphoreStream.java b/src/main/java/com/volmit/iris/util/stream/utility/SemaphoreStream.java index 94b7f9aa9..fb3800c9c 100644 --- a/src/main/java/com/volmit/iris/util/stream/utility/SemaphoreStream.java +++ b/src/main/java/com/volmit/iris/util/stream/utility/SemaphoreStream.java @@ -48,7 +48,7 @@ public T get(double x, double z) { T t = getTypedSource().get(x, z); semaphore.release(); return t; - } catch(InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); } @@ -62,7 +62,7 @@ public T get(double x, double y, double z) { T t = getTypedSource().get(x, y, z); semaphore.release(); return t; - } catch(InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); } diff --git a/src/main/java/com/volmit/iris/util/stream/utility/SynchronizedStream.java b/src/main/java/com/volmit/iris/util/stream/utility/SynchronizedStream.java index 95f3137aa..ff0c4a0be 100644 --- a/src/main/java/com/volmit/iris/util/stream/utility/SynchronizedStream.java +++ b/src/main/java/com/volmit/iris/util/stream/utility/SynchronizedStream.java @@ -38,14 +38,14 @@ public T fromDouble(double d) { @Override public T get(double x, double z) { - synchronized(getTypedSource()) { + synchronized (getTypedSource()) { return getTypedSource().get(x, z); } } @Override public T get(double x, double y, double z) { - synchronized(getTypedSource()) { + synchronized (getTypedSource()) { return getTypedSource().get(x, y, z); } } diff --git a/src/main/java/com/volmit/iris/util/stream/utility/WasteDetector.java b/src/main/java/com/volmit/iris/util/stream/utility/WasteDetector.java index 6fab36e03..498a93d03 100644 --- a/src/main/java/com/volmit/iris/util/stream/utility/WasteDetector.java +++ b/src/main/java/com/volmit/iris/util/stream/utility/WasteDetector.java @@ -22,18 +22,33 @@ public WasteDetector(ProceduralStream stream, String name) { accesses = new AtomicInteger(0); } + public static void printAll() { + if (checking) { + Iris.warn("========================================================="); + for (String i : allAccesses.sortKNumber().reverse()) { + Iris.warn(i + ": " + allAccesses.get(i) + " Time(s)"); + } + Iris.warn("========================================================="); + for (String i : allAccesses.sortKNumber().reverse()) { + Iris.warn("======== " + i + " ========"); + for (Throwable j : allThrows.get(i)) { + j.printStackTrace(); + } + Iris.warn("---------------------------------------------------------"); + } + Iris.warn("========================================================="); + } + } + @Override public T get(double x, double z) { - if(checking) - { - if(x == 7 && z == 7) { + if (checking) { + if (x == 7 && z == 7) { // AHHHAAA! allAccesses.compute(name, (k, v) -> v == null ? 1 : v + 1); try { throw new RuntimeException(); - } - - catch(RuntimeException e) { + } catch (RuntimeException e) { allThrows.computeIfAbsent(name, (k) -> new KList<>()).add(e); } } @@ -42,25 +57,6 @@ public T get(double x, double z) { return getTypedSource().get(x, z); } - public static void printAll() { - if(checking) - { - Iris.warn("========================================================="); - for(String i : allAccesses.sortKNumber().reverse()) { - Iris.warn(i + ": " + allAccesses.get(i) + " Time(s)"); - } - Iris.warn("========================================================="); - for(String i : allAccesses.sortKNumber().reverse()) { - Iris.warn("======== "+ i + " ========"); - for(Throwable j : allThrows.get(i)) { - j.printStackTrace(); - } - Iris.warn("---------------------------------------------------------"); - } - Iris.warn("========================================================="); - } - } - @Override public T get(double x, double y, double z) { return getTypedSource().get(x, y, z); diff --git a/src/main/java/com/volmit/iris/util/uniques/U.java b/src/main/java/com/volmit/iris/util/uniques/U.java index 97f559104..738c186f4 100644 --- a/src/main/java/com/volmit/iris/util/uniques/U.java +++ b/src/main/java/com/volmit/iris/util/uniques/U.java @@ -3,9 +3,8 @@ import java.io.File; public class U { - public static void main(String[] a) - { - UniqueRenderer r = new UniqueRenderer("helloworld", 2560 , 1440); + public static void main(String[] a) { + UniqueRenderer r = new UniqueRenderer("helloworld", 2560, 1440); r.writeCollectionFrames(new File("collection"), 1, 1024); diff --git a/src/main/java/com/volmit/iris/util/uniques/UBufferedImage.java b/src/main/java/com/volmit/iris/util/uniques/UBufferedImage.java index 3211d49a2..21c5df154 100644 --- a/src/main/java/com/volmit/iris/util/uniques/UBufferedImage.java +++ b/src/main/java/com/volmit/iris/util/uniques/UBufferedImage.java @@ -8,8 +8,7 @@ public class UBufferedImage implements UImage { private final BufferedImage buf; - public UBufferedImage(BufferedImage buf) - { + public UBufferedImage(BufferedImage buf) { this.buf = buf; } @@ -38,13 +37,9 @@ public Color get(int x, int y) { @Override public void set(int x, int y, Color color) { - try - { + try { buf.setRGB(x, y, color.getRGB()); - } - - catch(Throwable e) - { + } catch (Throwable e) { } } diff --git a/src/main/java/com/volmit/iris/util/uniques/UFeature.java b/src/main/java/com/volmit/iris/util/uniques/UFeature.java index e9d5a7c97..1da6de733 100644 --- a/src/main/java/com/volmit/iris/util/uniques/UFeature.java +++ b/src/main/java/com/volmit/iris/util/uniques/UFeature.java @@ -25,46 +25,39 @@ public interface UFeature { void render(UImage image, RNG rng, double time, Consumer progressor, UFeatureMeta meta); - default Color color(CNG hue, CNG saturation, CNG brightness, double x, double y, double t) - { - return Color.getHSBColor((float)hue.fitDouble(0, 1, x + t, y + t), - (float)saturation.fitDouble(0, 1, x + t, y + t), - (float)brightness.fitDouble(0, 1, x + t, y + t)); + default Color color(CNG hue, CNG saturation, CNG brightness, double x, double y, double t) { + return Color.getHSBColor((float) hue.fitDouble(0, 1, x + t, y + t), + (float) saturation.fitDouble(0, 1, x + t, y + t), + (float) brightness.fitDouble(0, 1, x + t, y + t)); } - default InterpolationMethod interpolator(RNG rng) - { + default InterpolationMethod interpolator(RNG rng) { return rng.pick( UniqueRenderer.renderer.getInterpolators() ); } - default CNG generator(String key, RNG rng, double scaleMod, long salt, UFeatureMeta meta) - { + default CNG generator(String key, RNG rng, double scaleMod, long salt, UFeatureMeta meta) { return generator(key, rng, scaleMod, rng.i(1, 3), rng.i(1, 5), salt, meta); } - default CNG generator(String key, RNG rng, double scaleMod, int fractures, int composites, long salt, UFeatureMeta meta) - { + default CNG generator(String key, RNG rng, double scaleMod, int fractures, int composites, long salt, UFeatureMeta meta) { RNG rngg = rng.nextParallelRNG(salt); CNG cng = rng.pick(UniqueRenderer.renderer.getStyles()).create(rngg).oct(rng.i(1, 5)); RNG rngf = rngg.nextParallelRNG(-salt); cng.scale(rngf.d(0.33 * scaleMod, 1.66 * scaleMod)); - if(fractures > 0) - { - cng.fractureWith(generator(null, rngf.nextParallelRNG(salt + fractures), scaleMod / rng.d(4, 17), fractures-1, composites, salt + fractures + 55, null), scaleMod * rngf.nextDouble(16, 256)); + if (fractures > 0) { + cng.fractureWith(generator(null, rngf.nextParallelRNG(salt + fractures), scaleMod / rng.d(4, 17), fractures - 1, composites, salt + fractures + 55, null), scaleMod * rngf.nextDouble(16, 256)); } - for(int i = 0; i < composites; i++) - { - CNG sub = generator(null, rngf.nextParallelRNG(salt + fractures), scaleMod * rngf.d(0.4, 3.3), fractures / 3, 0, salt + fractures + composites + 78, null); + for (int i = 0; i < composites; i++) { + CNG sub = generator(null, rngf.nextParallelRNG(salt + fractures), scaleMod * rngf.d(0.4, 3.3), fractures / 3, 0, salt + fractures + composites + 78, null); sub.setInjector(rng.pick(injectors)); cng.child(sub); } - if(key != null && meta != null) - { + if (key != null && meta != null) { meta.registerGenerator(key, cng); } return cng; diff --git a/src/main/java/com/volmit/iris/util/uniques/UFeatureMeta.java b/src/main/java/com/volmit/iris/util/uniques/UFeatureMeta.java index df04f0a52..d4cf8e4a5 100644 --- a/src/main/java/com/volmit/iris/util/uniques/UFeatureMeta.java +++ b/src/main/java/com/volmit/iris/util/uniques/UFeatureMeta.java @@ -18,56 +18,59 @@ public class UFeatureMeta { private KMap generators; private String feature; - public void registerInterpolator(String key, InterpolationMethod method, double radius) - { - if(interpolators == null) - { + public void registerInterpolator(String key, InterpolationMethod method, double radius) { + if (interpolators == null) { interpolators = new KMap<>(); } interpolators.put(key, new UFeatureMetaInterpolator(method, radius)); } - public void registerGenerator(String key, CNG cng) - { - if(generators == null) - { + public void registerGenerator(String key, CNG cng) { + if (generators == null) { generators = new KMap<>(); } generators.put(key, buildGenerator(cng)); } - public UFeatureMetaGenerator buildGenerator(CNG cng) - { + public UFeatureMetaGenerator buildGenerator(CNG cng) { UFeatureMetaGenerator g = new UFeatureMetaGenerator(); g.setScale(cng.getScale()); g.setOctaves(cng.getOct()); - if(cng.getFracture() != null) - { + if (cng.getFracture() != null) { g.setFracture(buildGenerator(cng.getFracture())); g.setFractureMultiplier(cng.getFscale()); } - if(cng.getChildren() != null && cng.getChildren().isNotEmpty()) - { + if (cng.getChildren() != null && cng.getChildren().isNotEmpty()) { g.setChildren(new KList<>()); - for(CNG i : cng.getChildren()) - { + for (CNG i : cng.getChildren()) { g.getChildren().add(buildGenerator(i)); } } - if(cng.getInjector() == CNG.ADD){g.setParentInject("add");} - else if(cng.getInjector() == CNG.SRC_SUBTRACT){g.setParentInject("src_subtract");} - else if(cng.getInjector() == CNG.DST_SUBTRACT){g.setParentInject("dst_subtract");} - else if(cng.getInjector() == CNG.MULTIPLY ){g.setParentInject("multiply");} - else if(cng.getInjector() == CNG.MAX){g.setParentInject("max");} - else if(cng.getInjector() == CNG.MIN){g.setParentInject("min");} - else if(cng.getInjector() == CNG.SRC_MOD ){g.setParentInject("src_mod");} - else if(cng.getInjector() == CNG.SRC_POW ){g.setParentInject("src_pow");} - else if(cng.getInjector() == CNG.DST_MOD ){g.setParentInject("dst_mod");} - else if(cng.getInjector() == CNG.DST_POW){g.setParentInject("dst_pow");} + if (cng.getInjector() == CNG.ADD) { + g.setParentInject("add"); + } else if (cng.getInjector() == CNG.SRC_SUBTRACT) { + g.setParentInject("src_subtract"); + } else if (cng.getInjector() == CNG.DST_SUBTRACT) { + g.setParentInject("dst_subtract"); + } else if (cng.getInjector() == CNG.MULTIPLY) { + g.setParentInject("multiply"); + } else if (cng.getInjector() == CNG.MAX) { + g.setParentInject("max"); + } else if (cng.getInjector() == CNG.MIN) { + g.setParentInject("min"); + } else if (cng.getInjector() == CNG.SRC_MOD) { + g.setParentInject("src_mod"); + } else if (cng.getInjector() == CNG.SRC_POW) { + g.setParentInject("src_pow"); + } else if (cng.getInjector() == CNG.DST_MOD) { + g.setParentInject("dst_mod"); + } else if (cng.getInjector() == CNG.DST_POW) { + g.setParentInject("dst_pow"); + } return g; } @@ -79,16 +82,14 @@ public boolean isEmpty() { @Data @NoArgsConstructor @AllArgsConstructor - static class UFeatureMetaInterpolator - { + static class UFeatureMetaInterpolator { private InterpolationMethod interpolator; private double radius; } @Data @NoArgsConstructor - static class UFeatureMetaGenerator - { + static class UFeatureMetaGenerator { private NoiseStyle style; private int octaves = 1; private double scale = 1; diff --git a/src/main/java/com/volmit/iris/util/uniques/UImage.java b/src/main/java/com/volmit/iris/util/uniques/UImage.java index 821584a64..0b9b63fe3 100644 --- a/src/main/java/com/volmit/iris/util/uniques/UImage.java +++ b/src/main/java/com/volmit/iris/util/uniques/UImage.java @@ -7,8 +7,7 @@ public interface UImage { int getHeight(); - default boolean isInBounds(int x, int y) - { + default boolean isInBounds(int x, int y) { return x >= 0 && x < getWidth() && y >= 0 && y < getHeight(); } diff --git a/src/main/java/com/volmit/iris/util/uniques/UMeta.java b/src/main/java/com/volmit/iris/util/uniques/UMeta.java index bdac42e38..773f428eb 100644 --- a/src/main/java/com/volmit/iris/util/uniques/UMeta.java +++ b/src/main/java/com/volmit/iris/util/uniques/UMeta.java @@ -21,10 +21,8 @@ public class UMeta { private int width; private int height; - public void registerFeature(String key, UFeatureMeta feature) - { - if(features == null) - { + public void registerFeature(String key, UFeatureMeta feature) { + if (features == null) { features = new KMap<>(); } @@ -33,10 +31,8 @@ public void registerFeature(String key, UFeatureMeta feature) public void export(File destination) throws IOException { - for(String i : features.k()) - { - if(features.get(i).isEmpty()) - { + for (String i : features.k()) { + if (features.get(i).isEmpty()) { features.remove(i); } } diff --git a/src/main/java/com/volmit/iris/util/uniques/UniqueRenderer.java b/src/main/java/com/volmit/iris/util/uniques/UniqueRenderer.java index cc2d629c8..101941382 100644 --- a/src/main/java/com/volmit/iris/util/uniques/UniqueRenderer.java +++ b/src/main/java/com/volmit/iris/util/uniques/UniqueRenderer.java @@ -25,23 +25,21 @@ import java.util.concurrent.atomic.AtomicInteger; public class UniqueRenderer { - static UniqueRenderer renderer; - static final List backgrounds = List.of(new UFWarpedBackground()); static final List interpolators = List.of(new UFInterpolator(), new UFNOOP()); static final List features = List.of(new UFWarpedLines(), new UFWarpedDisc(), new UFWarpedDots(), new UFWarpedCircle()); + static UniqueRenderer renderer; private final String seed; private final ProceduralStream spatialSeed; private final int width; private final int height; private final KMap writing = new KMap<>(); + private final ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2); + int cores = Runtime.getRuntime().availableProcessors(); private KList sortedStyles = new KList(); private KList sortedInterpolators = new KList(); - int cores = Runtime.getRuntime().availableProcessors(); - private final ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2); - - public UniqueRenderer(String seed, int width, int height) - { + + public UniqueRenderer(String seed, int width, int height) { renderer = this; computeNoiseStyles(3000, 2); computeInterpolationMethods(3000, 2); @@ -50,45 +48,29 @@ public UniqueRenderer(String seed, int width, int height) this.height = height; spatialSeed = NoiseStyle.FRACTAL_WATER.stream(new RNG(seed)).convert((d) -> new RNG(Math.round(seed.hashCode() + (d * 934321234D)))); new Thread(() -> { - while(true) - { + while (true) { J.sleep(5000); - if(!writing.isEmpty()) - { + if (!writing.isEmpty()) { System.out.println(Form.repeat("\n", 60)); System.out.println(Form.memSize(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(), 2) + " of " + Form.memSize(Runtime.getRuntime().totalMemory(), 2)); KMap c = writing.copy(); - for(String i : writing.k().sort()) - { + for (String i : writing.k().sort()) { String prog = ""; String f = writing.get(i); - if(f.contains("%")) - { + if (f.contains("%")) { String v = f.split("\\Q%\\E")[0]; - try - { + try { prog = drawProgress(Double.valueOf(Integer.parseInt(v.substring(v.length() - 2))) / 100D, 30); - } - - catch(Throwable e) - { - try - { + } catch (Throwable e) { + try { prog = drawProgress(Double.valueOf(Integer.parseInt(v.substring(v.length() - 1))) / 100D, 30); - } - - catch(Throwable ee) - { - try - { + } catch (Throwable ee) { + try { prog = drawProgress(Double.valueOf(Integer.parseInt(v.substring(v.length() - 3))) / 100D, 30); - } - - catch(Throwable eee) - { + } catch (Throwable eee) { } } @@ -102,15 +84,14 @@ public UniqueRenderer(String seed, int width, int height) }).start(); } - public UMeta renderFrameBuffer(long id, double t) - { + public UMeta renderFrameBuffer(long id, double t) { UMeta meta = new UMeta(); meta.setId(id); meta.setTime(t); RNG rng = spatialSeed.get(id, id + ((id * id) % (id / 3D))); RNG rngbg = spatialSeed.get(id, -id + ((id * id) % (id / 4D))); - BufferedImage buf = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); - BufferedImage bufFG = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + BufferedImage buf = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + BufferedImage bufFG = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); UImage image = new UBufferedImage(buf); UImage imageFG = new UBufferedImage(bufFG); ChronoLatch cl = new ChronoLatch(250); @@ -123,24 +104,21 @@ public UMeta renderFrameBuffer(long id, double t) UFeatureMeta backgroundInterpolatorMeta = new UFeatureMeta(); UFeatureMeta foregroundInterpolatorMeta = new UFeatureMeta(); background.render(image, rngbg, t, (p) -> { - if(cl.flip()) - { + if (cl.flip()) { writing.put("#" + id + ":" + t, Form.pc(p / 4D) + " [" + background.getClass().getSimpleName() + " " + Form.pc(p) + "]"); } }, backgroundMeta); backgroundMeta.setFeature(background.getClass().getSimpleName()); meta.registerFeature("background", backgroundMeta); interpolator.render(image, rng, t, (p) -> { - if(cl.flip()) - { + if (cl.flip()) { writing.put("#" + id + ":" + t, Form.pc(0.25 + (p / 4d)) + " [" + interpolator.getClass().getSimpleName() + " " + Form.pc(p) + "]"); } }, backgroundInterpolatorMeta); backgroundInterpolatorMeta.setFeature(interpolator.getClass().getSimpleName()); meta.registerFeature("backgroundInterpolator", backgroundInterpolatorMeta); foreground.render(imageFG, rng, t, (p) -> { - if(cl.flip()) - { + if (cl.flip()) { writing.put("#" + id + ":" + t, Form.pc(0.5 + (p / 4d)) + " [" + foreground.getClass().getSimpleName() + " " + Form.pc(p) + "]"); } }, foregroundMeta); @@ -148,8 +126,7 @@ public UMeta renderFrameBuffer(long id, double t) meta.registerFeature("foreground", foregroundMeta); overlay(imageFG, bufFG, image); foregroundInterpolator.render(image, rng, t, (p) -> { - if(cl.flip()) - { + if (cl.flip()) { writing.put("#" + id + ":" + t, Form.pc(0.75 + (p / 4d)) + " [" + interpolator.getClass().getSimpleName() + " " + Form.pc(p) + "]"); } }, foregroundInterpolatorMeta); @@ -161,27 +138,22 @@ public UMeta renderFrameBuffer(long id, double t) return meta; } -private void overlay(UImage layer, BufferedImage layerBuf, UImage onto) -{ - for(int i = 0; i < onto.getWidth(); i++) - { - for(int j = 0; j < onto.getHeight(); j++) - { - if(layerBuf.getRGB(i, j) != 0) - { - onto.set(i, j, layer.get(i, j)); + private void overlay(UImage layer, BufferedImage layerBuf, UImage onto) { + for (int i = 0; i < onto.getWidth(); i++) { + for (int j = 0; j < onto.getHeight(); j++) { + if (layerBuf.getRGB(i, j) != 0) { + onto.set(i, j, layer.get(i, j)); + } } } } -} - private String drawProgress(double progress, int len) - { + private String drawProgress(double progress, int len) { int max = len; int in = (int) Math.round(progress * max); max -= in; - return "[" + Form.repeat("=", in) + Form.repeat(" ", max)+ "]"; + return "[" + Form.repeat("=", in) + Form.repeat(" ", max) + "]"; } private void computeNoiseStyles(double time, double scope) { @@ -194,16 +166,14 @@ private void computeNoiseStyles(double time, double scope) { System.out.println("Benchmarking " + allowedStyles.size() + " + Noise Styles for " + Form.duration(maxTestDuration, 1) + " each."); System.out.println(); - for(NoiseStyle i : allowedStyles) - { + for (NoiseStyle i : allowedStyles) { int score = 0; CNG cng = i.create(new RNG("renderspeedtest")); PrecisionStopwatch p = PrecisionStopwatch.start(); double g = 0; - while(p.getMilliseconds() < maxTestDuration) - { + while (p.getMilliseconds() < maxTestDuration) { cng.noise(g, -g * 2); - g+= 0.1; + g += 0.1; g *= 1.25; score++; } @@ -211,18 +181,15 @@ private void computeNoiseStyles(double time, double scope) { speeds.put(i, score); } - for(NoiseStyle i : speeds.sortKNumber()) - { + for (NoiseStyle i : speeds.sortKNumber()) { System.out.println(Form.capitalizeWords(i.name().toLowerCase(Locale.ROOT).replaceAll("\\Q_\\E", " ")) + " => " + Form.f(speeds.get(i))); } System.out.println(); int takeUpTo = (int) Math.max(1, scope * speeds.size()); System.out.println("Choosing the fastest " + Form.pc(scope) + " styles (" + takeUpTo + ")"); - for(NoiseStyle i : speeds.sortKNumber().reverse()) - { - if(takeUpTo-- <= 0) - { + for (NoiseStyle i : speeds.sortKNumber().reverse()) { + if (takeUpTo-- <= 0) { break; } @@ -245,17 +212,15 @@ private void computeInterpolationMethods(double time, double scope) { CNG cng = NoiseStyle.SIMPLEX.create(r); NoiseProvider np = (x, z) -> cng.noise(x, z); - for(InterpolationMethod i : allowedStyles) - { + for (InterpolationMethod i : allowedStyles) { int score = 0; PrecisionStopwatch p = PrecisionStopwatch.start(); double g = 0; - while(p.getMilliseconds() < maxTestDuration) - { + while (p.getMilliseconds() < maxTestDuration) { IrisInterpolation.getNoise(i, (int) g, (int) (-g * 2.225), r.d(4, 64), np); cng.noise(g, -g * 2); - g+= 1.1; + g += 1.1; g *= 1.25; score++; } @@ -263,18 +228,15 @@ private void computeInterpolationMethods(double time, double scope) { speeds.put(i, score); } - for(InterpolationMethod i : speeds.sortKNumber()) - { + for (InterpolationMethod i : speeds.sortKNumber()) { System.out.println(Form.capitalizeWords(i.name().toLowerCase(Locale.ROOT).replaceAll("\\Q_\\E", " ")) + " => " + Form.f(speeds.get(i))); } System.out.println(); int takeUpTo = (int) Math.max(1, scope * speeds.size()); System.out.println("Choosing the fastest " + Form.pc(scope) + " interpolators (" + takeUpTo + ")"); - for(InterpolationMethod i : speeds.sortKNumber().reverse()) - { - if(takeUpTo-- <= 0) - { + for (InterpolationMethod i : speeds.sortKNumber().reverse()) { + if (takeUpTo-- <= 0) { break; } @@ -283,23 +245,21 @@ private void computeInterpolationMethods(double time, double scope) { } } - public void writeCollectionFrames(File folder, int fromId, int toId) - { + public void writeCollectionFrames(File folder, int fromId, int toId) { folder.mkdirs(); BurstExecutor burst = new BurstExecutor(executor, Math.min(toId - fromId, 1000)); burst.setMulticore(true); AtomicInteger ai = new AtomicInteger(0); int max = toId - fromId; - for(int i = fromId; i <= toId; i++) - { + for (int i = fromId; i <= toId; i++) { int ii = i; burst.queue(() -> { - writing.put("!#[" + fromId + "-" + toId + "] Collection", ai.get() + " of " + max + " (" + Form.pc(ai.get() / (double)max, 0) + ")"); + writing.put("!#[" + fromId + "-" + toId + "] Collection", ai.get() + " of " + max + " (" + Form.pc(ai.get() / (double) max, 0) + ")"); writeFrame(new File(folder, ii + ".png"), ii, 0); ai.incrementAndGet(); - writing.put("!#[" + fromId + "-" + toId + "] Collection", ai.get() + " of " + max + " (" + Form.pc(ai.get() /(double) max, 0) + ")"); + writing.put("!#[" + fromId + "-" + toId + "] Collection", ai.get() + " of " + max + " (" + Form.pc(ai.get() / (double) max, 0) + ")"); }); } @@ -308,19 +268,14 @@ public void writeCollectionFrames(File folder, int fromId, int toId) } public void writeFrame(File destination, long id, double t) { - try - { + try { renderFrameBuffer(id, t).export(destination); - } - - catch(Throwable e) - { + } catch (Throwable e) { e.printStackTrace(); } } - public void report(String s) - { + public void report(String s) { System.out.println(s); } diff --git a/src/main/java/com/volmit/iris/util/uniques/features/UFInterpolator.java b/src/main/java/com/volmit/iris/util/uniques/features/UFInterpolator.java index e615f5575..6a8d3fa86 100644 --- a/src/main/java/com/volmit/iris/util/uniques/features/UFInterpolator.java +++ b/src/main/java/com/volmit/iris/util/uniques/features/UFInterpolator.java @@ -19,24 +19,24 @@ public void render(UImage image, RNG rng, double t, Consumer progressor, CNG rmod = generator("interpolator_radius", rng, 1, 33004, meta); NoiseProvider nHue = (x, y) -> { - int ix = Math.abs(((int)x)%ref.getWidth()); - int iy = Math.abs(((int)y)%ref.getHeight()); + int ix = Math.abs(((int) x) % ref.getWidth()); + int iy = Math.abs(((int) y) % ref.getHeight()); Color color = ref.get(ix, iy); float[] hsv = new float[3]; Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getGreen(), hsv); return hsv[0]; }; NoiseProvider nSat = (x, y) -> { - int ix = Math.abs(((int)x)%ref.getWidth()); - int iy = Math.abs(((int)y)%ref.getHeight()); + int ix = Math.abs(((int) x) % ref.getWidth()); + int iy = Math.abs(((int) y) % ref.getHeight()); Color color = ref.get(ix, iy); float[] hsv = new float[3]; Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getGreen(), hsv); return hsv[1]; }; NoiseProvider nBri = (x, y) -> { - int ix = Math.abs(((int)x)%ref.getWidth()); - int iy = Math.abs(((int)y)%ref.getHeight()); + int ix = Math.abs(((int) x) % ref.getWidth()); + int iy = Math.abs(((int) y) % ref.getHeight()); Color color = ref.get(ix, iy); float[] hsv = new float[3]; Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getGreen(), hsv); @@ -45,18 +45,16 @@ public void render(UImage image, RNG rng, double t, Consumer progressor, InterpolationMethod method = interpolator(rng); int sizeMin = Math.min(image.getWidth(), image.getHeight()); double radius = Math.max(4, rmod.fit(sizeMin / 256, sizeMin / 4, t * rng.d(0.03, 1.25), t * rng.d(0.01, 2.225))); - for(int i = 0; i < image.getWidth(); i++) - { - for(int j = 0; j < image.getHeight(); j++) - { + for (int i = 0; i < image.getWidth(); i++) { + for (int j = 0; j < image.getHeight(); j++) { image.set(i, j, Color.getHSBColor( - (float)Math.max(Math.min(1D, IrisInterpolation.getNoise(method, i, j, radius, nHue)), 0D), - (float)Math.max(Math.min(1D, IrisInterpolation.getNoise(method, i, j, radius, nSat)), 0D), - (float)Math.max(Math.min(1D, IrisInterpolation.getNoise(method, i, j, radius, nBri)), 0D) + (float) Math.max(Math.min(1D, IrisInterpolation.getNoise(method, i, j, radius, nHue)), 0D), + (float) Math.max(Math.min(1D, IrisInterpolation.getNoise(method, i, j, radius, nSat)), 0D), + (float) Math.max(Math.min(1D, IrisInterpolation.getNoise(method, i, j, radius, nBri)), 0D) )); } - progressor.accept(i / (double)image.getWidth()); + progressor.accept(i / (double) image.getWidth()); } } } diff --git a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedBackground.java b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedBackground.java index d3c347ee3..e16f1dced 100644 --- a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedBackground.java +++ b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedBackground.java @@ -11,19 +11,17 @@ public class UFWarpedBackground implements UFeature { @Override public void render(UImage image, RNG rng, double t, Consumer progressor, UFeatureMeta meta) { - CNG hue = generator("color_hue", rng, rng.d(0.001, rng.d(2, 5)), rng.i(0, 3) ,rng.i(0, 3), 31007, meta); - CNG sat = generator("color_sat", rng, rng.d(0.001, rng.d(2, 5)), rng.i(0, 2) ,rng.i(0, 2), 33004, meta); - CNG bri = generator("color_bri", rng, rng.d(0.001, rng.d(2, 5)), rng.i(0, 1) ,rng.i(0, 1), 32005, meta).patch(0.145); + CNG hue = generator("color_hue", rng, rng.d(0.001, rng.d(2, 5)), rng.i(0, 3), rng.i(0, 3), 31007, meta); + CNG sat = generator("color_sat", rng, rng.d(0.001, rng.d(2, 5)), rng.i(0, 2), rng.i(0, 2), 33004, meta); + CNG bri = generator("color_bri", rng, rng.d(0.001, rng.d(2, 5)), rng.i(0, 1), rng.i(0, 1), 32005, meta).patch(0.145); double tcf = rng.d(0.15, 0.55); - for(int i = 0; i < image.getWidth(); i++) - { - for(int j = 0; j < image.getHeight(); j++) - { + for (int i = 0; i < image.getWidth(); i++) { + for (int j = 0; j < image.getHeight(); j++) { image.set(i, j, color(hue, sat, bri, i, j, tcf * t)); } - progressor.accept(i / (double)image.getWidth()); + progressor.accept(i / (double) image.getWidth()); } } } diff --git a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedCircle.java b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedCircle.java index bad5e9c63..e8c4df9c9 100644 --- a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedCircle.java +++ b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedCircle.java @@ -16,29 +16,26 @@ public void render(UImage image, RNG rng, double t, Consumer progressor, CNG xShift = generator("x_warp", rng, 0.6, 1001, meta); CNG yShift = generator("y_warp", rng, 0.6, 1002, meta); CNG hue = generator("color_hue", rng, rng.d(0.25, 2.5), 1003, meta); - CNG sat = generator("color_sat",rng, rng.d(0.25, 2.5), 1004, meta); - CNG bri = generator("color_bri",rng, rng.d(0.25, 2.5), 1005, meta); + CNG sat = generator("color_sat", rng, rng.d(0.25, 2.5), 1004, meta); + CNG bri = generator("color_bri", rng, rng.d(0.25, 2.5), 1005, meta); double tcf = rng.d(0.75, 11.25); double rcf = rng.d(7.75, 16.25); - int x = image.getWidth()/2; - int y = image.getHeight()/2; + int x = image.getWidth() / 2; + int y = image.getHeight() / 2; - for(int d = 0; d < 256; d++) - { + for (int d = 0; d < 256; d++) { r -= Math.min(image.getWidth(), image.getHeight()) / 300D; - if(r <= 0) - { + if (r <= 0) { return; } - for(i = 0; i < 360; i += 0.1) - { + for (i = 0; i < 360; i += 0.1) { angle = i; x1 = r * Math.cos(angle * Math.PI / 180); y1 = r * Math.sin(angle * Math.PI / 180); - image.set((int)Math.round(x + x1 + xShift.fit(-r/2, r/2, x1 + (t+ (d * 8)), -y1 + (t+ (d * 8)))), - (int)Math.round(y + y1 + yShift.fit(-r/2, r/2, y1 + (t+ (d * 8)), -x1 + (t+ (d * 8)))), + image.set((int) Math.round(x + x1 + xShift.fit(-r / 2, r / 2, x1 + (t + (d * 8)), -y1 + (t + (d * 8)))), + (int) Math.round(y + y1 + yShift.fit(-r / 2, r / 2, y1 + (t + (d * 8)), -x1 + (t + (d * 8)))), color(hue, sat, bri, x1, y1, (t * tcf) + (d * rcf))); } diff --git a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDisc.java b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDisc.java index b394f2c7c..83e9b24d8 100644 --- a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDisc.java +++ b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDisc.java @@ -13,22 +13,19 @@ public class UFWarpedDisc implements UFeature { public void render(UImage image, RNG rng, double t, Consumer progressor, UFeatureMeta meta) { double r = Math.min(image.getWidth(), image.getHeight()) / 3D; CNG xShift = generator("x_warp", rng, 0.6, 1001, meta); - CNG yShift = generator("y_warp",rng, 0.6, 1002, meta); - CNG hue = generator("color_hue",rng, rng.d(0.25, 2.5), 1003, meta); - CNG sat = generator("color_sat",rng, rng.d(0.25, 2.5), 1004, meta); - CNG bri = generator("color_bri",rng, rng.d(0.25, 2.5), 1005, meta); + CNG yShift = generator("y_warp", rng, 0.6, 1002, meta); + CNG hue = generator("color_hue", rng, rng.d(0.25, 2.5), 1003, meta); + CNG sat = generator("color_sat", rng, rng.d(0.25, 2.5), 1004, meta); + CNG bri = generator("color_bri", rng, rng.d(0.25, 2.5), 1005, meta); double tcf = rng.d(0.75, 11.25); - int x = image.getWidth()/2; - int y = image.getHeight()/2; + int x = image.getWidth() / 2; + int y = image.getHeight() / 2; - for(int i = (int)( x - r); i < x+r; i++) - { - for(int j =(int)( y - r); j < y+r; j++) - { - if(image.isInBounds(i, j) && Math.pow(x - i, 2) + Math.pow(y - j, 2) <= r*r) - { - image.set(Math.round(i + xShift.fit(-r/2, r/2, i+t, -j+t)), - Math.round(j + yShift.fit(-r/2, r/2, j+t, -i+t)), + for (int i = (int) (x - r); i < x + r; i++) { + for (int j = (int) (y - r); j < y + r; j++) { + if (image.isInBounds(i, j) && Math.pow(x - i, 2) + Math.pow(y - j, 2) <= r * r) { + image.set(Math.round(i + xShift.fit(-r / 2, r / 2, i + t, -j + t)), + Math.round(j + yShift.fit(-r / 2, r / 2, j + t, -i + t)), color(hue, sat, bri, i, j, tcf * t)); } } diff --git a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDots.java b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDots.java index a9670600e..55e933015 100644 --- a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDots.java +++ b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedDots.java @@ -17,26 +17,22 @@ public void render(UImage image, RNG rng, double t, Consumer progressor, double tcf = rng.d(0.75, 11.25); - for(int i = 1; i <= 8; i++) - { - CNG xShift = generator("x_warp_" + i, rng, 2, 2006+i, meta); - CNG yShift = generator("y_warp_" + i,rng, 2, 2007+i, meta); - CNG hue = generator("color_hue_" + i,rng, rng.d(0.55, 3.5), 2003+i, meta); - CNG sat = generator("color_sat_" + i,rng, rng.d(0.55, 3.5), 2004+i, meta); - CNG bri = generator("color_bri_" + i,rng, rng.d(0.55, 3.5), 2005+i, meta); + for (int i = 1; i <= 8; i++) { + CNG xShift = generator("x_warp_" + i, rng, 2, 2006 + i, meta); + CNG yShift = generator("y_warp_" + i, rng, 2, 2007 + i, meta); + CNG hue = generator("color_hue_" + i, rng, rng.d(0.55, 3.5), 2003 + i, meta); + CNG sat = generator("color_sat_" + i, rng, rng.d(0.55, 3.5), 2004 + i, meta); + CNG bri = generator("color_bri_" + i, rng, rng.d(0.55, 3.5), 2005 + i, meta); int x = genX.fit(0, image.getWidth(), i * 128, i * 5855); int y = genY.fit(0, image.getHeight(), i * 128, i * 5855); Color color = color(hue, sat, bri, x, y, t); double r = Math.max(genX.fit(image.getWidth() / 10, image.getWidth() / 6, x, y), genY.fit(image.getHeight() / 10, image.getHeight() / 6, x, y)); - for(int j = (int)(x - r); j < x + r; j++) - { - for(int k = (int)(y - r); k < y + r; k++) - { - if(image.isInBounds(j, k) && Math.pow(x - j, 2) + Math.pow(y - k, 2) <= r*r) - { - image.set(Math.round(j + xShift.fit(-r/2, r/2, j+t, -k+t)), - Math.round(k + yShift.fit(-r/2, r/2, k+t, -j+t)), + for (int j = (int) (x - r); j < x + r; j++) { + for (int k = (int) (y - r); k < y + r; k++) { + if (image.isInBounds(j, k) && Math.pow(x - j, 2) + Math.pow(y - k, 2) <= r * r) { + image.set(Math.round(j + xShift.fit(-r / 2, r / 2, j + t, -k + t)), + Math.round(k + yShift.fit(-r / 2, r / 2, k + t, -j + t)), color(hue, sat, bri, j, k, tcf * t)); } } diff --git a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedLines.java b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedLines.java index badfdb79e..640610b72 100644 --- a/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedLines.java +++ b/src/main/java/com/volmit/iris/util/uniques/features/UFWarpedLines.java @@ -11,15 +11,14 @@ public class UFWarpedLines implements UFeature { @Override public void render(UImage image, RNG rng, double t, Consumer progressor, UFeatureMeta meta) { - for(int g = 1; g < 5; g++) - { - CNG xShift = generator("x_warp_"+g, rng, 0.6, 1001 * g, meta); - CNG yShift = generator("y_warp_"+g, rng, 0.6, 1002 * g, meta); - CNG cX = generator("x_clip_"+g, rng, rng.d(0.035, 0.6), 77001 * g, meta); - CNG cY = generator("y_clip"+g, rng, rng.d(0.035, 0.6), 77002, meta); - CNG hue = generator("color_hue_"+g, rng, rng.d(0.25, 2.5), 1003 * g, meta); - CNG sat = generator("color_sat_"+g, rng, rng.d(0.25, 2.5), 1004 * g, meta); - CNG bri = generator("color_bri_"+g, rng, rng.d(0.25, 2.5), 1005 * g, meta); + for (int g = 1; g < 5; g++) { + CNG xShift = generator("x_warp_" + g, rng, 0.6, 1001 * g, meta); + CNG yShift = generator("y_warp_" + g, rng, 0.6, 1002 * g, meta); + CNG cX = generator("x_clip_" + g, rng, rng.d(0.035, 0.6), 77001 * g, meta); + CNG cY = generator("y_clip" + g, rng, rng.d(0.035, 0.6), 77002, meta); + CNG hue = generator("color_hue_" + g, rng, rng.d(0.25, 2.5), 1003 * g, meta); + CNG sat = generator("color_sat_" + g, rng, rng.d(0.25, 2.5), 1004 * g, meta); + CNG bri = generator("color_bri_" + g, rng, rng.d(0.25, 2.5), 1005 * g, meta); double tcf = rng.d(0.75, 11.25 + (g * 4)); double rcf = rng.d(7.75, 16.25 + (g * 5)); double xcf = rng.d(0.15, 0.55 + (g * 0.645)); @@ -30,12 +29,9 @@ public void render(UImage image, RNG rng, double t, Consumer progressor, double sa = rng.d(0.35, 0.66); double sb = rng.d(0.35, 0.66); - for(int i = 0; i < image.getWidth(); i+= (wh ? image.getWidth() / w : 1)) - { - for(int j = 0; j < image.getHeight(); j+= (!wh ? image.getHeight() / w : 1)) - { - if(cX.fitDouble(0, 1, i, -j, t * xcf) > sa && cY.fitDouble(0, 1, -j, i, t * xcf) > sb) - { + for (int i = 0; i < image.getWidth(); i += (wh ? image.getWidth() / w : 1)) { + for (int j = 0; j < image.getHeight(); j += (!wh ? image.getHeight() / w : 1)) { + if (cX.fitDouble(0, 1, i, -j, t * xcf) > sa && cY.fitDouble(0, 1, -j, i, t * xcf) > sb) { image.set(Math.round(i + xShift.fit(-ww, ww, i, j, (t * rcf))), Math.round(j + yShift.fit(-hh, hh, -j, i, (t * rcf))), color(hue, sat, bri, i, j, (t * tcf))); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index d96395bd5..cfaed5163 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -19,6 +19,6 @@ libraries: - bsf:bsf:2.4.0 commands: iris: - aliases: [ ir, irs] + aliases: [ ir, irs ] api-version: ${apiversion} hotload-dependencies: false \ No newline at end of file

* This is the same as {@link String#getBytes()}. * - * @param input - * the String to convert + * @param input the String to convert * @return the requested byte array * @deprecated Use {@link String#getBytes()} */ @@ -720,13 +675,10 @@ public static byte[] toByteArray(String input) { * This method buffers the input internally, so there is no need to use a * BufferedInputStream. * - * @param is - * the InputStream to read from + * @param is the InputStream to read from * @return the requested character array - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static char[] toCharArray(InputStream is) throws IOException { @@ -745,15 +697,11 @@ public static char[] toCharArray(InputStream is) throws IOException { * This method buffers the input internally, so there is no need to use a * BufferedInputStream. * - * @param is - * the InputStream to read from - * @param encoding - * the encoding to use, null means platform default + * @param is the InputStream to read from + * @param encoding the encoding to use, null means platform default * @return the requested character array - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static char[] toCharArray(InputStream is, String encoding) throws IOException { @@ -771,13 +719,10 @@ public static char[] toCharArray(InputStream is, String encoding) throws IOExcep * This method buffers the input internally, so there is no need to use a * BufferedReader. * - * @param input - * the Reader to read from + * @param input the Reader to read from * @return the requested character array - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static char[] toCharArray(Reader input) throws IOException { @@ -793,13 +738,10 @@ public static char[] toCharArray(Reader input) throws IOException { * This method buffers the input internally, so there is no need to use a * BufferedInputStream. * - * @param input - * the InputStream to read from + * @param input the InputStream to read from * @return the requested String - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs */ public static String toString(InputStream input) throws IOException { StringWriter sw = new StringWriter(); @@ -817,15 +759,11 @@ public static String toString(InputStream input) throws IOException { * This method buffers the input internally, so there is no need to use a * BufferedInputStream. * - * @param input - * the InputStream to read from - * @param encoding - * the encoding to use, null means platform default + * @param input the InputStream to read from + * @param encoding the encoding to use, null means platform default * @return the requested String - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs */ public static String toString(InputStream input, String encoding) throws IOException { StringWriter sw = new StringWriter(); @@ -839,13 +777,10 @@ public static String toString(InputStream input, String encoding) throws IOExcep * This method buffers the input internally, so there is no need to use a * BufferedReader. * - * @param input - * the Reader to read from + * @param input the Reader to read from * @return the requested String - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs */ public static String toString(Reader input) throws IOException { StringWriter sw = new StringWriter(); @@ -857,8 +792,7 @@ public static String toString(Reader input) throws IOException { * Get the contents of a byte[] as a String using the default * character encoding of the platform. * - * @param input - * the byte array to read from + * @param input the byte array to read from * @return the requested String * @deprecated Use {@link String#String(byte[])} */ @@ -877,20 +811,16 @@ public static String toString(byte[] input) { * Character encoding names can be found at * IANA. * - * @param input - * the byte array to read from - * @param encoding - * the encoding to use, null means platform default + * @param input the byte array to read from + * @param encoding the encoding to use, null means platform default * @return the requested String - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs (never occurs) + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs (never occurs) * @deprecated Use {@link String#String(byte[], String)} */ @Deprecated public static String toString(byte[] input, String encoding) throws IOException { - if(encoding == null) { + if (encoding == null) { return new String(input); } else { return new String(input, encoding); @@ -904,13 +834,10 @@ public static String toString(byte[] input, String encoding) throws IOException * This method buffers the input internally, so there is no need to use a * BufferedInputStream. * - * @param input - * the InputStream to read from, not null + * @param input the InputStream to read from, not null * @return the list of Strings, never null - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static List readLines(InputStream input) throws IOException { @@ -928,19 +855,15 @@ public static List readLines(InputStream input) throws IOException { * This method buffers the input internally, so there is no need to use a * BufferedInputStream. * - * @param input - * the InputStream to read from, not null - * @param encoding - * the encoding to use, null means platform default + * @param input the InputStream to read from, not null + * @param encoding the encoding to use, null means platform default * @return the list of Strings, never null - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static List readLines(InputStream input, String encoding) throws IOException { - if(encoding == null) { + if (encoding == null) { return readLines(input); } else { InputStreamReader reader = new InputStreamReader(input, encoding); @@ -957,20 +880,17 @@ public static List readLines(InputStream input, String encoding) throws * This method buffers the input internally, so there is no need to use a * BufferedReader. * - * @param input - * the Reader to read from, not null + * @param input the Reader to read from, not null * @return the list of Strings, never null - * @throws NullPointerException - * if the input is null - * @throws IOException - * if an I/O error occurs + * @throws NullPointerException if the input is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static List readLines(Reader input) throws IOException { BufferedReader reader = new BufferedReader(input); List list = new ArrayList(); String line = reader.readLine(); - while(line != null) { + while (line != null) { list.add(line); line = reader.readLine(); } @@ -981,8 +901,7 @@ public static List readLines(Reader input) throws IOException { * Convert the specified string to an input stream, encoded as bytes using the * default character encoding of the platform. * - * @param input - * the string to convert + * @param input the string to convert * @return an input stream * @since Commons IO 1.1 */ @@ -1001,13 +920,10 @@ public static InputStream toInputStream(String input) { * Character encoding names can be found at * IANA. * - * @param input - * the string to convert - * @param encoding - * the encoding to use, null means platform default + * @param input the string to convert + * @param encoding the encoding to use, null means platform default * @return an input stream - * @throws IOException - * if the encoding is invalid + * @throws IOException if the encoding is invalid * @since Commons IO 1.1 */ public static InputStream toInputStream(String input, String encoding) throws IOException { @@ -1018,18 +934,14 @@ public static InputStream toInputStream(String input, String encoding) throws IO /** * Writes bytes from a byte[] to an OutputStream. * - * @param data - * the byte array to writeNodeData, do not modify during output, null ignored - * @param output - * the OutputStream to writeNodeData to - * @throws NullPointerException - * if output is null - * @throws IOException - * if an I/O error occurs + * @param data the byte array to writeNodeData, do not modify during output, null ignored + * @param output the OutputStream to writeNodeData to + * @throws NullPointerException if output is null + * @throws IOException if an I/O error occurs * @since Commons IO 1.1 */ public static void write(byte[] data, OutputStream output) throws IOException { - if(data != null) { + if (data != null) { output.write(data); } } @@ -1040,18 +952,14 @@ public static void write(byte[] data, OutputStream output) throws IOException { *

Dye ColorColor
%1$sTest String