mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 14:00:14 +00:00
Merge remote-tracking branch 'source/master'
This commit is contained in:
61 files changed
+737
-272
No files matched your search
+8
-7
@@ -33,7 +33,7 @@ dependencies {
|
|||||||
compileOnly("org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT")
|
compileOnly("org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT")
|
||||||
compileOnly("org.jetbrains:annotations:20.1.0") // more recent.
|
compileOnly("org.jetbrains:annotations:20.1.0") // more recent.
|
||||||
implementation("commons-io:commons-io:2.4")
|
implementation("commons-io:commons-io:2.4")
|
||||||
compileOnly(name = "Gaea-1.14.1", group = "")
|
compileOnly(name = "Gaea-1.14.2", group = "")
|
||||||
implementation("org.apache.commons:commons-imaging:1.0-alpha2")
|
implementation("org.apache.commons:commons-imaging:1.0-alpha2")
|
||||||
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT")
|
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT")
|
||||||
implementation("org.bstats:bstats-bukkit:1.7")
|
implementation("org.bstats:bstats-bukkit:1.7")
|
||||||
@@ -45,7 +45,8 @@ dependencies {
|
|||||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
||||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
||||||
|
|
||||||
testImplementation(name = "Gaea-1.14.0", group = "")
|
testImplementation(name = "Gaea-1.14.2", group = "")
|
||||||
|
testImplementation("org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT")
|
||||||
}
|
}
|
||||||
|
|
||||||
val compileJava: JavaCompile by tasks
|
val compileJava: JavaCompile by tasks
|
||||||
@@ -120,7 +121,7 @@ val testWithPaper = task<JavaExec>(name = "testWithPaper") {
|
|||||||
"-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90",
|
"-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90",
|
||||||
"-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32", "-XX:+PerfDisableSharedMem",
|
"-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32", "-XX:+PerfDisableSharedMem",
|
||||||
"-XX:MaxTenuringThreshold=1", "-Dusing.aikars.flags=https://mcflags.emc.gs",
|
"-XX:MaxTenuringThreshold=1", "-Dusing.aikars.flags=https://mcflags.emc.gs",
|
||||||
"-Daikars.new.flags=true")
|
"-Daikars.new.flags=true", "-DIReallyKnowWhatIAmDoingISwear")
|
||||||
maxHeapSize = "2G"
|
maxHeapSize = "2G"
|
||||||
args = listOf("nogui")
|
args = listOf("nogui")
|
||||||
workingDir = file("${testDir}/")
|
workingDir = file("${testDir}/")
|
||||||
@@ -131,10 +132,10 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
archiveClassifier.set("")
|
archiveClassifier.set("")
|
||||||
archiveBaseName.set("Terra")
|
archiveBaseName.set("Terra")
|
||||||
setVersion(project.version)
|
setVersion(project.version)
|
||||||
relocate("org.apache.commons", "lib.commons")
|
relocate("org.apache.commons", "com.dfsek.terra.lib.commons")
|
||||||
relocate("org.bstats.bukkit", "lib.bstats")
|
relocate("org.bstats.bukkit", "com.dfsek.terra.lib.bstats")
|
||||||
relocate("parsii", "lib.parsii")
|
relocate("parsii", "com.dfsek.terra.lib.parsii")
|
||||||
relocate("io.papermc.lib", "lib.paperlib")
|
relocate("io.papermc.lib", "com.dfsek.terra.lib.paperlib")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.build {
|
tasks.build {
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,7 +19,7 @@ public class TerraProfiler extends WorldProfiler {
|
|||||||
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "OreTime")
|
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "OreTime")
|
||||||
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "CaveTime")
|
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "CaveTime")
|
||||||
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "StructureTime")
|
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "StructureTime")
|
||||||
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "StructurePasteTime")
|
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "ElevationTime")
|
||||||
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "SnowTime")
|
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "SnowTime")
|
||||||
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "CaveBlockUpdate");
|
.addMeasurement(new Measurement(1500000, DataType.PERIOD_MILLISECONDS), "CaveBlockUpdate");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public enum FailType {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns null, hard crashing the server, but not generating any corrupted terrain.<br>
|
* Returns null, hard crashing the server, but not generating any corrupted terrain.<br>
|
||||||
* This option is <br>NOT</br> stable, but it has the least risk of blank chunks being generated.
|
* This option is <b>NOT</b> stable, but it has the least risk of blank chunks being generated.
|
||||||
* However, it has the highest risk of corruption!
|
* However, it has the highest risk of corruption!
|
||||||
*/
|
*/
|
||||||
CRASH {
|
CRASH {
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ public final class FailoverGenerator extends UserDefinedGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FailoverGenerator() throws ParseException {
|
public FailoverGenerator() throws ParseException {
|
||||||
super("0", Collections.emptyList(), palette, false);
|
super("0", null, Collections.emptyList(), palette, new TreeMap<>(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,9 @@ public class UserDefinedCarver extends Carver {
|
|||||||
private final int hash;
|
private final int hash;
|
||||||
private final int topCut;
|
private final int topCut;
|
||||||
private final int bottomCut;
|
private final int bottomCut;
|
||||||
|
private double step = 2;
|
||||||
|
private Range recalc = new Range(8, 10);
|
||||||
|
private double recalcMagnitude = 3;
|
||||||
|
|
||||||
public UserDefinedCarver(Range height, Range radius, Range length, double[] start, double[] mutate, double[] radiusMultiplier, int hash, int topCut, int bottomCut) {
|
public UserDefinedCarver(Range height, Range radius, Range length, double[] start, double[] mutate, double[] radiusMultiplier, int hash, int topCut, int bottomCut) {
|
||||||
super(height.getMin(), height.getMax());
|
super(height.getMin(), height.getMax());
|
||||||
@@ -40,6 +43,18 @@ public class UserDefinedCarver extends Carver {
|
|||||||
return new UserDefinedWorm(length.get(r) / 2, r, vector, radius.getMax(), topCut, bottomCut);
|
return new UserDefinedWorm(length.get(r) / 2, r, vector, radius.getMax(), topCut, bottomCut);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setStep(double step) {
|
||||||
|
this.step = step;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecalc(Range recalc) {
|
||||||
|
this.recalc = recalc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecalcMagnitude(double recalcMagnitude) {
|
||||||
|
this.recalcMagnitude = recalcMagnitude;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isChunkCarved(World w, int chunkX, int chunkZ, Random random) {
|
public boolean isChunkCarved(World w, int chunkX, int chunkZ, Random random) {
|
||||||
ConfigPack c = TerraWorld.getWorld(w).getConfig();
|
ConfigPack c = TerraWorld.getWorld(w).getConfig();
|
||||||
@@ -50,6 +65,9 @@ public class UserDefinedCarver extends Carver {
|
|||||||
private final Vector direction;
|
private final Vector direction;
|
||||||
private final int maxRad;
|
private final int maxRad;
|
||||||
private double runningRadius;
|
private double runningRadius;
|
||||||
|
private int steps;
|
||||||
|
private int nextDirection = 0;
|
||||||
|
private double[] currentRotation = new double[3];
|
||||||
|
|
||||||
public UserDefinedWorm(int length, Random r, Vector origin, int maxRad, int topCut, int bottomCut) {
|
public UserDefinedWorm(int length, Random r, Vector origin, int maxRad, int topCut, int bottomCut) {
|
||||||
super(length, r, origin);
|
super(length, r, origin);
|
||||||
@@ -57,17 +75,27 @@ public class UserDefinedCarver extends Carver {
|
|||||||
super.setBottomCut(bottomCut);
|
super.setBottomCut(bottomCut);
|
||||||
runningRadius = radius.get(r);
|
runningRadius = radius.get(r);
|
||||||
this.maxRad = maxRad;
|
this.maxRad = maxRad;
|
||||||
direction = new Vector((r.nextDouble() - 0.5D) * start[0], (r.nextDouble() - 0.5D) * start[1], (r.nextDouble() - 0.5D) * start[2]).normalize().multiply(2);
|
direction = new Vector((r.nextDouble() - 0.5D) * start[0], (r.nextDouble() - 0.5D) * start[1], (r.nextDouble() - 0.5D) * start[2]).normalize().multiply(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void step() {
|
public void step() {
|
||||||
|
if(steps == nextDirection) {
|
||||||
|
direction.rotateAroundX(Math.toRadians((getRandom().nextGaussian()) * mutate[0] * recalcMagnitude));
|
||||||
|
direction.rotateAroundY(Math.toRadians((getRandom().nextGaussian()) * mutate[1] * recalcMagnitude));
|
||||||
|
direction.rotateAroundZ(Math.toRadians((getRandom().nextGaussian()) * mutate[2] * recalcMagnitude));
|
||||||
|
currentRotation = new double[] {(getRandom().nextGaussian()) * mutate[0],
|
||||||
|
(getRandom().nextGaussian()) * mutate[1],
|
||||||
|
(getRandom().nextGaussian()) * mutate[2]};
|
||||||
|
nextDirection += recalc.get(getRandom());
|
||||||
|
}
|
||||||
|
steps++;
|
||||||
setRadius(new int[] {(int) (runningRadius * radiusMultiplier[0]), (int) (runningRadius * radiusMultiplier[1]), (int) (runningRadius * radiusMultiplier[2])});
|
setRadius(new int[] {(int) (runningRadius * radiusMultiplier[0]), (int) (runningRadius * radiusMultiplier[1]), (int) (runningRadius * radiusMultiplier[2])});
|
||||||
runningRadius += (getRandom().nextDouble() - 0.5) * mutate[3];
|
runningRadius += (getRandom().nextDouble() - 0.5) * mutate[3];
|
||||||
runningRadius = Math.max(Math.min(runningRadius, maxRad), 1);
|
runningRadius = Math.max(Math.min(runningRadius, maxRad), 1);
|
||||||
direction.rotateAroundX(Math.toRadians(getRandom().nextDouble() * mutate[0] * 2));
|
direction.rotateAroundX(Math.toRadians(currentRotation[0] * mutate[0]));
|
||||||
direction.rotateAroundY(Math.toRadians(getRandom().nextDouble() * mutate[1] * 2));
|
direction.rotateAroundY(Math.toRadians(currentRotation[1] * mutate[1]));
|
||||||
direction.rotateAroundZ(Math.toRadians(getRandom().nextDouble() * mutate[2] * 2));
|
direction.rotateAroundZ(Math.toRadians(currentRotation[2] * mutate[2]));
|
||||||
getRunning().add(direction);
|
getRunning().add(direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.dfsek.terra.TerraWorld;
|
|||||||
import com.dfsek.terra.biome.failsafe.FailType;
|
import com.dfsek.terra.biome.failsafe.FailType;
|
||||||
import com.dfsek.terra.config.exception.ConfigException;
|
import com.dfsek.terra.config.exception.ConfigException;
|
||||||
import com.dfsek.terra.config.lang.LangUtil;
|
import com.dfsek.terra.config.lang.LangUtil;
|
||||||
|
import com.dfsek.terra.util.TagUtil;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.InvalidConfigurationException;
|
import org.bukkit.configuration.InvalidConfigurationException;
|
||||||
@@ -72,9 +73,20 @@ public final class ConfigUtil {
|
|||||||
Set<Material> bl = new HashSet<>();
|
Set<Material> bl = new HashSet<>();
|
||||||
for(String s : list) {
|
for(String s : list) {
|
||||||
try {
|
try {
|
||||||
if(bl.contains(Bukkit.createBlockData(s).getMaterial()))
|
if(s.startsWith("#")) {
|
||||||
Bukkit.getLogger().warning("Duplicate material in " + phase + " list: " + s);
|
Debug.info("Loading Tag " + s);
|
||||||
bl.add(Bukkit.createBlockData(s).getMaterial());
|
Set<Material> tag = TagUtil.getTag(s.substring(1));
|
||||||
|
for(Material m : tag) {
|
||||||
|
if(bl.contains(m)) {
|
||||||
|
Bukkit.getLogger().warning("Duplicate material in " + phase + " list: " + m); // Check for duplicates in this tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bl.addAll(tag);
|
||||||
|
} else {
|
||||||
|
if(bl.contains(Bukkit.createBlockData(s).getMaterial()))
|
||||||
|
Bukkit.getLogger().warning("Duplicate material in " + phase + " list: " + s);
|
||||||
|
bl.add(Bukkit.createBlockData(s).getMaterial());
|
||||||
|
}
|
||||||
} catch(NullPointerException | IllegalArgumentException e) {
|
} catch(NullPointerException | IllegalArgumentException e) {
|
||||||
throw new ConfigException("Could not load BlockData data for \"" + s + "\"", id);
|
throw new ConfigException("Could not load BlockData data for \"" + s + "\"", id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class CarverConfig extends TerraConfig {
|
|||||||
private final boolean replaceIsBlacklistTop;
|
private final boolean replaceIsBlacklistTop;
|
||||||
private final boolean replaceIsBlacklistBottom;
|
private final boolean replaceIsBlacklistBottom;
|
||||||
private final boolean updateOcean;
|
private final boolean updateOcean;
|
||||||
|
private final Range recalc;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public CarverConfig(File file, ConfigPack config) throws IOException, InvalidConfigurationException {
|
public CarverConfig(File file, ConfigPack config) throws IOException, InvalidConfigurationException {
|
||||||
@@ -69,6 +70,9 @@ public class CarverConfig extends TerraConfig {
|
|||||||
|
|
||||||
updateOcean = getBoolean("update-liquids", false);
|
updateOcean = getBoolean("update-liquids", false);
|
||||||
|
|
||||||
|
double step = getDouble("step", 2);
|
||||||
|
recalc = new Range(getInt("recalculate-direction.min", 8), getInt("recalculate-direction.max", 12));
|
||||||
|
double rm = getDouble("recalculate-magnitude", 4);
|
||||||
shift = new HashMap<>();
|
shift = new HashMap<>();
|
||||||
for(Map.Entry<String, Object> e : Objects.requireNonNull(getConfigurationSection("shift")).getValues(false).entrySet()) {
|
for(Map.Entry<String, Object> e : Objects.requireNonNull(getConfigurationSection("shift")).getValues(false).entrySet()) {
|
||||||
Set<Material> l = new HashSet<>();
|
Set<Material> l = new HashSet<>();
|
||||||
@@ -93,6 +97,9 @@ public class CarverConfig extends TerraConfig {
|
|||||||
Range height = new Range(getInt("start.height.min"), getInt("start.height.max"));
|
Range height = new Range(getInt("start.height.min"), getInt("start.height.max"));
|
||||||
|
|
||||||
carver = new UserDefinedCarver(height, radius, length, start, mutate, radiusMultiplier, id.hashCode(), getInt("cut.top", 0), getInt("cut.bottom", 0));
|
carver = new UserDefinedCarver(height, radius, length, start, mutate, radiusMultiplier, id.hashCode(), getInt("cut.top", 0), getInt("cut.bottom", 0));
|
||||||
|
carver.setStep(step);
|
||||||
|
carver.setRecalc(recalc);
|
||||||
|
carver.setRecalcMagnitude(rm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class AbstractBiomeConfig extends TerraConfig {
|
|||||||
|
|
||||||
if(contains("carving")) carving = new BiomeCarverConfig(this);
|
if(contains("carving")) carving = new BiomeCarverConfig(this);
|
||||||
|
|
||||||
if(contains("palette")) palette = new BiomePaletteConfig(this);
|
if(contains("palette")) palette = new BiomePaletteConfig(this, "palette");
|
||||||
|
|
||||||
if(contains("flora")) flora = new BiomeFloraConfig(this);
|
if(contains("flora")) flora = new BiomeFloraConfig(this);
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ import com.dfsek.terra.config.exception.NotFoundException;
|
|||||||
import com.dfsek.terra.config.genconfig.structure.StructureConfig;
|
import com.dfsek.terra.config.genconfig.structure.StructureConfig;
|
||||||
import com.dfsek.terra.generation.UserDefinedDecorator;
|
import com.dfsek.terra.generation.UserDefinedDecorator;
|
||||||
import com.dfsek.terra.generation.UserDefinedGenerator;
|
import com.dfsek.terra.generation.UserDefinedGenerator;
|
||||||
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.configuration.InvalidConfigurationException;
|
import org.bukkit.configuration.InvalidConfigurationException;
|
||||||
import org.polydev.gaea.math.Range;
|
import org.polydev.gaea.math.Range;
|
||||||
import org.polydev.gaea.tree.Tree;
|
import org.polydev.gaea.tree.Tree;
|
||||||
import org.polydev.gaea.world.Flora;
|
import org.polydev.gaea.world.Flora;
|
||||||
|
import org.polydev.gaea.world.palette.Palette;
|
||||||
import parsii.tokenizer.ParseException;
|
import parsii.tokenizer.ParseException;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -22,6 +24,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
public class BiomeConfig extends TerraConfig {
|
public class BiomeConfig extends TerraConfig {
|
||||||
|
|
||||||
@@ -36,6 +39,9 @@ public class BiomeConfig extends TerraConfig {
|
|||||||
private final BiomeSnowConfig snow;
|
private final BiomeSnowConfig snow;
|
||||||
private final List<StructureConfig> structures;
|
private final List<StructureConfig> structures;
|
||||||
private final ConfigPack config;
|
private final ConfigPack config;
|
||||||
|
private final double ySlantOffsetTop;
|
||||||
|
private final double ySlantOffsetBottom;
|
||||||
|
|
||||||
private String eq;
|
private String eq;
|
||||||
|
|
||||||
public BiomeConfig(File file, ConfigPack config) throws InvalidConfigurationException, IOException {
|
public BiomeConfig(File file, ConfigPack config) throws InvalidConfigurationException, IOException {
|
||||||
@@ -72,7 +78,7 @@ public class BiomeConfig extends TerraConfig {
|
|||||||
if(extending && abstractBiome.getPaletteData() != null && !contains("palette")) {
|
if(extending && abstractBiome.getPaletteData() != null && !contains("palette")) {
|
||||||
palette = abstractBiome.getPaletteData();
|
palette = abstractBiome.getPaletteData();
|
||||||
Debug.info("Using super palette");
|
Debug.info("Using super palette");
|
||||||
} else palette = new BiomePaletteConfig(this);
|
} else palette = new BiomePaletteConfig(this, "palette");
|
||||||
|
|
||||||
// Palette must not be null
|
// Palette must not be null
|
||||||
if(palette.getPaletteMap() == null)
|
if(palette.getPaletteMap() == null)
|
||||||
@@ -120,6 +126,17 @@ public class BiomeConfig extends TerraConfig {
|
|||||||
Debug.info("Using super snow");
|
Debug.info("Using super snow");
|
||||||
} else snow = new BiomeSnowConfig(this);
|
} else snow = new BiomeSnowConfig(this);
|
||||||
|
|
||||||
|
// Get slant stuff
|
||||||
|
TreeMap<Integer, Palette<BlockData>> slant = new TreeMap<>();
|
||||||
|
if(contains("slant")) {
|
||||||
|
String slantS = getString("slant.palette");
|
||||||
|
slant = new BiomePaletteConfig(this, "slant.palette").getPaletteMap();
|
||||||
|
Debug.info("Using slant palette: " + slantS);
|
||||||
|
if(slant == null) throw new NotFoundException("Slant Palette", slantS, getID());
|
||||||
|
}
|
||||||
|
ySlantOffsetTop = getDouble("slant.y-offset.top", 0.25);
|
||||||
|
ySlantOffsetBottom = getDouble("slant.y-offset.bottom", 0.25);
|
||||||
|
|
||||||
//Make sure equation is non-null
|
//Make sure equation is non-null
|
||||||
if(eq == null || eq.equals(""))
|
if(eq == null || eq.equals(""))
|
||||||
throw new ConfigException("Could not find noise equation! Biomes must include a noise equation, or extend an abstract biome with one.", getID());
|
throw new ConfigException("Could not find noise equation! Biomes must include a noise equation, or extend an abstract biome with one.", getID());
|
||||||
@@ -150,9 +167,14 @@ public class BiomeConfig extends TerraConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String elevation = getString("elevation.equation", null);
|
||||||
|
boolean doElevationInterpolation = getBoolean("elevation.interpolation", true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Get UserDefinedBiome instance representing this config.
|
// Get UserDefinedBiome instance representing this config.
|
||||||
this.biome = new UserDefinedBiome(vanillaBiome, dec, new UserDefinedGenerator(eq, Collections.emptyList(), palette.getPaletteMap(), getBoolean("prevent-smooth", false)), getBoolean("erodible", false), biomeID);
|
UserDefinedGenerator gen = new UserDefinedGenerator(eq, elevation, Collections.emptyList(), palette.getPaletteMap(), slant, getBoolean("prevent-smooth", false));
|
||||||
|
gen.setElevationInterpolation(doElevationInterpolation);
|
||||||
|
this.biome = new UserDefinedBiome(vanillaBiome, dec, gen, getBoolean("erodible", false), biomeID);
|
||||||
} catch(ParseException e) {
|
} catch(ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new ConfigException("Unable to parse noise equation!", getID());
|
throw new ConfigException("Unable to parse noise equation!", getID());
|
||||||
@@ -175,6 +197,14 @@ public class BiomeConfig extends TerraConfig {
|
|||||||
return flora.getFloraHeights().computeIfAbsent(f, input -> new Range(-1, -1));
|
return flora.getFloraHeights().computeIfAbsent(f, input -> new Range(-1, -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getYSlantOffsetTop() {
|
||||||
|
return ySlantOffsetTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getYSlantOffsetBottom() {
|
||||||
|
return ySlantOffsetBottom;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Biome with ID " + getID() + " and noise equation " + eq;
|
return "Biome with ID " + getID() + " and noise equation " + eq;
|
||||||
|
|||||||
@@ -19,10 +19,9 @@ import java.util.TreeMap;
|
|||||||
public class BiomePaletteConfig extends TerraConfigSection {
|
public class BiomePaletteConfig extends TerraConfigSection {
|
||||||
private TreeMap<Integer, Palette<BlockData>> paletteMap;
|
private TreeMap<Integer, Palette<BlockData>> paletteMap;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
public BiomePaletteConfig(TerraConfig parent, String key) throws InvalidConfigurationException {
|
||||||
public BiomePaletteConfig(TerraConfig parent) throws InvalidConfigurationException {
|
|
||||||
super(parent);
|
super(parent);
|
||||||
List<Map<?, ?>> cfg = parent.getMapList("palette");
|
List<Map<?, ?>> cfg = parent.getMapList(key);
|
||||||
if(cfg.size() == 0) return;
|
if(cfg.size() == 0) return;
|
||||||
paletteMap = new TreeMap<>();
|
paletteMap = new TreeMap<>();
|
||||||
for(Map<?, ?> e : cfg) {
|
for(Map<?, ?> e : cfg) {
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.dfsek.terra.generation;
|
||||||
|
|
||||||
|
import com.dfsek.terra.math.NoiseFunction2;
|
||||||
|
import org.polydev.gaea.math.FastNoiseLite;
|
||||||
|
import parsii.eval.Expression;
|
||||||
|
import parsii.eval.Parser;
|
||||||
|
import parsii.eval.Scope;
|
||||||
|
import parsii.eval.Variable;
|
||||||
|
import parsii.tokenizer.ParseException;
|
||||||
|
|
||||||
|
public class ElevationEquation {
|
||||||
|
private static final Object noiseLock = new Object();
|
||||||
|
private final Expression delegate;
|
||||||
|
private final Scope s = new Scope();
|
||||||
|
private final NoiseFunction2 n2 = new NoiseFunction2();
|
||||||
|
|
||||||
|
private final Variable xVar = s.getVariable("x");
|
||||||
|
private final Variable zVar = s.getVariable("z");
|
||||||
|
|
||||||
|
public ElevationEquation(String equation) throws ParseException {
|
||||||
|
Parser p = new Parser();
|
||||||
|
p.registerFunction("noise2", n2);
|
||||||
|
delegate = p.parse(equation, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getNoise(double x, double z, FastNoiseLite noiseLite) {
|
||||||
|
synchronized(noiseLock) {
|
||||||
|
xVar.setValue(x);
|
||||||
|
zVar.setValue(z);
|
||||||
|
|
||||||
|
n2.setNoise(noiseLite);
|
||||||
|
return delegate.evaluate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.dfsek.terra.generation;
|
||||||
|
|
||||||
|
import com.dfsek.terra.biome.TerraBiomeGrid;
|
||||||
|
import org.bukkit.World;
|
||||||
|
import org.polydev.gaea.generation.GenerationPhase;
|
||||||
|
import org.polydev.gaea.math.FastNoiseLite;
|
||||||
|
import org.polydev.gaea.math.Interpolator;
|
||||||
|
|
||||||
|
public class ElevationInterpolator {
|
||||||
|
private final UserDefinedGenerator[][] gens = new UserDefinedGenerator[10][10];
|
||||||
|
private final double[][] values = new double[18][18];
|
||||||
|
private final FastNoiseLite noise;
|
||||||
|
private final int xOrigin;
|
||||||
|
private final int zOrigin;
|
||||||
|
private final TerraBiomeGrid grid;
|
||||||
|
|
||||||
|
public ElevationInterpolator(World w, int chunkX, int chunkZ, TerraBiomeGrid grid, FastNoiseLite noise) {
|
||||||
|
this.xOrigin = chunkX << 4;
|
||||||
|
this.zOrigin = chunkZ << 4;
|
||||||
|
this.noise = noise;
|
||||||
|
this.grid = grid;
|
||||||
|
|
||||||
|
for(int x = -2; x < 8; x++) {
|
||||||
|
for(int z = -2; z < 8; z++) {
|
||||||
|
gens[x + 2][z + 2] = (UserDefinedGenerator) grid.getBiome(xOrigin + x * 4, zOrigin + z * 4, GenerationPhase.BASE).getGenerator();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(byte x = -1; x <= 16; x++) {
|
||||||
|
for(byte z = -1; z <= 16; z++) {
|
||||||
|
UserDefinedGenerator generator = getGenerator(x, z);
|
||||||
|
if(compareGens((x / 4), (z / 4)) && generator.interpolateElevation()) {
|
||||||
|
Interpolator interpolator = new Interpolator(biomeAvg(x / 4, z / 4),
|
||||||
|
biomeAvg((x / 4) + 1, z / 4),
|
||||||
|
biomeAvg(x / 4, (z / 4) + 1),
|
||||||
|
biomeAvg((x / 4) + 1, (z / 4) + 1),
|
||||||
|
Interpolator.Type.LINEAR);
|
||||||
|
values[x + 1][z + 1] = interpolator.bilerp((double) (x % 4) / 4, (double) (z % 4) / 4);
|
||||||
|
} else values[x + 1][z + 1] = elevate(generator, xOrigin + x, zOrigin + z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private UserDefinedGenerator getGenerator(int x, int z) {
|
||||||
|
return (UserDefinedGenerator) grid.getBiome(xOrigin + x, zOrigin + z, GenerationPhase.BASE).getGenerator();
|
||||||
|
}
|
||||||
|
|
||||||
|
private UserDefinedGenerator getStoredGen(int x, int z) {
|
||||||
|
return gens[x + 2][z + 2];
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean compareGens(int x, int z) {
|
||||||
|
UserDefinedGenerator comp = getStoredGen(x, z);
|
||||||
|
|
||||||
|
for(int xi = x - 2; xi <= x + 2; xi++) {
|
||||||
|
for(int zi = z - 2; zi <= z + 2; zi++) {
|
||||||
|
if(!comp.equals(getStoredGen(xi, zi))) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private double biomeAvg(int x, int z) {
|
||||||
|
return (elevate(getStoredGen(x + 1, z), x * 4 + 4 + xOrigin, z * 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x - 1, z), x * 4 - 4 + xOrigin, z * 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x, z + 1), x * 4 + xOrigin, z * 4 + 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x, z - 1), x * 4 + xOrigin, z * 4 - 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x, z), x * 4 + xOrigin, z * 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x - 1, z - 1), x * 4 + xOrigin, z * 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x - 1, z + 1), x * 4 + xOrigin, z * 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x + 1, z - 1), x * 4 + xOrigin, z * 4 + zOrigin)
|
||||||
|
+ elevate(getStoredGen(x + 1, z + 1), x * 4 + xOrigin, z * 4 + zOrigin)) / 9D;
|
||||||
|
}
|
||||||
|
|
||||||
|
private double elevate(UserDefinedGenerator g, int x, int z) {
|
||||||
|
if(g.getElevationEquation() != null) return g.getElevationEquation().getNoise(x, z, noise);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getElevation(int x, int z) {
|
||||||
|
return values[x + 1][z + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.dfsek.terra.generation;
|
|||||||
|
|
||||||
import com.dfsek.terra.Debug;
|
import com.dfsek.terra.Debug;
|
||||||
import com.dfsek.terra.Terra;
|
import com.dfsek.terra.Terra;
|
||||||
|
import com.dfsek.terra.TerraProfiler;
|
||||||
import com.dfsek.terra.TerraWorld;
|
import com.dfsek.terra.TerraWorld;
|
||||||
import com.dfsek.terra.biome.UserDefinedBiome;
|
import com.dfsek.terra.biome.UserDefinedBiome;
|
||||||
import com.dfsek.terra.config.base.ConfigPack;
|
import com.dfsek.terra.config.base.ConfigPack;
|
||||||
@@ -30,6 +31,7 @@ import org.polydev.gaea.generation.GenerationPhase;
|
|||||||
import org.polydev.gaea.generation.GenerationPopulator;
|
import org.polydev.gaea.generation.GenerationPopulator;
|
||||||
import org.polydev.gaea.math.ChunkInterpolator;
|
import org.polydev.gaea.math.ChunkInterpolator;
|
||||||
import org.polydev.gaea.population.PopulationManager;
|
import org.polydev.gaea.population.PopulationManager;
|
||||||
|
import org.polydev.gaea.profiler.ProfileFuture;
|
||||||
import org.polydev.gaea.profiler.WorldProfiler;
|
import org.polydev.gaea.profiler.WorldProfiler;
|
||||||
import org.polydev.gaea.world.palette.Palette;
|
import org.polydev.gaea.world.palette.Palette;
|
||||||
|
|
||||||
@@ -80,60 +82,44 @@ public class TerraChunkGenerator extends GaeaChunkGenerator {
|
|||||||
popMan.attachProfiler(p);
|
popMan.attachProfiler(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private static Palette<BlockData> getPalette(int x, int y, int z, BiomeConfig c, ChunkInterpolator interpolator, ElevationInterpolator elevationInterpolator) {
|
||||||
public ChunkData generateBase(@NotNull World world, @NotNull Random random, int chunkX, int chunkZ, ChunkInterpolator interpolator) {
|
Palette<BlockData> slant = ((UserDefinedGenerator) c.getBiome().getGenerator()).getSlantPalette(y);
|
||||||
if(needsLoad) load(world); // Load population data for world.
|
if(slant != null) {
|
||||||
ChunkData chunk = createChunkData(world);
|
boolean north = interpolator.getNoise(x, y - elevationInterpolator.getElevation(x, z + 1), z + 1) > 0;
|
||||||
TerraWorld tw = TerraWorld.getWorld(world);
|
boolean south = interpolator.getNoise(x, y - elevationInterpolator.getElevation(x, z - 1), z - 1) > 0;
|
||||||
if(!tw.isSafe()) return chunk;
|
boolean east = interpolator.getNoise(x + 1, y - elevationInterpolator.getElevation(x + 1, z), z) > 0;
|
||||||
ConfigPack config = tw.getConfig();
|
boolean west = interpolator.getNoise(x - 1, y - elevationInterpolator.getElevation(x - 1, z), z) > 0;
|
||||||
int xOrig = (chunkX << 4);
|
|
||||||
int zOrig = (chunkZ << 4);
|
double ySlantOffsetTop = c.getYSlantOffsetTop();
|
||||||
org.polydev.gaea.biome.BiomeGrid grid = getBiomeGrid(world);
|
double ySlantOffsetBottom = c.getYSlantOffsetBottom();
|
||||||
for(byte x = 0; x < 16; x++) {
|
boolean top = interpolator.getNoise(x, y + ySlantOffsetTop - elevationInterpolator.getElevation(x, z), z) > 0;
|
||||||
for(byte z = 0; z < 16; z++) {
|
boolean bottom = interpolator.getNoise(x, y - ySlantOffsetBottom - elevationInterpolator.getElevation(x, z), z) > 0;
|
||||||
int paletteLevel = 0;
|
|
||||||
int cx = xOrig + x;
|
if((top && bottom) && (north || south || east || west) && (!(north && south && east && west))) return slant;
|
||||||
int cz = zOrig + z;
|
|
||||||
Biome b = grid.getBiome(xOrig + x, zOrig + z, GenerationPhase.PALETTE_APPLY);
|
|
||||||
BiomeConfig c = config.getBiome((UserDefinedBiome) b);
|
|
||||||
BiomeSlabConfig slab = c.getSlabs();
|
|
||||||
int sea = c.getOcean().getSeaLevel();
|
|
||||||
Palette<BlockData> seaPalette = c.getOcean().getOcean();
|
|
||||||
for(int y = world.getMaxHeight() - 1; y >= 0; y--) {
|
|
||||||
if(interpolator.getNoise(x, y, z) > 0) {
|
|
||||||
BlockData data = b.getGenerator().getPalette(y).get(paletteLevel, cx, cz);
|
|
||||||
chunk.setBlock(x, y, z, data);
|
|
||||||
if(paletteLevel == 0 && slab != null && y < 255) {
|
|
||||||
prepareBlockPart(data, chunk.getBlockData(x, y + 1, z), chunk, new Vector(x, y + 1, z), slab.getSlabs(),
|
|
||||||
slab.getStairs(), slab.getSlabThreshold(), interpolator);
|
|
||||||
}
|
|
||||||
paletteLevel++;
|
|
||||||
} else if(y <= sea) {
|
|
||||||
chunk.setBlock(x, y, z, seaPalette.get(sea - y, x + xOrig, z + zOrig));
|
|
||||||
paletteLevel = 0;
|
|
||||||
} else paletteLevel = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return chunk;
|
return c.getBiome().getGenerator().getPalette(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prepareBlockPart(BlockData down, BlockData orig, ChunkData chunk, Vector block, Map<Material, Palette<BlockData>> slabs,
|
private static void prepareBlockPart(BlockData down, BlockData orig, ChunkData chunk, Vector block, Map<Material, Palette<BlockData>> slabs,
|
||||||
Map<Material, Palette<BlockData>> stairs, double thresh, ChunkInterpolator interpolator) {
|
Map<Material, Palette<BlockData>> stairs, double thresh, ChunkInterpolator interpolator, ElevationInterpolator elevationInterpolator) {
|
||||||
if(interpolator.getNoise(block.getBlockX(), block.getBlockY() - 0.4, block.getBlockZ()) > thresh) {
|
double elevation = elevationInterpolator.getElevation(block.getBlockX(), block.getBlockZ());
|
||||||
|
if(interpolator.getNoise(block.getBlockX(), block.getBlockY() - 0.4 - elevation, block.getBlockZ()) > thresh) {
|
||||||
if(stairs != null) {
|
if(stairs != null) {
|
||||||
Palette<BlockData> stairPalette = stairs.get(down.getMaterial());
|
Palette<BlockData> stairPalette = stairs.get(down.getMaterial());
|
||||||
if(stairPalette != null) {
|
if(stairPalette != null) {
|
||||||
BlockData stair = stairPalette.get(0, block.getBlockX(), block.getBlockZ());
|
BlockData stair = stairPalette.get(0, block.getBlockX(), block.getBlockZ());
|
||||||
Stairs stairNew = (Stairs) stair.clone();
|
Stairs stairNew = (Stairs) stair.clone();
|
||||||
if(interpolator.getNoise(block.getBlockX() - 0.5, block.getBlockY(), block.getBlockZ()) > thresh) {
|
double elevationN = elevationInterpolator.getElevation(block.getBlockX(), block.getBlockZ() - 1); // Northern elevation
|
||||||
|
double elevationS = elevationInterpolator.getElevation(block.getBlockX(), block.getBlockZ() + 1); // Southern elevation
|
||||||
|
double elevationE = elevationInterpolator.getElevation(block.getBlockX() + 1, block.getBlockZ()); // Eastern elevation
|
||||||
|
double elevationW = elevationInterpolator.getElevation(block.getBlockX() - 1, block.getBlockZ()); // Western elevation
|
||||||
|
if(interpolator.getNoise(block.getBlockX() - 0.5, block.getBlockY() - elevationW, block.getBlockZ()) > thresh) {
|
||||||
stairNew.setFacing(BlockFace.WEST);
|
stairNew.setFacing(BlockFace.WEST);
|
||||||
} else if(interpolator.getNoise(block.getBlockX(), block.getBlockY(), block.getBlockZ() - 0.5) > thresh) {
|
} else if(interpolator.getNoise(block.getBlockX(), block.getBlockY() - elevationN, block.getBlockZ() - 0.5) > thresh) {
|
||||||
stairNew.setFacing(BlockFace.NORTH);
|
stairNew.setFacing(BlockFace.NORTH);
|
||||||
} else if(interpolator.getNoise(block.getBlockX(), block.getBlockY(), block.getBlockZ() + 0.5) > thresh) {
|
} else if(interpolator.getNoise(block.getBlockX(), block.getBlockY() - elevationS, block.getBlockZ() + 0.5) > thresh) {
|
||||||
stairNew.setFacing(BlockFace.SOUTH);
|
stairNew.setFacing(BlockFace.SOUTH);
|
||||||
} else if(interpolator.getNoise(block.getBlockX() + 0.5, block.getBlockY(), block.getBlockZ()) > thresh) {
|
} else if(interpolator.getNoise(block.getBlockX() + 0.5, block.getBlockY() - elevationE, block.getBlockZ()) > thresh) {
|
||||||
stairNew.setFacing(BlockFace.EAST);
|
stairNew.setFacing(BlockFace.EAST);
|
||||||
} else stairNew = null;
|
} else stairNew = null;
|
||||||
if(stairNew != null) {
|
if(stairNew != null) {
|
||||||
@@ -151,6 +137,58 @@ public class TerraChunkGenerator extends GaeaChunkGenerator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("try")
|
||||||
|
public ChunkData generateBase(@NotNull World world, @NotNull Random random, int chunkX, int chunkZ, ChunkInterpolator interpolator) {
|
||||||
|
if(needsLoad) load(world); // Load population data for world.
|
||||||
|
ChunkData chunk = createChunkData(world);
|
||||||
|
TerraWorld tw = TerraWorld.getWorld(world);
|
||||||
|
if(!tw.isSafe()) return chunk;
|
||||||
|
ConfigPack config = tw.getConfig();
|
||||||
|
int xOrig = (chunkX << 4);
|
||||||
|
int zOrig = (chunkZ << 4);
|
||||||
|
org.polydev.gaea.biome.BiomeGrid grid = getBiomeGrid(world);
|
||||||
|
|
||||||
|
ElevationInterpolator elevationInterpolator;
|
||||||
|
try(ProfileFuture ignore = TerraProfiler.fromWorld(world).measure("ElevationTime")) {
|
||||||
|
elevationInterpolator = new ElevationInterpolator(world, chunkX, chunkZ, tw.getGrid(), getNoiseGenerator());
|
||||||
|
}
|
||||||
|
|
||||||
|
for(byte x = 0; x < 16; x++) {
|
||||||
|
for(byte z = 0; z < 16; z++) {
|
||||||
|
int paletteLevel = 0;
|
||||||
|
|
||||||
|
int cx = xOrig + x;
|
||||||
|
int cz = zOrig + z;
|
||||||
|
|
||||||
|
Biome b = grid.getBiome(xOrig + x, zOrig + z, GenerationPhase.PALETTE_APPLY);
|
||||||
|
BiomeConfig c = config.getBiome((UserDefinedBiome) b);
|
||||||
|
|
||||||
|
double elevate = elevationInterpolator.getElevation(x, z);
|
||||||
|
|
||||||
|
BiomeSlabConfig slab = c.getSlabs();
|
||||||
|
int sea = c.getOcean().getSeaLevel();
|
||||||
|
Palette<BlockData> seaPalette = c.getOcean().getOcean();
|
||||||
|
for(int y = world.getMaxHeight() - 1; y >= 0; y--) {
|
||||||
|
if(interpolator.getNoise(x, y - elevate, z) > 0) {
|
||||||
|
BlockData data = getPalette(x, y, z, c, interpolator, elevationInterpolator).get(paletteLevel, cx, cz);
|
||||||
|
chunk.setBlock(x, y, z, data);
|
||||||
|
if(paletteLevel == 0 && slab != null && y < 255) {
|
||||||
|
prepareBlockPart(data, chunk.getBlockData(x, y + 1, z), chunk, new Vector(x, y + 1, z), slab.getSlabs(),
|
||||||
|
slab.getStairs(), slab.getSlabThreshold(), interpolator, elevationInterpolator);
|
||||||
|
}
|
||||||
|
paletteLevel++;
|
||||||
|
} else if(y <= sea) {
|
||||||
|
chunk.setBlock(x, y, z, seaPalette.get(sea - y, x + xOrig, z + zOrig));
|
||||||
|
paletteLevel = 0;
|
||||||
|
} else paletteLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void load(World w) {
|
private void load(World w) {
|
||||||
try {
|
try {
|
||||||
popMan.loadBlocks(w);
|
popMan.loadBlocks(w);
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
package com.dfsek.terra.generation;
|
package com.dfsek.terra.generation;
|
||||||
|
|
||||||
|
import com.dfsek.terra.Debug;
|
||||||
import com.dfsek.terra.math.NoiseFunction2;
|
import com.dfsek.terra.math.NoiseFunction2;
|
||||||
import com.dfsek.terra.math.NoiseFunction3;
|
import com.dfsek.terra.math.NoiseFunction3;
|
||||||
import com.dfsek.terra.util.DataUtil;
|
import com.dfsek.terra.util.DataUtil;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.polydev.gaea.biome.Generator;
|
import org.polydev.gaea.biome.Generator;
|
||||||
import org.polydev.gaea.math.FastNoiseLite;
|
import org.polydev.gaea.math.FastNoiseLite;
|
||||||
|
import org.polydev.gaea.math.Interpolator;
|
||||||
import org.polydev.gaea.world.palette.Palette;
|
import org.polydev.gaea.world.palette.Palette;
|
||||||
import parsii.eval.Expression;
|
import parsii.eval.Expression;
|
||||||
import parsii.eval.Parser;
|
import parsii.eval.Parser;
|
||||||
@@ -27,12 +30,16 @@ public class UserDefinedGenerator extends Generator {
|
|||||||
private final Variable zVar = s.getVariable("z");
|
private final Variable zVar = s.getVariable("z");
|
||||||
@SuppressWarnings({"unchecked", "rawtypes", "RedundantSuppression"})
|
@SuppressWarnings({"unchecked", "rawtypes", "RedundantSuppression"})
|
||||||
private final Palette<BlockData>[] palettes = new Palette[256];
|
private final Palette<BlockData>[] palettes = new Palette[256];
|
||||||
|
@SuppressWarnings({"unchecked", "rawtypes", "RedundantSuppression"})
|
||||||
|
private final Palette<BlockData>[] slantPalettes = new Palette[256];
|
||||||
private final NoiseFunction2 n2 = new NoiseFunction2();
|
private final NoiseFunction2 n2 = new NoiseFunction2();
|
||||||
private final NoiseFunction3 n3 = new NoiseFunction3();
|
private final NoiseFunction3 n3 = new NoiseFunction3();
|
||||||
|
private final ElevationEquation elevationEquation;
|
||||||
private final boolean preventSmooth;
|
private final boolean preventSmooth;
|
||||||
|
private boolean elevationInterpolation;
|
||||||
|
|
||||||
|
|
||||||
public UserDefinedGenerator(String equation, List<Variable> userVariables, Map<Integer, Palette<BlockData>> paletteMap, boolean preventSmooth)
|
public UserDefinedGenerator(String equation, @Nullable String elevateEquation, List<Variable> userVariables, Map<Integer, Palette<BlockData>> paletteMap, Map<Integer, Palette<BlockData>> slantPaletteMap, boolean preventSmooth)
|
||||||
throws ParseException {
|
throws ParseException {
|
||||||
Parser p = new Parser();
|
Parser p = new Parser();
|
||||||
p.registerFunction("noise2", n2);
|
p.registerFunction("noise2", n2);
|
||||||
@@ -46,7 +53,19 @@ public class UserDefinedGenerator extends Generator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
palettes[y] = d;
|
palettes[y] = d;
|
||||||
|
Palette<BlockData> slantPalette = null;
|
||||||
|
for(Map.Entry<Integer, Palette<BlockData>> e : slantPaletteMap.entrySet()) {
|
||||||
|
if(e.getKey() >= y) {
|
||||||
|
slantPalette = e.getValue();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
slantPalettes[y] = slantPalette;
|
||||||
}
|
}
|
||||||
|
if(elevateEquation != null) {
|
||||||
|
Debug.info("Using elevation equation");
|
||||||
|
this.elevationEquation = new ElevationEquation(elevateEquation);
|
||||||
|
} else this.elevationEquation = null;
|
||||||
this.noiseExp = p.parse(equation, s);
|
this.noiseExp = p.parse(equation, s);
|
||||||
this.preventSmooth = preventSmooth;
|
this.preventSmooth = preventSmooth;
|
||||||
}
|
}
|
||||||
@@ -102,8 +121,30 @@ public class UserDefinedGenerator extends Generator {
|
|||||||
return palettes[y];
|
return palettes[y];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Palette<BlockData> getSlantPalette(int y) {
|
||||||
|
return slantPalettes[y];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean useMinimalInterpolation() {
|
public boolean useMinimalInterpolation() {
|
||||||
return preventSmooth;
|
return preventSmooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Interpolator.Type getInterpolationType() {
|
||||||
|
return Interpolator.Type.LINEAR;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ElevationEquation getElevationEquation() {
|
||||||
|
return elevationEquation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean interpolateElevation() {
|
||||||
|
return elevationInterpolation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setElevationInterpolation(boolean elevationInterpolation) {
|
||||||
|
this.elevationInterpolation = elevationInterpolation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -49,30 +49,28 @@ public class StructurePopulator extends BlockPopulator {
|
|||||||
if(!struc.checkSpawns(spawn, rotation)) continue;
|
if(!struc.checkSpawns(spawn, rotation)) continue;
|
||||||
double horizontal = struc.getStructureInfo().getMaxHorizontal();
|
double horizontal = struc.getStructureInfo().getMaxHorizontal();
|
||||||
if(Math.abs((cx + 8) - spawn.getBlockX()) <= horizontal && Math.abs((cz + 8) - spawn.getBlockZ()) <= horizontal) {
|
if(Math.abs((cx + 8) - spawn.getBlockX()) <= horizontal && Math.abs((cz + 8) - spawn.getBlockZ()) <= horizontal) {
|
||||||
try(ProfileFuture ignore = TerraProfiler.fromWorld(world).measure("StructurePasteTime")) {
|
struc.paste(spawn, chunk, rotation);
|
||||||
struc.paste(spawn, chunk, rotation);
|
for(StructureContainedInventory i : struc.getInventories()) {
|
||||||
for(StructureContainedInventory i : struc.getInventories()) {
|
try {
|
||||||
try {
|
Debug.info("Attempting to populate loot: " + i.getUid());
|
||||||
Debug.info("Attempting to populate loot: " + i.getUid());
|
Vector2 lootCoords = RotationUtil.getRotatedCoords(new Vector2(i.getX() - struc.getStructureInfo().getCenterX(), i.getZ() - struc.getStructureInfo().getCenterZ()), rotation.inverse());
|
||||||
Vector2 lootCoords = RotationUtil.getRotatedCoords(new Vector2(i.getX() - struc.getStructureInfo().getCenterX(), i.getZ() - struc.getStructureInfo().getCenterZ()), rotation.inverse());
|
Location inv = spawn.clone().add(lootCoords.getX(), i.getY(), lootCoords.getZ());
|
||||||
Location inv = spawn.clone().add(lootCoords.getX(), i.getY(), lootCoords.getZ());
|
Debug.info(Math.floorDiv(inv.getBlockX(), 16) + ":" + chunk.getX() + ", " + Math.floorDiv(inv.getBlockZ(), 16) + ":" + chunk.getZ());
|
||||||
Debug.info(Math.floorDiv(inv.getBlockX(), 16) + ":" + chunk.getX() + ", " + Math.floorDiv(inv.getBlockZ(), 16) + ":" + chunk.getZ());
|
if(Math.floorDiv(inv.getBlockX(), 16) != chunk.getX() || Math.floorDiv(inv.getBlockZ(), 16) != chunk.getZ())
|
||||||
if(Math.floorDiv(inv.getBlockX(), 16) != chunk.getX() || Math.floorDiv(inv.getBlockZ(), 16) != chunk.getZ())
|
continue;
|
||||||
continue;
|
Debug.info("Target is in chunk.");
|
||||||
Debug.info("Target is in chunk.");
|
Debug.info(spawn.toString() + " became: " + inv.toString() + " (" + rotation + ", " + inv.getBlock().getType() + ")");
|
||||||
Debug.info(spawn.toString() + " became: " + inv.toString() + " (" + rotation + ", " + inv.getBlock().getType() + ")");
|
LootTable table = conf.getLoot(i.getUid());
|
||||||
LootTable table = conf.getLoot(i.getUid());
|
if(table == null) continue;
|
||||||
if(table == null) continue;
|
Debug.info("Target has table assigned.");
|
||||||
Debug.info("Target has table assigned.");
|
table.fillInventory(((BlockInventoryHolder) inv.getBlock().getState()).getInventory(), random);
|
||||||
table.fillInventory(((BlockInventoryHolder) inv.getBlock().getState()).getInventory(), random);
|
} catch(ClassCastException e) {
|
||||||
} catch(ClassCastException e) {
|
Debug.error("Could not populate structure loot!");
|
||||||
Debug.error("Could not populate structure loot!");
|
Debug.stack(e);
|
||||||
Debug.stack(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for(Feature f : conf.getFeatures()) f.apply(struc, spawn, chunk); // Apply features.
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
for(Feature f : conf.getFeatures()) f.apply(struc, spawn, chunk); // Apply features.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.dfsek.terra.util;
|
||||||
|
|
||||||
|
import com.dfsek.terra.Debug;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Tag;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public class TagUtil {
|
||||||
|
private static final Map<String, Set<Material>> tagMap;
|
||||||
|
|
||||||
|
static {
|
||||||
|
Debug.info("Loading tags...");
|
||||||
|
tagMap = new HashMap<>();
|
||||||
|
|
||||||
|
Field[] tags = Tag.class.getFields(); // Add Bukkit tags
|
||||||
|
for(Field field : tags) {
|
||||||
|
if(Modifier.isStatic(field.getModifiers())) {
|
||||||
|
try {
|
||||||
|
Tag<Material> tag = (Tag<Material>) field.get(new Object());
|
||||||
|
tagMap.put(tag.getKey().toString(), tag.getValues());
|
||||||
|
Debug.info("Loaded tag: #" + tag.getKey().toString());
|
||||||
|
} catch(IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch(ClassCastException ignore) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
putCustomSet("minecraft:base_stone_nether", Material.NETHERRACK, Material.BASALT, Material.BLACKSTONE);
|
||||||
|
putCustomSet("minecraft:base_stone_overworld", Material.STONE, Material.GRANITE, Material.DIORITE, Material.ANDESITE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Set<Material> getSet(Material... materials) {
|
||||||
|
return Stream.of(materials).collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void putCustomSet(String key, Material... materials) {
|
||||||
|
tagMap.put(key, getSet(materials));
|
||||||
|
Debug.info("Loaded tag: #" + key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static Set<Material> getTag(String tag) {
|
||||||
|
return Objects.requireNonNull(tagMap.get(tag));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ structures:
|
|||||||
- STRONGHOLD
|
- STRONGHOLD
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE: 30
|
CAVE: 40
|
||||||
RAVINE: 5
|
RAVINE: 5
|
||||||
CAVERN: 5
|
CAVERN: 5
|
||||||
ores:
|
ores:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ flora:
|
|||||||
max: 64
|
max: 64
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE_OCEAN: 35
|
CAVE_OCEAN: 45
|
||||||
|
|
||||||
structures:
|
structures:
|
||||||
- STRONGHOLD
|
- STRONGHOLD
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ noise-equation: "((-((y / 76)^2)) + 1) + ((noise2(x, z)+0.5) / 3) + abs(noise2(x
|
|||||||
id: "MOUNTAINS_PRETTY"
|
id: "MOUNTAINS_PRETTY"
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE: 30
|
CAVE: 40
|
||||||
RAVINE: 5
|
RAVINE: 5
|
||||||
CAVERN: 5
|
CAVERN: 5
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ noise-equation: "((-((y / 64)^2)) + 1) + ((noise2(x, z)+0.5) / 3) + abs(noise2(x
|
|||||||
id: "MOUNTAINS_PRETTY_0"
|
id: "MOUNTAINS_PRETTY_0"
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE: 30
|
CAVE: 40
|
||||||
RAVINE: 5
|
RAVINE: 5
|
||||||
CAVERN: 5
|
CAVERN: 5
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ noise-equation: "((-((y / 70)^2)) + 1) + ((noise2(x, z)+0.5) / 3) + abs(noise2(x
|
|||||||
id: "MOUNTAINS_PRETTY_1"
|
id: "MOUNTAINS_PRETTY_1"
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE: 30
|
CAVE: 40
|
||||||
RAVINE: 5
|
RAVINE: 5
|
||||||
CAVERN: 5
|
CAVERN: 5
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ flora:
|
|||||||
max: 64
|
max: 64
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE_OCEAN: 35
|
CAVE_OCEAN: 45
|
||||||
|
|
||||||
structures:
|
structures:
|
||||||
- STRONGHOLD
|
- STRONGHOLD
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ noise-equation: "((-((y / 63)^2)) + 1) + |(noise2(x, z) / 3) + 0.1|"
|
|||||||
id: "PLAINS_ABSTRACT"
|
id: "PLAINS_ABSTRACT"
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE: 30
|
CAVE: 40
|
||||||
RAVINE: 5
|
RAVINE: 5
|
||||||
CAVERN: 5
|
CAVERN: 5
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ flora:
|
|||||||
max: 64
|
max: 64
|
||||||
|
|
||||||
carving:
|
carving:
|
||||||
CAVE_OCEAN: 35
|
CAVE_OCEAN: 45
|
||||||
|
|
||||||
ores:
|
ores:
|
||||||
DIRT:
|
DIRT:
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
noise-equation: "((-((y / 63)^2)) + 1) + |(noise2(x/1.5, z/1.5)+0.25)|/2.5"
|
||||||
|
elevation:
|
||||||
|
equation: "min(floor(((max(noise2(x, z)+0.5, 0)))*8), 7)*6 + noise2(x*2,z*2)*12"
|
||||||
|
interpolation: true
|
||||||
|
extends: "BASIC_ORES"
|
||||||
|
id: "CRAG"
|
||||||
|
|
||||||
|
slant:
|
||||||
|
palette:
|
||||||
|
- "BLOCK:minecraft:bedrock": 0
|
||||||
|
- BEDROCK_MOST: 1
|
||||||
|
- BEDROCK_HALF: 2
|
||||||
|
- BEDROCK_LITTLE: 3
|
||||||
|
- "BLOCK:minecraft:stone": 255
|
||||||
|
y-offset:
|
||||||
|
top: 0.3
|
||||||
|
bottom: 0.25
|
||||||
|
|
||||||
|
palette:
|
||||||
|
- "BLOCK:minecraft:bedrock": 0
|
||||||
|
- BEDROCK_MOST: 1
|
||||||
|
- BEDROCK_HALF: 2
|
||||||
|
- BEDROCK_LITTLE: 3
|
||||||
|
- GRASSY: 255
|
||||||
|
vanilla: PLAINS
|
||||||
|
|
||||||
|
flora:
|
||||||
|
chance: 60
|
||||||
|
attempts: 2
|
||||||
|
simplex:
|
||||||
|
enable: true
|
||||||
|
frequency: 0.1
|
||||||
|
seed: 4
|
||||||
|
items:
|
||||||
|
SMALL_ROCK:
|
||||||
|
weight: 1
|
||||||
|
y:
|
||||||
|
min: 62
|
||||||
|
max: 180
|
||||||
|
TALL_GRASS:
|
||||||
|
weight: 1
|
||||||
|
y:
|
||||||
|
min: 62
|
||||||
|
max: 180
|
||||||
|
GRASS:
|
||||||
|
weight: 5
|
||||||
|
y:
|
||||||
|
min: 62
|
||||||
|
max: 180
|
||||||
|
LEAVES:
|
||||||
|
weight: 3
|
||||||
|
y:
|
||||||
|
min: 62
|
||||||
|
max: 180
|
||||||
|
slabs:
|
||||||
|
enable: true
|
||||||
|
threshold: 0.0075
|
||||||
|
palettes:
|
||||||
|
- "minecraft:stone": "MOUNTAIN_SLABS"
|
||||||
|
- "minecraft:gravel": "MOUNTAIN_SLABS"
|
||||||
|
use-stairs-if-available: true
|
||||||
|
stair-palettes:
|
||||||
|
- "minecraft:stone": "MOUNTAIN_STAIRS"
|
||||||
|
- "minecraft:gravel": "MOUNTAIN_STAIRS"
|
||||||
|
|
||||||
|
trees:
|
||||||
|
density: 7
|
||||||
|
items:
|
||||||
|
CACTUS:
|
||||||
|
weight: 1
|
||||||
|
y:
|
||||||
|
min: 58
|
||||||
|
max: 72
|
||||||
@@ -26,8 +26,7 @@ flora:
|
|||||||
erodible: true
|
erodible: true
|
||||||
|
|
||||||
trees:
|
trees:
|
||||||
chance: 100
|
density: 7
|
||||||
density: 1
|
|
||||||
items:
|
items:
|
||||||
CACTUS:
|
CACTUS:
|
||||||
weight: 1
|
weight: 1
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ trees:
|
|||||||
density: 400
|
density: 400
|
||||||
items:
|
items:
|
||||||
DARK_OAK:
|
DARK_OAK:
|
||||||
|
weight: 19
|
||||||
|
y:
|
||||||
|
min: 58
|
||||||
|
max: 84
|
||||||
|
RED_MUSHROOM:
|
||||||
weight: 1
|
weight: 1
|
||||||
y:
|
y:
|
||||||
min: 58
|
min: 58
|
||||||
|
|||||||
@@ -1,27 +1,62 @@
|
|||||||
noise-equation: "((-((y / 64)^2)) + 1) + min(floor(((max(noise2(x/1.5, z/1.5)+0.1, 0)) + 0.1)*5), 3)/2.5 + |(noise2(x, z)+0.1)/3|"
|
noise-equation: "((-((y / 63)^2)) + 1) + |(noise2(x/1.5, z/1.5)+0.25)|/2.5"
|
||||||
|
elevation:
|
||||||
|
equation: "min(floor(((max(noise2(x/1.5, z/1.5)+0.25, 0)))*5), 3)*9 + if(max(noise2(x/1.5, z/1.5)+0.05, 0), (noise2(x*2,z*2))*10, 0)"
|
||||||
|
interpolation: true
|
||||||
extends: "BASIC_ORES"
|
extends: "BASIC_ORES"
|
||||||
id: "MESA"
|
id: "MESA"
|
||||||
|
|
||||||
|
slant:
|
||||||
|
palette:
|
||||||
|
- "BLOCK:minecraft:bedrock": 0
|
||||||
|
- BEDROCK_MOST: 1
|
||||||
|
- BEDROCK_HALF: 2
|
||||||
|
- BEDROCK_LITTLE: 3
|
||||||
|
- "BLOCK:minecraft:terracotta": 255
|
||||||
|
- "BLOCK:minecraft:gray_terracotta": 124
|
||||||
|
- "BLOCK:minecraft:cyan_terracotta": 121
|
||||||
|
- "BLOCK:minecraft:white_terracotta": 120
|
||||||
|
- "BLOCK:minecraft:gray_terracotta": 119
|
||||||
|
- "BLOCK:minecraft:orange_terracotta": 117
|
||||||
|
- "BLOCK:minecraft:terracotta": 116
|
||||||
|
- "BLOCK:minecraft:orange_terracotta": 115
|
||||||
|
- "BLOCK:minecraft:terracotta": 111
|
||||||
|
- "BLOCK:minecraft:red_terracotta": 109
|
||||||
|
- "BLOCK:minecraft:terracotta": 108
|
||||||
|
- "BLOCK:minecraft:white_terracotta": 107
|
||||||
|
- "BLOCK:minecraft:red_terracotta": 106
|
||||||
|
- "BLOCK:minecraft:yellow_terracotta": 103
|
||||||
|
- "BLOCK:minecraft:terracotta": 102
|
||||||
|
- "BLOCK:minecraft:yellow_terracotta": 101
|
||||||
|
- "BLOCK:minecraft:terracotta": 98
|
||||||
|
- "BLOCK:minecraft:gray_terracotta": 95
|
||||||
|
- "BLOCK:minecraft:cyan_terracotta": 94
|
||||||
|
- "BLOCK:minecraft:white_terracotta": 93
|
||||||
|
- "BLOCK:minecraft:terracotta": 92
|
||||||
|
- "BLOCK:minecraft:orange_terracotta": 88
|
||||||
|
- "BLOCK:minecraft:terracotta": 87
|
||||||
|
- "BLOCK:minecraft:orange_terracotta": 86
|
||||||
|
- "BLOCK:minecraft:terracotta": 85
|
||||||
|
- "BLOCK:minecraft:red_terracotta": 82
|
||||||
|
- "BLOCK:minecraft:terracotta": 80
|
||||||
|
- "BLOCK:minecraft:orange_terracotta": 77
|
||||||
|
- "BLOCK:minecraft:yellow_terracotta": 76
|
||||||
|
- "BLOCK:minecraft:red_terracotta": 75
|
||||||
|
- "BLOCK:minecraft:terracotta": 73
|
||||||
|
- "BLOCK:minecraft:white_terracotta": 72
|
||||||
|
- "BLOCK:minecraft:terracotta": 71
|
||||||
|
- "BLOCK:minecraft:terracotta": 70
|
||||||
|
- "BLOCK:minecraft:orange_terracotta": 66
|
||||||
|
- "BLOCK:minecraft:terracotta": 65
|
||||||
|
y-offset:
|
||||||
|
top: 0.5
|
||||||
|
bottom: 0.25
|
||||||
|
|
||||||
palette:
|
palette:
|
||||||
- "BLOCK:minecraft:bedrock": 0
|
- "BLOCK:minecraft:bedrock": 0
|
||||||
- BEDROCK_MOST: 1
|
- BEDROCK_MOST: 1
|
||||||
- BEDROCK_HALF: 2
|
- BEDROCK_HALF: 2
|
||||||
- BEDROCK_LITTLE: 3
|
- BEDROCK_LITTLE: 3
|
||||||
- RED_DESERT: 255
|
- RED_DESERT: 255
|
||||||
- "BLOCK:minecraft:red_terracotta": 128
|
|
||||||
- "BLOCK:minecraft:orange_terracotta": 124
|
|
||||||
- "BLOCK:minecraft:terracotta": 120
|
|
||||||
- "BLOCK:minecraft:yellow_terracotta": 116
|
|
||||||
- "BLOCK:minecraft:red_terracotta": 112
|
|
||||||
- "BLOCK:minecraft:orange_terracotta": 108
|
|
||||||
- "BLOCK:minecraft:terracotta": 104
|
|
||||||
- "BLOCK:minecraft:red_terracotta": 100
|
|
||||||
- "BLOCK:minecraft:orange_terracotta": 96
|
|
||||||
- "BLOCK:minecraft:terracotta": 92
|
|
||||||
- "BLOCK:minecraft:yellow_terracotta": 88
|
|
||||||
- "BLOCK:minecraft:red_terracotta": 84
|
|
||||||
- "BLOCK:minecraft:orange_terracotta": 80
|
|
||||||
- RED_DESERT: 72
|
|
||||||
vanilla: BADLANDS
|
vanilla: BADLANDS
|
||||||
|
|
||||||
flora-chance: 2
|
flora-chance: 2
|
||||||
@@ -49,8 +84,7 @@ slabs:
|
|||||||
- "minecraft:red_sand": "BLOCK:minecraft:red_sandstone_stairs"
|
- "minecraft:red_sand": "BLOCK:minecraft:red_sandstone_stairs"
|
||||||
|
|
||||||
trees:
|
trees:
|
||||||
chance: 100
|
density: 7
|
||||||
density: 1
|
|
||||||
items:
|
items:
|
||||||
CACTUS:
|
CACTUS:
|
||||||
weight: 1
|
weight: 1
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
noise-equation: "((-((y / 64)^2)) + 1) + min(floor(((|noise2(x/2.5, z/2.5)|) + 0.1)*4), 3)/2.5 + |noise2(x/2.5, z/2.5)|"
|
noise-equation: "((-((y / 64)^2)) + 1) + |noise2(x/2.5, z/2.5)|"
|
||||||
|
elevation:
|
||||||
|
equation: "min(floor(((|noise2(x/2.5, z/2.5)|) + 0.1)*4)*4, 12)"
|
||||||
|
interpolation: true
|
||||||
|
|
||||||
id: "ARID_MOUNTAINS"
|
id: "ARID_MOUNTAINS"
|
||||||
extends: "BASIC_ORES"
|
extends: "BASIC_ORES"
|
||||||
@@ -13,6 +16,14 @@ palette:
|
|||||||
vanilla: SAVANNA
|
vanilla: SAVANNA
|
||||||
|
|
||||||
erodible: false
|
erodible: false
|
||||||
|
prevent-smooth: true
|
||||||
|
|
||||||
|
slant:
|
||||||
|
palette:
|
||||||
|
- ARID_SIDE: 255
|
||||||
|
y-offset:
|
||||||
|
top: 0.4
|
||||||
|
bottom: 0.25
|
||||||
|
|
||||||
flora:
|
flora:
|
||||||
chance: 40
|
chance: 40
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
noise-equation: "((-((y / 64)^2)) + 1) + min(floor(((|noise2(x/2.5, z/2.5)|) + 0.1)), 3)/5 + |noise2(x/2.5, z/2.5)|"
|
|
||||||
|
|
||||||
id: "ARID_MOUNTAINS_0"
|
|
||||||
extends: "BASIC_ORES"
|
|
||||||
|
|
||||||
|
|
||||||
palette:
|
|
||||||
- "BLOCK:minecraft:bedrock": 0
|
|
||||||
- BEDROCK_MOST: 1
|
|
||||||
- BEDROCK_HALF: 2
|
|
||||||
- BEDROCK_LITTLE: 3
|
|
||||||
- ARID: 255
|
|
||||||
vanilla: SAVANNA
|
|
||||||
|
|
||||||
erodible: false
|
|
||||||
|
|
||||||
flora:
|
|
||||||
chance: 40
|
|
||||||
attempts: 1
|
|
||||||
items:
|
|
||||||
TALL_GRASS:
|
|
||||||
weight: 15
|
|
||||||
y:
|
|
||||||
min: 62
|
|
||||||
max: 128
|
|
||||||
GRASS:
|
|
||||||
weight: 70
|
|
||||||
y:
|
|
||||||
min: 62
|
|
||||||
max: 128
|
|
||||||
|
|
||||||
trees:
|
|
||||||
density: 50
|
|
||||||
items:
|
|
||||||
ACACIA:
|
|
||||||
weight: 1
|
|
||||||
y:
|
|
||||||
min: 58
|
|
||||||
max: 128
|
|
||||||
slabs:
|
|
||||||
enable: true
|
|
||||||
threshold: 0.015
|
|
||||||
palettes:
|
|
||||||
- "minecraft:red_sand": "BLOCK:minecraft:red_sandstone_slab"
|
|
||||||
use-stairs-if-available: true
|
|
||||||
stair-palettes:
|
|
||||||
- "minecraft:red_sand": "BLOCK:minecraft:red_sandstone_stairs"
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
noise-equation: "((-((y / 64)^2)) + 1) + min(floor(((|noise2(x/2.5, z/2.5)|) + 0.1)*3), 3)/3 + |noise2(x/2.5, z/2.5)|"
|
|
||||||
|
|
||||||
id: "ARID_MOUNTAINS_1"
|
|
||||||
extends: "BASIC_ORES"
|
|
||||||
|
|
||||||
|
|
||||||
palette:
|
|
||||||
- "BLOCK:minecraft:bedrock": 0
|
|
||||||
- BEDROCK_MOST: 1
|
|
||||||
- BEDROCK_HALF: 2
|
|
||||||
- BEDROCK_LITTLE: 3
|
|
||||||
- ARID: 255
|
|
||||||
vanilla: SAVANNA
|
|
||||||
|
|
||||||
erodible: false
|
|
||||||
|
|
||||||
flora:
|
|
||||||
chance: 40
|
|
||||||
attempts: 1
|
|
||||||
items:
|
|
||||||
TALL_GRASS:
|
|
||||||
weight: 15
|
|
||||||
y:
|
|
||||||
min: 62
|
|
||||||
max: 128
|
|
||||||
GRASS:
|
|
||||||
weight: 70
|
|
||||||
y:
|
|
||||||
min: 62
|
|
||||||
max: 128
|
|
||||||
|
|
||||||
trees:
|
|
||||||
density: 50
|
|
||||||
items:
|
|
||||||
ACACIA:
|
|
||||||
weight: 1
|
|
||||||
y:
|
|
||||||
min: 58
|
|
||||||
max: 128
|
|
||||||
slabs:
|
|
||||||
enable: true
|
|
||||||
threshold: 0.015
|
|
||||||
palettes:
|
|
||||||
- "minecraft:red_sand": "BLOCK:minecraft:red_sandstone_slab"
|
|
||||||
use-stairs-if-available: true
|
|
||||||
stair-palettes:
|
|
||||||
- "minecraft:red_sand": "BLOCK:minecraft:red_sandstone_stairs"
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
noise-equation: "((-((y / 63)^2)) + 1) + ((noise2(x, z)+0.5) / 2)"
|
||||||
|
extends: "BASIC_ORES"
|
||||||
|
id: "MUSHROOM_ISLANDS"
|
||||||
|
|
||||||
|
palette:
|
||||||
|
- "BLOCK:minecraft:bedrock": 0
|
||||||
|
- BEDROCK_MOST: 1
|
||||||
|
- BEDROCK_HALF: 2
|
||||||
|
- BEDROCK_LITTLE: 3
|
||||||
|
- RIVER_BOTTOM: 61
|
||||||
|
- RIVER_SHORE: 62
|
||||||
|
- MYCELIUM: 255
|
||||||
|
vanilla: MUSHROOM_FIELDS
|
||||||
|
|
||||||
|
flora:
|
||||||
|
chance: 15
|
||||||
|
attempts: 1
|
||||||
|
items:
|
||||||
|
RED_MUSHROOM:
|
||||||
|
weight: 100
|
||||||
|
y:
|
||||||
|
min: 62
|
||||||
|
max: 84
|
||||||
|
BROWN_MUSHROOM:
|
||||||
|
weight: 100
|
||||||
|
y:
|
||||||
|
min: 62
|
||||||
|
max: 84
|
||||||
|
SMALL_ROCK:
|
||||||
|
weight: 10
|
||||||
|
y:
|
||||||
|
min: 62
|
||||||
|
max: 84
|
||||||
|
|
||||||
|
erodible: true
|
||||||
|
|
||||||
|
trees:
|
||||||
|
density: 250
|
||||||
|
items:
|
||||||
|
BROWN_MUSHROOM:
|
||||||
|
weight: 8
|
||||||
|
y:
|
||||||
|
min: 58
|
||||||
|
max: 84
|
||||||
|
RED_MUSHROOM:
|
||||||
|
weight: 2
|
||||||
|
y:
|
||||||
|
min: 58
|
||||||
|
max: 84
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
id: CAVE
|
id: CAVE
|
||||||
|
step: 2
|
||||||
length:
|
length:
|
||||||
min: 20
|
min: 40
|
||||||
max: 100
|
max: 80
|
||||||
start:
|
start:
|
||||||
x: 1
|
x: 1
|
||||||
y: 0.25
|
y: 0.25
|
||||||
@@ -11,7 +12,7 @@ start:
|
|||||||
x: 1
|
x: 1
|
||||||
y: 1
|
y: 1
|
||||||
z: 1
|
z: 1
|
||||||
min: 2
|
min: 3
|
||||||
max: 4
|
max: 4
|
||||||
height:
|
height:
|
||||||
min: 4
|
min: 4
|
||||||
@@ -20,9 +21,9 @@ cut:
|
|||||||
top: 0
|
top: 0
|
||||||
bottom: 1
|
bottom: 1
|
||||||
mutate:
|
mutate:
|
||||||
x: 2
|
x: 1
|
||||||
y: 6
|
y: 3
|
||||||
z: 2
|
z: 1
|
||||||
radius: 0.125
|
radius: 0.125
|
||||||
palette:
|
palette:
|
||||||
inner:
|
inner:
|
||||||
@@ -58,6 +59,7 @@ palette:
|
|||||||
y: 255
|
y: 255
|
||||||
shift:
|
shift:
|
||||||
"minecraft:grass_block": [ "minecraft:dirt" ]
|
"minecraft:grass_block": [ "minecraft:dirt" ]
|
||||||
|
"minecraft:mycelium": [ "minecraft:dirt" ]
|
||||||
"minecraft:podzol": [ "minecraft:dirt" ]
|
"minecraft:podzol": [ "minecraft:dirt" ]
|
||||||
"minecraft:gravel": [ "minecraft:dirt" ]
|
"minecraft:gravel": [ "minecraft:dirt" ]
|
||||||
"minecraft:sand": [ "minecraft:dirt" ]
|
"minecraft:sand": [ "minecraft:dirt" ]
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
id: "CAVE_OCEAN"
|
id: "CAVE_OCEAN"
|
||||||
|
step: 2
|
||||||
length:
|
length:
|
||||||
min: 20
|
min: 40
|
||||||
max: 100
|
max: 80
|
||||||
start:
|
start:
|
||||||
x: 1
|
x: 1
|
||||||
y: 0.25
|
y: 0.25
|
||||||
@@ -11,18 +12,18 @@ start:
|
|||||||
x: 1
|
x: 1
|
||||||
y: 1
|
y: 1
|
||||||
z: 1
|
z: 1
|
||||||
min: 2
|
min: 3
|
||||||
max: 4
|
max: 4
|
||||||
height:
|
height:
|
||||||
min: 4
|
min: 4
|
||||||
max: 72
|
max: 72
|
||||||
cut:
|
cut:
|
||||||
top: 0
|
top: 0
|
||||||
bottom: 0
|
bottom: 1
|
||||||
mutate:
|
mutate:
|
||||||
x: 2
|
x: 1
|
||||||
y: 6
|
y: 3
|
||||||
z: 2
|
z: 1
|
||||||
radius: 0.125
|
radius: 0.125
|
||||||
palette:
|
palette:
|
||||||
inner:
|
inner:
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
id: "CAVE_SWAMP"
|
id: "CAVE_SWAMP"
|
||||||
|
step: 2
|
||||||
length:
|
length:
|
||||||
min: 20
|
min: 40
|
||||||
max: 100
|
max: 80
|
||||||
start:
|
start:
|
||||||
x: 1
|
x: 1
|
||||||
y: 0.25
|
y: 0.25
|
||||||
@@ -11,18 +12,18 @@ start:
|
|||||||
x: 1
|
x: 1
|
||||||
y: 1
|
y: 1
|
||||||
z: 1
|
z: 1
|
||||||
min: 2
|
min: 3
|
||||||
max: 4
|
max: 4
|
||||||
height:
|
height:
|
||||||
min: 4
|
min: 4
|
||||||
max: 72
|
max: 72
|
||||||
cut:
|
cut:
|
||||||
top: 0
|
top: 0
|
||||||
bottom: 0
|
bottom: 1
|
||||||
mutate:
|
mutate:
|
||||||
x: 2
|
x: 1
|
||||||
y: 6
|
y: 3
|
||||||
z: 2
|
z: 1
|
||||||
radius: 0.125
|
radius: 0.125
|
||||||
palette:
|
palette:
|
||||||
inner:
|
inner:
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
id: "CAVE_TUNDRA"
|
id: "CAVE_TUNDRA"
|
||||||
|
step: 2
|
||||||
length:
|
length:
|
||||||
min: 20
|
min: 40
|
||||||
max: 100
|
max: 80
|
||||||
start:
|
start:
|
||||||
x: 1
|
x: 1
|
||||||
y: 0.25
|
y: 0.25
|
||||||
@@ -11,18 +12,18 @@ start:
|
|||||||
x: 1
|
x: 1
|
||||||
y: 1
|
y: 1
|
||||||
z: 1
|
z: 1
|
||||||
min: 2
|
min: 3
|
||||||
max: 4
|
max: 4
|
||||||
height:
|
height:
|
||||||
min: 4
|
min: 4
|
||||||
max: 72
|
max: 72
|
||||||
cut:
|
cut:
|
||||||
top: 0
|
top: 0
|
||||||
bottom: 0
|
bottom: 1
|
||||||
mutate:
|
mutate:
|
||||||
x: 2
|
x: 1
|
||||||
y: 6
|
y: 3
|
||||||
z: 2
|
z: 1
|
||||||
radius: 0.125
|
radius: 0.125
|
||||||
palette:
|
palette:
|
||||||
inner:
|
inner:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ start:
|
|||||||
radius:
|
radius:
|
||||||
multiply:
|
multiply:
|
||||||
x: 1
|
x: 1
|
||||||
y: 4
|
y: 6
|
||||||
z: 1
|
z: 1
|
||||||
min: 3
|
min: 3
|
||||||
max: 4
|
max: 4
|
||||||
@@ -17,11 +17,11 @@ start:
|
|||||||
min: 12
|
min: 12
|
||||||
max: 56
|
max: 56
|
||||||
cut:
|
cut:
|
||||||
top: 1
|
top: 6
|
||||||
bottom: 2
|
bottom: 4
|
||||||
mutate:
|
mutate:
|
||||||
x: 1
|
x: 1
|
||||||
y: 4
|
y: 2
|
||||||
z: 1
|
z: 1
|
||||||
radius: 0.125
|
radius: 0.125
|
||||||
palette:
|
palette:
|
||||||
|
|||||||
@@ -11,5 +11,6 @@ spawnable:
|
|||||||
- "minecraft:gravel"
|
- "minecraft:gravel"
|
||||||
- "minecraft:dirt"
|
- "minecraft:dirt"
|
||||||
- "minecraft:coarse_dirt"
|
- "minecraft:coarse_dirt"
|
||||||
|
- "minecraft:mycelium"
|
||||||
replaceable:
|
replaceable:
|
||||||
- "minecraft:air"
|
- "minecraft:air"
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
grid:
|
grid:
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0", "ARID_MOUNTAINS_0" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0" ]
|
||||||
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0" ]
|
- [ "MOUNTAINS_STONE_0", "MOUNTAINS_STONE_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0", "MOUNTAINS_JUNGLE_0" ]
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
grid:
|
grid:
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "MESA", "MESA", "MESA" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "MESA", "MESA", "MESA" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1", "ARID_MOUNTAINS_1" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS", "ARID_MOUNTAINS" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_0" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1" ]
|
||||||
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1" ]
|
- [ "MOUNTAINS_STONE_1", "MOUNTAINS_STONE_1", "MOUNTAINS_PRETTY_0", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_PRETTY_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1", "MOUNTAINS_JUNGLE_1" ]
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
grid:
|
grid:
|
||||||
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_SHELF", "WARM_OCEAN", "MUSHROOM_ISLANDS", "MUSHROOM_ISLANDS" ]
|
||||||
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_SHELF", "WARM_OCEAN", "MUSHROOM_ISLANDS" ]
|
||||||
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_SHELF", "WARM_OCEAN" ]
|
||||||
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_SHELF" ]
|
||||||
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
||||||
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
||||||
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
- [ "FROZEN_OCEAN_DEEP", "COLD_OCEAN_DEEP", "COLD_OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "OCEAN_DEEP", "LUKEWARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP", "WARM_OCEAN_DEEP" ]
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.1
|
deform-frequency: 0.1
|
||||||
id: "ANDESITE"
|
id: "ANDESITE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.1
|
deform-frequency: 0.1
|
||||||
id: "DIORITE"
|
id: "DIORITE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.1
|
deform-frequency: 0.1
|
||||||
id: "DIRT"
|
id: "DIRT"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.1
|
deform-frequency: 0.1
|
||||||
id: "GRANITE"
|
id: "GRANITE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.1
|
deform-frequency: 0.1
|
||||||
id: "GRAVEL"
|
id: "GRAVEL"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.2
|
deform-frequency: 0.2
|
||||||
id: "COAL_ORE"
|
id: "COAL_ORE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.2
|
deform-frequency: 0.2
|
||||||
id: "DIAMOND_ORE"
|
id: "DIAMOND_ORE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.2
|
deform-frequency: 0.2
|
||||||
id: "GOLD_ORE"
|
id: "GOLD_ORE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.2
|
deform-frequency: 0.2
|
||||||
id: "IRON_ORE"
|
id: "IRON_ORE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.2
|
deform-frequency: 0.2
|
||||||
id: "LAPIS_ORE"
|
id: "LAPIS_ORE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -6,4 +6,4 @@ deform: 0.75
|
|||||||
deform-frequency: 0.2
|
deform-frequency: 0.2
|
||||||
id: "REDSTONE_ORE"
|
id: "REDSTONE_ORE"
|
||||||
replace:
|
replace:
|
||||||
- "minecraft:stone"
|
- "#minecraft:base_stone_overworld"
|
||||||
@@ -43,8 +43,8 @@ frequencies:
|
|||||||
zone: 2048
|
zone: 2048
|
||||||
blend:
|
blend:
|
||||||
enable: true
|
enable: true
|
||||||
frequency: 0.125
|
frequency: 0.12
|
||||||
amplitude: 10
|
amplitude: 5
|
||||||
erode:
|
erode:
|
||||||
enable: true
|
enable: true
|
||||||
frequency: 0.001
|
frequency: 0.001
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
layers:
|
||||||
|
- materials:
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_path": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_path": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:grass_block": 1
|
||||||
|
- "minecraft:white_terracotta": 2
|
||||||
|
layers: 1
|
||||||
|
- materials:
|
||||||
|
- "minecraft:dirt": 7
|
||||||
|
- "minecraft:white_terracotta": 1
|
||||||
|
layers: 1
|
||||||
|
id: "ARID_SIDE"
|
||||||
|
simplex: true
|
||||||
|
frequency: 0.05
|
||||||
|
seed: 3
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
layers:
|
||||||
|
- materials:
|
||||||
|
- "minecraft:mycelium": 1
|
||||||
|
layers: 1
|
||||||
|
- materials:
|
||||||
|
- "minecraft:dirt": 1
|
||||||
|
layers: 2
|
||||||
|
- materials:
|
||||||
|
- "minecraft:stone": 1
|
||||||
|
layers: 1
|
||||||
|
id: "MYCELIUM"
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
name: "Terra"
|
name: "Terra"
|
||||||
depend: [ "Gaea" ]
|
depend: [ "Gaea" ]
|
||||||
main: "com.dfsek.terra.Terra"
|
main: "com.dfsek.terra.Terra"
|
||||||
version: "1.2.0-BETA"
|
version: "1.2.1-BETA"
|
||||||
load: "STARTUP"
|
load: "STARTUP"
|
||||||
api-version: "1.16"
|
api-version: "1.16"
|
||||||
|
description: "An insanely powerful free & open-source data-driven world generator."
|
||||||
softdepend: [ "WorldEdit" ]
|
softdepend: [ "WorldEdit" ]
|
||||||
commands:
|
commands:
|
||||||
terra:
|
terra:
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.polydev.gaea.math.FastNoiseLite;
|
||||||
|
|
||||||
|
public class NoiseInstancePerformanceTest {
|
||||||
|
@Test
|
||||||
|
public void performance() {
|
||||||
|
FastNoiseLite noiseLite = new FastNoiseLite(2403);
|
||||||
|
long l = System.nanoTime();
|
||||||
|
for(int i = 0; i < 10000000; i++) noiseLite.getNoise(i, i);
|
||||||
|
System.out.println("No instantiation: " + (System.nanoTime() - l) / 1000000 + "ms");
|
||||||
|
for(int i = 0; i < 10000000; i++) {
|
||||||
|
FastNoiseLite noiseLite1 = new FastNoiseLite(2403);
|
||||||
|
noiseLite1.getNoise(i, i);
|
||||||
|
}
|
||||||
|
System.out.println("Instantiation: " + (System.nanoTime() - l) / 1000000 + "ms");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user