Merge branch 'master' into map-1.17

This commit is contained in:
StrangeOne101 2021-07-15 17:54:23 +12:00 committed by GitHub
commit c86fdf07db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
627 changed files with 14414 additions and 5291 deletions

View File

@ -23,7 +23,7 @@ A clear and concise description of what you expected to happen.
**Screenshots or Video Recordings**
If applicable, add screenshots or video recordings to help explain your problem.
**Server and Plugin Informations**
**Server and Plugin Information**
- Installed plugins:
- Iris Version:
- Server Platform and Version [eg: PaperSpigot 1.16.3 #240]:

View File

@ -10,11 +10,30 @@ def apiVersion = '1.17'
def name = 'Iris'
def main = 'com.volmit.iris.Iris'
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
// ==============================================================
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins');
registerCustomOutputTask('Psycho', 'D://Dan/MinecraftDevelopment/server/plugins');
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins');
registerCustomOutputTask('Coco', 'C:/Users/sjoer/Documents/MCServer/plugins');
// ==============================================================
def registerCustomOutputTask(name, path) {

View File

@ -1,3 +1,21 @@
#
# Iris is a World Generator for Minecraft Bukkit Servers
# Copyright (c) 2021 Arcane Arts (Volmit Software)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

View File

@ -1,3 +1,21 @@
#
# Iris is a World Generator for Minecraft Bukkit Servers
# Copyright (c) 2021 Arcane Arts (Volmit Software)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip

22
gradlew vendored
View File

@ -1,19 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
# Iris is a World Generator for Minecraft Bukkit Servers
# Copyright (c) 2021 Arcane Arts (Volmit Software)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# https://www.apache.org/licenses/LICENSE-2.0
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
##############################################################################

View File

@ -1,2 +1,20 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
rootProject.name = 'Iris'

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris;
import com.volmit.iris.manager.*;
@ -12,7 +30,6 @@ import com.volmit.iris.nms.INMS;
import com.volmit.iris.object.IrisCompat;
import com.volmit.iris.object.IrisDimension;
import com.volmit.iris.scaffold.IrisWorlds;
import com.volmit.iris.scaffold.data.DataProvider;
import com.volmit.iris.scaffold.engine.EngineCompositeGenerator;
import com.volmit.iris.util.*;
import io.papermc.lib.PaperLib;
@ -24,14 +41,15 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.Callable;
@SuppressWarnings("CanBeFinal")
public class Iris extends VolmitPlugin implements Listener {
public static KList<GroupedExecutor> executors = new KList<>();
public static Iris instance;
@ -71,48 +89,42 @@ public class Iris extends VolmitPlugin implements Listener {
boolean reboot = false;
File packs = new File("plugins/Iris/packs");
File dpacks = null;
File props = new File("server.properties");
look: for(File i : new File(".").listFiles())
{
if(i.isDirectory())
{
for(File j : i.listFiles())
{
if(j.isDirectory() && j.getName().equals("datapacks"))
{
dpacks = j;
break look;
if (props.exists()) {
try {
KList<String> m = new KList<>(IO.readAll(props).split("\\Q\n\\E"));
for (String i : m) {
if (i.trim().startsWith("level-name=")) {
dpacks = new File(i.trim().split("\\Q=\\E")[1] + "/datapacks");
break;
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
if(dpacks == null)
{
if (dpacks == null) {
Iris.error("Cannot find the datapacks folder! Please try generating a default world first maybe? Is this a new server?");
return;
}
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());
IrisDataManager data = new IrisDataManager(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]);
Iris.verbose(" Checking Dimension " + dim.getLoadFile().getPath());
if(dim.installDataPack(() -> data, dpacks))
{
if (dim.installDataPack(() -> data, dpacks)) {
reboot = true;
}
}
@ -131,7 +143,7 @@ public class Iris extends VolmitPlugin implements Listener {
if (tc <= 0) {
int p = Runtime.getRuntime().availableProcessors();
return p > 16 ? 16 : p < 4 ? 4 : p;
return p > 16 ? 16 : Math.max(p, 4);
}
return tc;
@ -142,7 +154,7 @@ public class Iris extends VolmitPlugin implements Listener {
int v = Integer.parseInt(Bukkit.getBukkitVersion().split("\\Q-\\E")[0].split("\\Q.\\E")[1]);
return v >= 15;
} catch (Throwable e) {
} catch (Throwable ignored) {
}
@ -154,7 +166,7 @@ public class Iris extends VolmitPlugin implements Listener {
int v = Integer.parseInt(Bukkit.getBukkitVersion().split("\\Q-\\E")[0].split("\\Q.\\E")[1]);
return v >= 14;
} catch (Throwable e) {
} catch (Throwable ignored) {
}
@ -166,7 +178,7 @@ public class Iris extends VolmitPlugin implements Listener {
int v = Integer.parseInt(Bukkit.getBukkitVersion().split("\\Q-\\E")[0].split("\\Q.\\E")[1]);
return v >= 15;
} catch (Throwable e) {
} catch (Throwable ignored) {
}
@ -276,19 +288,9 @@ public class Iris extends VolmitPlugin implements Listener {
J.s(() -> {
Metrics m = new Metrics(Iris.instance, 8757);
m.addCustomChart(new Metrics.SingleLineChart("custom_dimensions", new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return ProjectManager.countUniqueDimensions();
}
}));
m.addCustomChart(new Metrics.SingleLineChart("custom_dimensions", ProjectManager::countUniqueDimensions));
m.addCustomChart(new Metrics.SimplePie("using_custom_dimensions", new Callable<String>() {
@Override
public String call() throws Exception {
return ProjectManager.countUniqueDimensions() > 0 ? "Active Projects" : "No Projects";
}
}));
m.addCustomChart(new Metrics.SimplePie("using_custom_dimensions", () -> ProjectManager.countUniqueDimensions() > 0 ? "Active Projects" : "No Projects"));
});
}
}
@ -308,7 +310,7 @@ public class Iris extends VolmitPlugin implements Listener {
@Override
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
public ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
String dimension = IrisSettings.get().getGenerator().getDefaultWorldType();
if (id != null && !id.isEmpty()) {

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris;
import com.google.gson.Gson;
@ -7,6 +25,7 @@ import lombok.Data;
import java.io.File;
import java.io.IOException;
@SuppressWarnings("SynchronizeOnNonFinalField")
@Data
public class IrisSettings {
public static transient IrisSettings settings;
@ -18,13 +37,14 @@ public class IrisSettings {
private IrisSettingsGenerator generator = new IrisSettingsGenerator();
private IrisSettingsStudio studio = new IrisSettingsStudio();
@DontObfuscate
public int configurationVersion = 3;
public boolean isStudio() {
return getStudio().isStudio();
}
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean isUseServerLaunchedGuis() {
return getGui().isUseServerLaunchedGuis();
}
@ -35,77 +55,77 @@ public class IrisSettings {
@Data
public static class IrisSettingsCache {
@DontObfuscate
public int streamingCacheSize = 8192;
}
@Data
public static class IrisSettingsConcurrency {
@DontObfuscate
public int threadCount = -1;
}
@Data
public static class IrisSettingsParallax {
@DontObfuscate
public int parallaxRegionEvictionMS = 15000;
@DontObfuscate
public int parallaxChunkEvictionMS = 5000;
}
@Data
public static class IrisSettingsGeneral {
@DontObfuscate
public boolean commandSounds = true;
@DontObfuscate
public boolean verbose = false;
@DontObfuscate
public boolean ignoreWorldEdit = false;
@DontObfuscate
public boolean disableNMS = false;
@DontObfuscate
public boolean pluginMetrics = true;
@DontObfuscate
public boolean splashLogoStartup = true;
}
@Data
public static class IrisSettingsGUI {
@DontObfuscate
public boolean useServerLaunchedGuis = true;
@DontObfuscate
public boolean maximumPregenGuiFPS = false;
@DontObfuscate
public boolean localPregenGui = true;
}
@Data
public static class IrisSettingsGenerator {
@DontObfuscate
public String defaultWorldType = "overworld";
@DontObfuscate
public boolean mcaPregenerator = false;
@DontObfuscate
public boolean systemEffects = true;
@DontObfuscate
public boolean systemEntitySpawnOverrides = true;
@DontObfuscate
public boolean systemEntityInitialSpawns = true;
@DontObfuscate
public int maxBiomeChildDepth = 5;
}
@ -113,13 +133,13 @@ public class IrisSettings {
@Data
public static class IrisSettingsStudio {
@DontObfuscate
public boolean studio = true;
@DontObfuscate
public boolean openVSCode = true;
@DontObfuscate
public boolean disableTimeAndWeather = true;
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator;
import com.google.common.util.concurrent.AtomicDouble;
@ -315,6 +333,7 @@ public class IrisComplex implements DataProvider {
return bx.getGenLinkMax(gen.getLoadKey());
} catch (Throwable e) {
e.printStackTrace();
Iris.warn("Failed to sample hi biome at " + xx + " " + zz + " using the generator " + gen.getLoadKey());
}
@ -328,6 +347,7 @@ public class IrisComplex implements DataProvider {
return bx.getGenLinkMin(gen.getLoadKey());
} catch (Throwable e) {
e.printStackTrace();
Iris.warn("Failed to sample lo biome at " + xx + " " + zz + " using the generator " + gen.getLoadKey());
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator;
import com.volmit.iris.scaffold.engine.Engine;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator;
import com.volmit.iris.scaffold.engine.Engine;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator;
import com.volmit.iris.IrisSettings;
@ -109,7 +127,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
});
}
});
} catch (Throwable xe) {
} catch (Throwable ignored) {
}
}

View File

@ -1,7 +1,26 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.actuator;
import com.volmit.iris.nms.INMS;
import com.volmit.iris.object.IrisBiome;
import com.volmit.iris.object.IrisBiomeCustom;
import com.volmit.iris.scaffold.engine.Engine;
import com.volmit.iris.scaffold.engine.EngineAssignedActuator;
import com.volmit.iris.scaffold.hunk.Hunk;
@ -10,62 +29,74 @@ import com.volmit.iris.scaffold.parallel.BurstExecutor;
import com.volmit.iris.scaffold.parallel.MultiBurst;
import com.volmit.iris.util.PrecisionStopwatch;
import com.volmit.iris.util.RNG;
import com.volmit.iris.util.TerrainChunk;
import org.bukkit.block.Biome;
import org.bukkit.generator.ChunkGenerator;
public class IrisBiomeActuator extends EngineAssignedActuator<Biome> {
private final RNG rng;
public IrisBiomeActuator(Engine engine) {
super(engine, "Biome");
rng = new RNG(engine.getWorld().getSeed() + 243995);
}
private boolean injectBiome(Hunk<Biome> h, int x, int y, int z, Object bb) {
try {
if (h instanceof BiomeGridHunkView hh) {
ChunkGenerator.BiomeGrid g = hh.getChunk();
if (g instanceof TerrainChunk) {
((TerrainChunk) g).getBiomeBaseInjector().setBiome(x, y, z, bb);
} else {
hh.forceBiomeBaseInto(x, y, z, bb);
}
return true;
}
} catch (Throwable e) {
e.printStackTrace();
}
return false;
}
@Override
public void onActuate(int x, int z, Hunk<Biome> h) {
PrecisionStopwatch p = PrecisionStopwatch.start();
int zf, hh;
BurstExecutor burst = MultiBurst.burst.burst(h.getWidth() * h.getDepth());
int zf;
for (int xf = 0; xf < h.getWidth(); xf++) {
for (zf = 0; zf < h.getDepth(); zf++) {
int xxf = xf;
int zzf = zf;
burst.queue(() -> {
IrisBiome ib = getComplex().getTrueBiomeStream().get(modX(xxf + x), modZ(zzf + z));
IrisBiome ib = getComplex().getTrueBiomeStream().get(modX(xf + x), modZ(zf + z));
if(ib.isCustom())
{
try
{
Object biomeBase = INMS.get().getCustomBiomeBaseFor(getDimension().getLoadKey()+":"+ib.getCustom().getId());
((BiomeGridHunkView)h).forceBiomeBaseInto(x, 0, z, biomeBase);
if (ib.isCustom()) {
try {
IrisBiomeCustom custom = ib.getCustomBiome(rng, x, 0, z);
Object biomeBase = INMS.get().getCustomBiomeBaseFor(getDimension().getLoadKey() + ":" + custom.getId());
for (int i = 0; i < h.getHeight(); i++) {
((BiomeGridHunkView)h).forceBiomeBaseInto(xxf, i, zzf, biomeBase);
}
if (!injectBiome(h, x, 0, z, biomeBase)) {
throw new RuntimeException("Cant inject biome!");
}
catch(Throwable e)
{
e.printStackTrace();
Biome v = ib.getSkyBiome(RNG.r, x, 0, z);
for (int i = 0; i < h.getHeight(); i++) {
h.set(xxf, i, zzf, v);
}
}
}
else
{
Biome v = ib.getSkyBiome(RNG.r, x, 0, z);
for (int i = 0; i < h.getHeight(); i++) {
h.set(xxf, i, zzf, v);
injectBiome(h, xf, i, zf, biomeBase);
}
} catch (Throwable e) {
e.printStackTrace();
Biome v = ib.getSkyBiome(rng, x, 0, z);
for (int i = 0; i < h.getHeight(); i++) {
h.set(xf, i, zf, v);
}
}
});
} else {
Biome v = ib.getSkyBiome(rng, x, 0, z);
for (int i = 0; i < h.getHeight(); i++) {
h.set(xf, i, zf, v);
}
}
}
}
burst.complete();
getEngine().getMetrics().getBiome().put(p.getMilliseconds());
}
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.actuator;
import com.volmit.iris.generator.decorator.*;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.actuator;
import com.volmit.iris.object.IrisBiome;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.decorator;
import com.volmit.iris.object.DecorationPart;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.decorator;
import com.volmit.iris.Iris;
@ -23,7 +41,7 @@ public abstract class IrisEngineDecorator extends EngineAssignedComponent implem
public IrisEngineDecorator(Engine engine, String name, DecorationPart part) {
super(engine, name + " Decorator");
this.part = part;
this.rng = new RNG(getSeed() + 29356788 - (part.ordinal() * 10439677));
this.rng = new RNG(getSeed() + 29356788 - (part.ordinal() * 10439677L));
}
protected IrisDecorator getDecorator(IrisBiome biome, double realX, double realZ) {

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.decorator;
import com.volmit.iris.object.DecorationPart;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.decorator;
import com.volmit.iris.object.DecorationPart;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.decorator;
import com.volmit.iris.object.DecorationPart;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.decorator;
import com.volmit.iris.object.DecorationPart;
@ -41,7 +59,7 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
((Bisected) bd).setHalf(Bisected.Half.TOP);
try {
data.set(x, height + 2, z, bd);
} catch (Throwable e) {
} catch (Throwable ignored) {
}
bd = bd.clone();

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.modifier;
import com.volmit.iris.generator.noise.FastNoiseDouble;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.modifier;
import com.volmit.iris.object.IrisBiome;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.modifier;
import com.volmit.iris.object.IrisBiome;
@ -42,6 +60,7 @@ public class IrisPostModifier extends EngineAssignedModifier<BlockData> {
getEngine().getMetrics().getPost().put(p.getMilliseconds());
}
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
private void post(int currentPostX, int currentPostZ, Hunk<BlockData> currentData, int x, int z) {
int h = getFramework().getEngineParallax().trueHeight(x, z);
@ -322,9 +341,22 @@ public class IrisPostModifier extends EngineAssignedModifier<BlockData> {
}
if (!cancel && isAirOrWater(x, c, z, currentPostX, currentPostZ, currentData)) {
Slab slab = (Slab) d.clone();
slab.setType(Slab.Type.TOP);
setPostBlock(x, c, z, slab, currentPostX, currentPostZ, currentData);
try {
Slab slab = (Slab) d.clone();
slab.setType(Slab.Type.TOP);
setPostBlock(x, c, z, slab, currentPostX, currentPostZ, currentData);
} catch (Throwable ignored) {
try {
Slab slab = (Slab) d.clone();
synchronized (slab) {
slab.setType(Slab.Type.TOP);
setPostBlock(x, c, z, slab, currentPostX, currentPostZ, currentData);
}
} catch (Throwable ignored2) {
}
}
}
}
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.modifier;
import com.volmit.iris.generator.noise.CNG;
@ -9,6 +27,7 @@ import com.volmit.iris.util.*;
import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
@SuppressWarnings("ALL")
public class IrisRavineModifier extends EngineAssignedModifier<BlockData> {
private static final BlockData CAVE_AIR = B.get("CAVE_AIR");
private static final BlockData LAVA = B.get("LAVA");
@ -52,7 +71,7 @@ public class IrisRavineModifier extends EngineAssignedModifier<BlockData> {
private final float[] ravineCache = new float[1024];
private void doRavine(long seed, int tx, int tz, ChunkPosition pos, double sx, double sy, double sz, float f, float f2, float f3, int n3, int n4, double d4, RNG bbx, Hunk<BlockData> terrain) {
private void doRavine(long seed, int tx, int tz, ChunkPosition pos, double sx, double sy, double sz, float f, float f2, float f3, @SuppressWarnings("SameParameterValue") int n3, @SuppressWarnings("SameParameterValue") int n4, @SuppressWarnings("SameParameterValue") double d4, RNG bbx, Hunk<BlockData> terrain) {
int n5;
RNG random = new RNG(seed);
double x = tx * 16 + 8;
@ -196,7 +215,7 @@ public class IrisRavineModifier extends EngineAssignedModifier<BlockData> {
}
}
private BlockPosition cSet(BlockPosition bb, double var0, double var2, double var4) {
private BlockPosition cSet(BlockPosition bb, double var0, @SuppressWarnings("SameParameterValue") double var2, double var4) {
bb.setX(MathHelper.floor(var0));
bb.setY(MathHelper.floor(var2));
bb.setZ(MathHelper.floor(var4));

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.scaffold.stream.ProceduralStream;
@ -48,7 +66,7 @@ public class CNG {
}
public ProceduralStream<Double> stream(double min, double max) {
return new FittedStream<Double>(stream(), min, max);
return new FittedStream<>(stream(), min, max);
}
public static CNG signature(RNG rng) {
@ -286,7 +304,7 @@ public class CNG {
try {
return v.get(fit(0, v.size() - 1, dim));
} catch (Throwable e) {
} catch (Throwable ignored) {
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.M;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,30 +1,20 @@
// FastNoise.java
//
// MIT License
//
// Copyright(c) 2017 Jordan Peck
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// The developer's email is jorzixdan.me2@gzixmail.com (for great email, take
// off every 'zix'.)
//
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;

View File

@ -1,30 +1,20 @@
// FastNoise.java
//
// MIT License
//
// Copyright(c) 2017 Jordan Peck
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// The developer's email is jorzixdan.me2@gzixmail.com (for great email, take
// off every 'zix'.)
//
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.Vector2f;
@ -193,6 +183,7 @@ public class FastNoiseDouble {
m_gradientPerturbAmp = gradientPerturbAmp / 0.45;
}
@SuppressWarnings("ClassCanBeRecord")
private static class Double2 {
public final double x, y;
@ -202,6 +193,7 @@ public class FastNoiseDouble {
}
}
@SuppressWarnings("ClassCanBeRecord")
private static class Double3 {
public final double x, y, z;
@ -368,21 +360,21 @@ public class FastNoiseDouble {
hash &= 31;
double a = yd, b = zd, c = wd; // X,Y,Z
switch ((int) hash >> 3) { // OR, DEPENDING ON HIGH ORDER 2 BITS:
case 1:
case 1 -> {
a = wd;
b = xd;
c = yd;
break; // W,X,Y
case 2:
} // W,X,Y
case 2 -> {
a = zd;
b = wd;
c = xd;
break; // Z,W,X
case 3:
} // Z,W,X
case 3 -> {
a = yd;
b = zd;
c = wd;
break; // Y,Z,W
} // Y,Z,W
}
return ((hash & 4) == 0 ? -a : a) + ((hash & 2) == 0 ? -b : b) + ((hash & 1) == 0 ? -c : c);
}
@ -396,66 +388,42 @@ public class FastNoiseDouble {
case Value:
return SingleValue(m_seed, x, y, z);
case ValueFractal:
switch (m_fractalType) {
case FBM:
return SingleValueFractalFBM(x, y, z);
case Billow:
return SingleValueFractalBillow(x, y, z);
case RigidMulti:
return SingleValueFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleValueFractalFBM(x, y, z);
case Billow -> SingleValueFractalBillow(x, y, z);
case RigidMulti -> SingleValueFractalRigidMulti(x, y, z);
};
case Perlin:
return SinglePerlin(m_seed, x, y, z);
case PerlinFractal:
switch (m_fractalType) {
case FBM:
return SinglePerlinFractalFBM(x, y, z);
case Billow:
return SinglePerlinFractalBillow(x, y, z);
case RigidMulti:
return SinglePerlinFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SinglePerlinFractalFBM(x, y, z);
case Billow -> SinglePerlinFractalBillow(x, y, z);
case RigidMulti -> SinglePerlinFractalRigidMulti(x, y, z);
};
case Simplex:
return SingleSimplex(m_seed, x, y, z);
case SimplexFractal:
switch (m_fractalType) {
case FBM:
return SingleSimplexFractalFBM(x, y, z);
case Billow:
return SingleSimplexFractalBillow(x, y, z);
case RigidMulti:
return SingleSimplexFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleSimplexFractalFBM(x, y, z);
case Billow -> SingleSimplexFractalBillow(x, y, z);
case RigidMulti -> SingleSimplexFractalRigidMulti(x, y, z);
};
case Cellular:
switch (m_cellularReturnType) {
case CellValue:
case NoiseLookup:
case Distance:
return SingleCellular(x, y, z);
default:
return SingleCellular2Edge(x, y, z);
}
return switch (m_cellularReturnType) {
case CellValue, NoiseLookup, Distance -> SingleCellular(x, y, z);
default -> SingleCellular2Edge(x, y, z);
};
case WhiteNoise:
return GetWhiteNoise(x, y, z);
case Cubic:
return SingleCubic(m_seed, x, y, z);
case CubicFractal:
switch (m_fractalType) {
case FBM:
return SingleCubicFractalFBM(x, y, z);
case Billow:
return SingleCubicFractalBillow(x, y, z);
case RigidMulti:
return SingleCubicFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleCubicFractalFBM(x, y, z);
case Billow -> SingleCubicFractalBillow(x, y, z);
case RigidMulti -> SingleCubicFractalRigidMulti(x, y, z);
};
default:
return 0;
}
@ -469,66 +437,42 @@ public class FastNoiseDouble {
case Value:
return SingleValue(m_seed, x, y);
case ValueFractal:
switch (m_fractalType) {
case FBM:
return SingleValueFractalFBM(x, y);
case Billow:
return SingleValueFractalBillow(x, y);
case RigidMulti:
return SingleValueFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleValueFractalFBM(x, y);
case Billow -> SingleValueFractalBillow(x, y);
case RigidMulti -> SingleValueFractalRigidMulti(x, y);
};
case Perlin:
return SinglePerlin(m_seed, x, y);
case PerlinFractal:
switch (m_fractalType) {
case FBM:
return SinglePerlinFractalFBM(x, y);
case Billow:
return SinglePerlinFractalBillow(x, y);
case RigidMulti:
return SinglePerlinFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SinglePerlinFractalFBM(x, y);
case Billow -> SinglePerlinFractalBillow(x, y);
case RigidMulti -> SinglePerlinFractalRigidMulti(x, y);
};
case Simplex:
return SingleSimplex(m_seed, x, y);
case SimplexFractal:
switch (m_fractalType) {
case FBM:
return SingleSimplexFractalFBM(x, y);
case Billow:
return SingleSimplexFractalBillow(x, y);
case RigidMulti:
return SingleSimplexFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleSimplexFractalFBM(x, y);
case Billow -> SingleSimplexFractalBillow(x, y);
case RigidMulti -> SingleSimplexFractalRigidMulti(x, y);
};
case Cellular:
switch (m_cellularReturnType) {
case CellValue:
case NoiseLookup:
case Distance:
return SingleCellular(x, y);
default:
return SingleCellular2Edge(x, y);
}
return switch (m_cellularReturnType) {
case CellValue, NoiseLookup, Distance -> SingleCellular(x, y);
default -> SingleCellular2Edge(x, y);
};
case WhiteNoise:
return GetWhiteNoise(x, y);
case Cubic:
return SingleCubic(m_seed, x, y);
case CubicFractal:
switch (m_fractalType) {
case FBM:
return SingleCubicFractalFBM(x, y);
case Billow:
return SingleCubicFractalBillow(x, y);
case RigidMulti:
return SingleCubicFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleCubicFractalFBM(x, y);
case Billow -> SingleCubicFractalBillow(x, y);
case RigidMulti -> SingleCubicFractalRigidMulti(x, y);
};
default:
return 0;
}
@ -584,16 +528,11 @@ public class FastNoiseDouble {
y *= m_frequency;
z *= m_frequency;
switch (m_fractalType) {
case FBM:
return SingleValueFractalFBM(x, y, z);
case Billow:
return SingleValueFractalBillow(x, y, z);
case RigidMulti:
return SingleValueFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleValueFractalFBM(x, y, z);
case Billow -> SingleValueFractalBillow(x, y, z);
case RigidMulti -> SingleValueFractalRigidMulti(x, y, z);
};
}
private double SingleValueFractalFBM(double x, double y, double z) {
@ -659,24 +598,23 @@ public class FastNoiseDouble {
long y1 = y0 + 1;
long z1 = z0 + 1;
double xs, ys, zs;
double xs=0, ys=0, zs=0;
switch (m_longerp) {
default:
case Linear:
case Linear -> {
xs = x - x0;
ys = y - y0;
zs = z - z0;
break;
case Hermite:
}
case Hermite -> {
xs = longerpHermiteFunc(x - x0);
ys = longerpHermiteFunc(y - y0);
zs = longerpHermiteFunc(z - z0);
break;
case Qulongic:
}
case Qulongic -> {
xs = longerpQulongicFunc(x - x0);
ys = longerpQulongicFunc(y - y0);
zs = longerpQulongicFunc(z - z0);
break;
}
}
double xf00 = lerp(valCoord3D(seed, x0, y0, z0), valCoord3D(seed, x1, y0, z0), xs);
@ -694,16 +632,11 @@ public class FastNoiseDouble {
x *= m_frequency;
y *= m_frequency;
switch (m_fractalType) {
case FBM:
return SingleValueFractalFBM(x, y);
case Billow:
return SingleValueFractalBillow(x, y);
case RigidMulti:
return SingleValueFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleValueFractalFBM(x, y);
case Billow -> SingleValueFractalBillow(x, y);
case RigidMulti -> SingleValueFractalRigidMulti(x, y);
};
}
private double SingleValueFractalFBM(double x, double y) {
@ -763,21 +696,20 @@ public class FastNoiseDouble {
long x1 = x0 + 1;
long y1 = y0 + 1;
double xs, ys;
double xs=0, ys=0;
switch (m_longerp) {
default:
case Linear:
case Linear -> {
xs = x - x0;
ys = y - y0;
break;
case Hermite:
}
case Hermite -> {
xs = longerpHermiteFunc(x - x0);
ys = longerpHermiteFunc(y - y0);
break;
case Qulongic:
}
case Qulongic -> {
xs = longerpQulongicFunc(x - x0);
ys = longerpQulongicFunc(y - y0);
break;
}
}
double xf0 = lerp(valCoord2D(seed, x0, y0), valCoord2D(seed, x1, y0), xs);
@ -792,16 +724,11 @@ public class FastNoiseDouble {
y *= m_frequency;
z *= m_frequency;
switch (m_fractalType) {
case FBM:
return SinglePerlinFractalFBM(x, y, z);
case Billow:
return SinglePerlinFractalBillow(x, y, z);
case RigidMulti:
return SinglePerlinFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SinglePerlinFractalFBM(x, y, z);
case Billow -> SinglePerlinFractalBillow(x, y, z);
case RigidMulti -> SinglePerlinFractalRigidMulti(x, y, z);
};
}
private double SinglePerlinFractalFBM(double x, double y, double z) {
@ -867,24 +794,23 @@ public class FastNoiseDouble {
long y1 = y0 + 1;
long z1 = z0 + 1;
double xs, ys, zs;
double xs=0, ys=0, zs=0;
switch (m_longerp) {
default:
case Linear:
case Linear -> {
xs = x - x0;
ys = y - y0;
zs = z - z0;
break;
case Hermite:
}
case Hermite -> {
xs = longerpHermiteFunc(x - x0);
ys = longerpHermiteFunc(y - y0);
zs = longerpHermiteFunc(z - z0);
break;
case Qulongic:
}
case Qulongic -> {
xs = longerpQulongicFunc(x - x0);
ys = longerpQulongicFunc(y - y0);
zs = longerpQulongicFunc(z - z0);
break;
}
}
double xd0 = x - x0;
@ -909,16 +835,11 @@ public class FastNoiseDouble {
x *= m_frequency;
y *= m_frequency;
switch (m_fractalType) {
case FBM:
return SinglePerlinFractalFBM(x, y);
case Billow:
return SinglePerlinFractalBillow(x, y);
case RigidMulti:
return SinglePerlinFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SinglePerlinFractalFBM(x, y);
case Billow -> SinglePerlinFractalBillow(x, y);
case RigidMulti -> SinglePerlinFractalRigidMulti(x, y);
};
}
private double SinglePerlinFractalFBM(double x, double y) {
@ -1012,16 +933,11 @@ public class FastNoiseDouble {
y *= m_frequency;
z *= m_frequency;
switch (m_fractalType) {
case FBM:
return SingleSimplexFractalFBM(x, y, z);
case Billow:
return SingleSimplexFractalBillow(x, y, z);
case RigidMulti:
return SingleSimplexFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleSimplexFractalFBM(x, y, z);
case Billow -> SingleSimplexFractalBillow(x, y, z);
case RigidMulti -> SingleSimplexFractalRigidMulti(x, y, z);
};
}
private double SingleSimplexFractalFBM(double x, double y, double z) {
@ -1199,16 +1115,11 @@ public class FastNoiseDouble {
x *= m_frequency;
y *= m_frequency;
switch (m_fractalType) {
case FBM:
return SingleSimplexFractalFBM(x, y);
case Billow:
return SingleSimplexFractalBillow(x, y);
case RigidMulti:
return SingleSimplexFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleSimplexFractalFBM(x, y);
case Billow -> SingleSimplexFractalBillow(x, y);
case RigidMulti -> SingleSimplexFractalRigidMulti(x, y);
};
}
private double SingleSimplexFractalFBM(double x, double y) {
@ -1431,16 +1342,11 @@ public class FastNoiseDouble {
y *= m_frequency;
z *= m_frequency;
switch (m_fractalType) {
case FBM:
return SingleCubicFractalFBM(x, y, z);
case Billow:
return SingleCubicFractalBillow(x, y, z);
case RigidMulti:
return SingleCubicFractalRigidMulti(x, y, z);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleCubicFractalFBM(x, y, z);
case Billow -> SingleCubicFractalBillow(x, y, z);
case RigidMulti -> SingleCubicFractalRigidMulti(x, y, z);
};
}
private double SingleCubicFractalFBM(double x, double y, double z) {
@ -1529,16 +1435,11 @@ public class FastNoiseDouble {
x *= m_frequency;
y *= m_frequency;
switch (m_fractalType) {
case FBM:
return SingleCubicFractalFBM(x, y);
case Billow:
return SingleCubicFractalBillow(x, y);
case RigidMulti:
return SingleCubicFractalRigidMulti(x, y);
default:
return 0;
}
return switch (m_fractalType) {
case FBM -> SingleCubicFractalFBM(x, y);
case Billow -> SingleCubicFractalBillow(x, y);
case RigidMulti -> SingleCubicFractalRigidMulti(x, y);
};
}
private double SingleCubicFractalFBM(double x, double y) {
@ -1624,14 +1525,10 @@ public class FastNoiseDouble {
y *= m_frequency;
z *= m_frequency;
switch (m_cellularReturnType) {
case CellValue:
case NoiseLookup:
case Distance:
return SingleCellular(x, y, z);
default:
return SingleCellular2Edge(x, y, z);
}
return switch (m_cellularReturnType) {
case CellValue, NoiseLookup, Distance -> SingleCellular(x, y, z);
default -> SingleCellular2Edge(x, y, z);
};
}
private double SingleCellular(double x, double y, double z) {
@ -1793,34 +1690,24 @@ public class FastNoiseDouble {
break;
}
switch (m_cellularReturnType) {
case Distance2:
return distance2 - 1;
case Distance2Add:
return distance2 + distance - 1;
case Distance2Sub:
return distance2 - distance - 1;
case Distance2Mul:
return distance2 * distance - 1;
case Distance2Div:
return distance / distance2 - 1;
default:
return 0;
}
return switch (m_cellularReturnType) {
case Distance2 -> distance2 - 1;
case Distance2Add -> distance2 + distance - 1;
case Distance2Sub -> distance2 - distance - 1;
case Distance2Mul -> distance2 * distance - 1;
case Distance2Div -> distance / distance2 - 1;
default -> 0;
};
}
public double GetCellular(double x, double y) {
x *= m_frequency;
y *= m_frequency;
switch (m_cellularReturnType) {
case CellValue:
case NoiseLookup:
case Distance:
return SingleCellular(x, y);
default:
return SingleCellular2Edge(x, y);
}
return switch (m_cellularReturnType) {
case CellValue, NoiseLookup, Distance -> SingleCellular(x, y);
default -> SingleCellular2Edge(x, y);
};
}
private double SingleCellular(double x, double y) {
@ -1959,20 +1846,14 @@ public class FastNoiseDouble {
break;
}
switch (m_cellularReturnType) {
case Distance2:
return distance2 - 1;
case Distance2Add:
return distance2 + distance - 1;
case Distance2Sub:
return distance2 - distance - 1;
case Distance2Mul:
return distance2 * distance - 1;
case Distance2Div:
return distance / distance2 - 1;
default:
return 0;
}
return switch (m_cellularReturnType) {
case Distance2 -> distance2 - 1;
case Distance2Add -> distance2 + distance - 1;
case Distance2Sub -> distance2 - distance - 1;
case Distance2Mul -> distance2 * distance - 1;
case Distance2Div -> distance / distance2 - 1;
default -> 0;
};
}
public void GradientPerturb(Vector3f v3) {
@ -2005,24 +1886,23 @@ public class FastNoiseDouble {
long y1 = y0 + 1;
long z1 = z0 + 1;
double xs, ys, zs;
double xs=0, ys=0, zs=0;
switch (m_longerp) {
default:
case Linear:
case Linear -> {
xs = xf - x0;
ys = yf - y0;
zs = zf - z0;
break;
case Hermite:
}
case Hermite -> {
xs = longerpHermiteFunc(xf - x0);
ys = longerpHermiteFunc(yf - y0);
zs = longerpHermiteFunc(zf - z0);
break;
case Qulongic:
}
case Qulongic -> {
xs = longerpQulongicFunc(xf - x0);
ys = longerpQulongicFunc(yf - y0);
zs = longerpQulongicFunc(zf - z0);
break;
}
}
Double3 vec0 = CELL_3D[(int) hash3D(seed, x0, y0, z0) & 255];
@ -2089,21 +1969,20 @@ public class FastNoiseDouble {
long x1 = x0 + 1;
long y1 = y0 + 1;
double xs, ys;
double xs=0, ys=0;
switch (m_longerp) {
default:
case Linear:
case Linear -> {
xs = xf - x0;
ys = yf - y0;
break;
case Hermite:
}
case Hermite -> {
xs = longerpHermiteFunc(xf - x0);
ys = longerpHermiteFunc(yf - y0);
break;
case Qulongic:
}
case Qulongic -> {
xs = longerpQulongicFunc(xf - x0);
ys = longerpQulongicFunc(yf - y0);
break;
}
}
Double2 vec0 = CELL_2D[(int) hash2D(seed, x0, y0) & 255];

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
public class FlatNoise implements NoiseGenerator {

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.generator.noise.FastNoiseDouble.FractalType;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.generator.noise.FastNoiseDouble.FractalType;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.generator.noise.FastNoiseDouble.FractalType;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.generator.noise.FastNoiseDouble.FractalType;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.generator.noise.FastNoiseDouble.FractalType;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
@FunctionalInterface

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
public interface NoiseGenerator {

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
public enum NoiseType {

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
public interface OctaveNoise {

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.IRare;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.M;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.generator.noise;
import com.volmit.iris.util.RNG;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager;
import com.google.gson.Gson;
@ -28,46 +46,44 @@ public class ConversionManager {
converters = new KList<>();
J.s(() ->
{
J.attemptAsync(() ->
{
if (Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) {
converters.add(new Converter() {
@Override
public String getOutExtension() {
return "iob";
}
J.attemptAsync(() ->
{
if (Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) {
converters.add(new Converter() {
@Override
public String getOutExtension() {
return "iob";
}
@Override
public String getInExtension() {
return "schem";
}
@Override
public String getInExtension() {
return "schem";
}
@Override
public void convert(File in, File out) {
SKConversion.convertSchematic(in, out);
}
});
@Override
public void convert(File in, File out) {
SKConversion.convertSchematic(in, out);
}
});
converters.add(new Converter() {
@Override
public String getOutExtension() {
return "iob";
}
converters.add(new Converter() {
@Override
public String getOutExtension() {
return "iob";
}
@Override
public String getInExtension() {
return "schematic";
}
@Override
public String getInExtension() {
return "schematic";
}
@Override
public void convert(File in, File out) {
SKConversion.convertSchematic(in, out);
}
});
}
});
}, 5);
@Override
public void convert(File in, File out) {
SKConversion.convertSchematic(in, out);
}
});
}
}), 5);
}
private String toPoolName(String poolReference) {
@ -118,22 +134,22 @@ public class ConversionManager {
if (compound.containsKey("blocks") && compound.containsKey("palette") && compound.containsKey("size")) {
String id = in.toURI().relativize(folder.toURI()).getPath() + file.getName().split("\\Q.\\E")[0];
ListTag<IntTag> size = (ListTag<IntTag>) compound.getListTag("size");
@SuppressWarnings("unchecked") ListTag<IntTag> size = (ListTag<IntTag>) compound.getListTag("size");
int w = size.get(0).asInt();
int h = size.get(1).asInt();
int d = size.get(2).asInt();
KList<BlockData> palette = new KList<>();
ListTag<CompoundTag> paletteList = (ListTag<CompoundTag>) compound.getListTag("palette");
@SuppressWarnings("unchecked") ListTag<CompoundTag> paletteList = (ListTag<CompoundTag>) compound.getListTag("palette");
for (int i = 0; i < paletteList.size(); i++) {
CompoundTag cp = paletteList.get(i);
palette.add(DirectWorldWriter.getBlockData(cp));
}
IrisJigsawPiece piece = new IrisJigsawPiece();
IrisObject object = new IrisObject(w, h, d);
ListTag<CompoundTag> blockList = (ListTag<CompoundTag>) compound.getListTag("blocks");
@SuppressWarnings("unchecked") ListTag<CompoundTag> blockList = (ListTag<CompoundTag>) compound.getListTag("blocks");
for (int i = 0; i < blockList.size(); i++) {
CompoundTag cp = blockList.get(i);
ListTag<IntTag> pos = (ListTag<IntTag>) cp.getListTag("pos");
@SuppressWarnings("unchecked") ListTag<IntTag> pos = (ListTag<IntTag>) cp.getListTag("pos");
int x = pos.get(0).asInt();
int y = pos.get(1).asInt();
int z = pos.get(2).asInt();

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager;
import com.volmit.iris.Iris;
@ -14,14 +32,14 @@ import org.bukkit.event.player.PlayerChangedWorldEvent;
import java.util.List;
public class IrisBoardManager implements BoardProvider, Listener {
@DontObfuscate
private final BoardManager manager;
private String mem = "...";
public RollingSequence hits = new RollingSequence(20);
public RollingSequence tp = new RollingSequence(100);
public final RollingSequence hits = new RollingSequence(20);
public final RollingSequence tp = new RollingSequence(100);
private final ChronoLatch cl = new ChronoLatch(1000);
@DontObfuscate
public IrisBoardManager() {
Iris.instance.registerListener(this);
//@builder
@ -37,7 +55,7 @@ public class IrisBoardManager implements BoardProvider, Listener {
J.s(() -> updatePlayer(e.getPlayer()));
}
@DontObfuscate
private boolean isIrisWorld(World w) {
return IrisWorlds.isIrisWorld(w) && IrisWorlds.access(w).isStudio();
}
@ -56,7 +74,7 @@ public class IrisBoardManager implements BoardProvider, Listener {
return C.GREEN + "Iris";
}
@DontObfuscate
@Override
public List<String> getLines(Player player) {
KList<String> v = new KList<>();
@ -87,9 +105,9 @@ public class IrisBoardManager implements BoardProvider, Listener {
parallaxRegions += g.getCompound().getEngine(i).getParallax().getRegionCount();
parallaxChunks += g.getCompound().getEngine(i).getParallax().getChunkCount();
loadedObjects += g.getCompound().getData().getObjectLoader().getSize();
memoryGuess += g.getCompound().getData().getObjectLoader().getTotalStorage() * 225;
memoryGuess += parallaxChunks * 3500;
memoryGuess += parallaxRegions * 1700000;
memoryGuess += g.getCompound().getData().getObjectLoader().getTotalStorage() * 225L;
memoryGuess += parallaxChunks * 3500L;
memoryGuess += parallaxRegions * 1700000L;
}
tp.put(0); // TODO: CHUNK SPEED
@ -118,7 +136,7 @@ public class IrisBoardManager implements BoardProvider, Listener {
return v;
}
@DontObfuscate
public void disable() {
manager.onDisable();
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager;
import com.google.gson.Gson;
@ -23,6 +41,7 @@ import java.io.IOException;
import java.util.Objects;
import java.util.UUID;
@SuppressWarnings("ALL")
@Data
public class IrisProject {
private File path;
@ -104,21 +123,18 @@ public class IrisProject {
}
private KList<Report> scanForErrors(IrisBiome biome, IrisObjectPlacement i) {
KList<Report> reports = new KList<>();
return reports;
return new KList<>();
}
private KList<Report> scanForErrors(IrisBiome biome, IrisBiomePaletteLayer i) {
KList<Report> reports = new KList<>();
return reports;
return new KList<>();
}
private KList<Report> scanForErrorsSeaLayers(IrisBiome biome, IrisBiomePaletteLayer i) {
KList<Report> reports = new KList<>();
return reports;
return new KList<>();
}
public boolean isOpen() {
@ -365,16 +381,16 @@ public class IrisProject {
settings.put("json.maxItemsComputed", 30000);
JSONArray schemas = new JSONArray();
IrisDataManager dm = new IrisDataManager(getPath());
schemas.put(getSchemaEntry(IrisDimension.class, dm, "/dimensions/*.json"));
schemas.put(getSchemaEntry(IrisEntity.class, dm, "/entities/*.json"));
schemas.put(getSchemaEntry(IrisBiome.class, dm, "/biomes/*.json"));
schemas.put(getSchemaEntry(IrisRegion.class, dm, "/regions/*.json"));
schemas.put(getSchemaEntry(IrisGenerator.class, dm, "/generators/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPiece.class, dm, "/jigsaw-pieces/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPool.class, dm, "/jigsaw-pools/*.json"));
schemas.put(getSchemaEntry(IrisJigsawStructure.class, dm, "/jigsaw-structures/*.json"));
schemas.put(getSchemaEntry(IrisBlockData.class, dm, "/blocks/*.json"));
schemas.put(getSchemaEntry(IrisLootTable.class, dm, "/loot/*.json"));
schemas.put(getSchemaEntry(IrisDimension.class, dm, "/dimensions/*.json", "/dimensions/*/*.json", "/dimensions/*/*/*.json"));
schemas.put(getSchemaEntry(IrisEntity.class, dm, "/entities/*.json", "/entities/*/*.json", "/entities/*/*/*.json"));
schemas.put(getSchemaEntry(IrisBiome.class, dm, "/biomes/*.json", "/biomes/*/*.json", "/biomes/*/*/*.json"));
schemas.put(getSchemaEntry(IrisRegion.class, dm, "/regions/*.json", "/regions/*/*.json", "/regions/*/*/*.json"));
schemas.put(getSchemaEntry(IrisGenerator.class, dm, "/generators/*.json", "/generators/*/*.json", "/generators/*/*/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPiece.class, dm, "/jigsaw-pieces/*.json", "/jigsaw-pieces/*/*.json", "/jigsaw-pieces/*/*/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPool.class, dm, "/jigsaw-pools/*.json", "/jigsaw-pools/*/*.json", "/jigsaw-pools/*/*/*.json"));
schemas.put(getSchemaEntry(IrisJigsawStructure.class, dm, "/jigsaw-structures/*.json", "/jigsaw-structures/*/*/*.json", "/jigsaw-structures/*/*.json"));
schemas.put(getSchemaEntry(IrisBlockData.class, dm, "/blocks/*.json", "/blocks/*/*.json", "/blocks/*/*/*.json"));
schemas.put(getSchemaEntry(IrisLootTable.class, dm, "/loot/*.json", "/loot/*/*.json", "/loot/*/*/*.json"));
settings.put("json.schemas", schemas);
ws.put("settings", settings);

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager;
import com.google.gson.Gson;
@ -12,7 +30,6 @@ import org.zeroturnaround.zip.ZipUtil;
import org.zeroturnaround.zip.commons.FileUtils;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.UUID;
@ -35,7 +52,7 @@ public class ProjectManager {
if (m != null) {
try {
IO.copyFile(m, ignore);
} catch (IOException e) {
} catch (IOException ignored) {
}
}
@ -45,7 +62,8 @@ public class ProjectManager {
}
public static int countUniqueDimensions() {
int vv = counter.aquire(() -> {
return counter.aquire(() -> {
int v = 0;
try {
@ -64,8 +82,6 @@ public class ProjectManager {
return v;
});
return vv;
}
public IrisDimension installIntoWorld(MortarSender sender, String type, File folder) {
@ -88,7 +104,7 @@ public class ProjectManager {
try {
FileUtils.copyDirectory(f, irispack);
} catch (IOException e) {
} catch (IOException ignored) {
}
}
@ -174,12 +190,13 @@ public class ProjectManager {
} catch (Throwable e) {
e.printStackTrace();
sender.sendMessage(
"Issue when unpacking. Please check/do the following:" +
"\n1. Do you have a functioning internet connection?" +
"\n2. Did the download corrupt?" +
"\n3. Try deleting the */plugins/iris/packs folder and re-download." +
"\n4. Download the pack from the GitHub repo: https://github.com/IrisDimensions/overworld" +
"\n5. 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;
@ -334,12 +351,7 @@ public class ProjectManager {
}
try {
FileUtils.copyDirectory(importPack, newPack, new FileFilter() {
@Override
public boolean accept(File pathname) {
return !pathname.getAbsolutePath().contains(".git");
}
}, false);
FileUtils.copyDirectory(importPack, newPack, pathname -> !pathname.getAbsolutePath().contains(".git"), false);
} catch (IOException e) {
e.printStackTrace();
}

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager;
import com.volmit.iris.Iris;
@ -109,7 +127,7 @@ public class WandManager implements Listener {
}
Location lv = new Location(d[0].getWorld(), j, k, l).clone().add(0.5, 0.5, 0.5).clone().add(push);
Color color = Color.getHSBColor((float) (0.5f + (Math.sin((j + k + l + (p.getTicksLived() / 2)) / 20f) / 2)), 1, 1);
Color color = Color.getHSBColor((float) (0.5f + (Math.sin((j + k + l + (p.getTicksLived() / 2f)) / 20f) / 2)), 1, 1);
int r = color.getRed();
int g = color.getGreen();
int b = color.getBlue();

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command;
import com.volmit.iris.Iris;
@ -29,6 +47,7 @@ public class CommandIrisDownload extends MortarCommand {
for (String i : args) {
if (i.equals("-t") || i.equals("--trim")) {
trim = true;
break;
}
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command;
import com.volmit.iris.util.MortarPermission;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command;
import com.volmit.iris.util.MortarPermission;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.jigsaw;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.jigsaw;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.jigsaw;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.jigsaw;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.jigsaw;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.jigsaw;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;
@ -41,7 +59,7 @@ public class CommandIrisObjectContract extends MortarCommand {
return true;
}
int amt = args.length == 1 ? Integer.valueOf(args[0]) : 1;
int amt = args.length == 1 ? Integer.parseInt(args[0]) : 1;
Location[] b = WandManager.getCuboid(p.getInventory().getItemInMainHand());
Location a1 = b[0].clone();
Location a2 = b[1].clone();

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;
@ -41,7 +59,7 @@ public class CommandIrisObjectExpand extends MortarCommand {
return true;
}
int amt = args.length == 1 ? Integer.valueOf(args[0]) : 1;
int amt = args.length == 1 ? Integer.parseInt(args[0]) : 1;
Location[] b = WandManager.getCuboid(p.getInventory().getItemInMainHand());
Location a1 = b[0].clone();
Location a2 = b[1].clone();

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;
@ -7,12 +25,9 @@ import com.volmit.iris.util.KList;
import com.volmit.iris.util.MortarCommand;
import com.volmit.iris.util.MortarSender;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.Set;
public class CommandIrisObjectP1 extends MortarCommand {
public CommandIrisObjectP1() {
super("p1");

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;
@ -7,12 +25,9 @@ import com.volmit.iris.util.KList;
import com.volmit.iris.util.MortarCommand;
import com.volmit.iris.util.MortarSender;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.Set;
public class CommandIrisObjectP2 extends MortarCommand {
public CommandIrisObjectP2() {
super("p2");

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;
@ -10,13 +28,11 @@ import com.volmit.iris.util.KList;
import com.volmit.iris.util.MortarCommand;
import com.volmit.iris.util.MortarSender;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.Set;
public class CommandIrisObjectPaste extends MortarCommand {
public CommandIrisObjectPaste() {
@ -63,6 +79,7 @@ public class CommandIrisObjectPaste extends MortarCommand {
for (String i : args) {
if (i.equalsIgnoreCase("-edit")) {
intoWand = true;
break;
}
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;
@ -51,6 +69,7 @@ public class CommandIrisObjectSave extends MortarCommand {
for (String i : args) {
if (i.equals("-o")) {
overwrite = true;
break;
}
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;
@ -41,7 +59,7 @@ public class CommandIrisObjectShift extends MortarCommand {
return true;
}
int amt = args.length == 1 ? Integer.valueOf(args[0]) : 1;
int amt = args.length == 1 ? Integer.parseInt(args[0]) : 1;
Location[] b = WandManager.getCuboid(p.getInventory().getItemInMainHand());
Location a1 = b[0].clone();
Location a2 = b[1].clone();

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.object;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;
@ -12,7 +30,7 @@ import com.volmit.iris.util.RNG;
public class CommandIrisStudioExplorerGenerator extends MortarCommand {
public CommandIrisStudioExplorerGenerator() {
super("generator", "gen", "g");
super("generator", "gen");
setDescription("Preview created noise noises generators");
requiresPermission(Iris.perm.studio);
setCategory("World");

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;
@ -72,7 +90,7 @@ public class CommandIrisStudioLoot extends MortarCommand {
boolean fast = ffast;
boolean add = fadd;
O<Integer> ta = new O<Integer>();
O<Integer> ta = new O<>();
ta.set(-1);
ta.set(Bukkit.getScheduler().scheduleSyncRepeatingTask(Iris.instance, () ->

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;
@ -40,6 +58,7 @@ public class CommandIrisStudioPackage extends MortarCommand {
for (String i : args) {
if (i.equalsIgnoreCase("-o")) {
o = true;
break;
}
}

View File

@ -1,3 +1,21 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;
@ -95,12 +113,7 @@ public class CommandIrisStudioProfile extends MortarCommand {
in.setFunction(i);
in.setHorizontalScale(8);
NoiseProvider np = new NoiseProvider() {
@Override
public double noise(double x, double z) {
return Math.random();
}
};
NoiseProvider np = (x, z) -> Math.random();
for (int j = 0; j < 3000; j++) {
in.interpolate(j, -j, np);

Some files were not shown because too many files have changed in this diff Show More