mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 20:19:06 +00:00
switch from world preset to direct level stems
This commit is contained in:
committed by
Julian Krings
parent
a911685aaf
commit
686ae57b5b
@@ -516,7 +516,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
|
||||
Iris.info(C.LIGHT_PURPLE + "Preparing Spawn for " + s + "' using Iris:" + generator + "...");
|
||||
WorldCreator c = new WorldCreator(s)
|
||||
.type(IrisWorldCreator.IRIS)
|
||||
.generator(getDefaultWorldGenerator(s, generator))
|
||||
.environment(IrisData.loadAnyDimension(generator).getEnvironment());
|
||||
INMS.get().createWorld(c);
|
||||
|
||||
@@ -20,46 +20,6 @@ public interface IDataFixer {
|
||||
return obj;
|
||||
}
|
||||
|
||||
default JSONObject createPreset() {
|
||||
return new JSONObject("""
|
||||
{
|
||||
"dimensions": {
|
||||
"minecraft:overworld": {
|
||||
"type": "iris:overworld",
|
||||
"generator": {
|
||||
"type": "minecraft:noise",
|
||||
"biome_source": {
|
||||
"type": "minecraft:multi_noise",
|
||||
"preset": "minecraft:overworld"
|
||||
},
|
||||
"settings": "minecraft:overworld"
|
||||
}
|
||||
},
|
||||
"minecraft:the_end": {
|
||||
"type": "iris:the_end",
|
||||
"generator": {
|
||||
"type": "minecraft:noise",
|
||||
"biome_source": {
|
||||
"type": "minecraft:the_end"
|
||||
},
|
||||
"settings": "minecraft:end"
|
||||
}
|
||||
},
|
||||
"minecraft:the_nether": {
|
||||
"type": "iris:the_nether",
|
||||
"generator": {
|
||||
"type": "minecraft:noise",
|
||||
"biome_source": {
|
||||
"type": "minecraft:multi_noise",
|
||||
"preset": "minecraft:nether"
|
||||
},
|
||||
"settings": "minecraft:nether"
|
||||
}
|
||||
}
|
||||
}
|
||||
}""");
|
||||
}
|
||||
|
||||
enum Dimension {
|
||||
OVERRWORLD,
|
||||
NETHER,
|
||||
|
||||
@@ -32,8 +32,6 @@ import sun.misc.Unsafe;
|
||||
import java.io.File;
|
||||
|
||||
public class IrisWorldCreator {
|
||||
public static final WorldType IRIS;
|
||||
|
||||
private String name;
|
||||
private boolean studio = false;
|
||||
private String dimensionName = null;
|
||||
@@ -85,7 +83,6 @@ public class IrisWorldCreator {
|
||||
|
||||
|
||||
return new WorldCreator(name)
|
||||
.type(IRIS)
|
||||
.environment(findEnvironment())
|
||||
.generateStructures(true)
|
||||
.generator(g).seed(seed);
|
||||
@@ -104,17 +101,4 @@ public class IrisWorldCreator {
|
||||
this.studio = studio;
|
||||
return this;
|
||||
}
|
||||
|
||||
static {
|
||||
try {
|
||||
var unsafe = new WrappedField<Unsafe, Unsafe>(Unsafe.class, "theUnsafe").get();
|
||||
var iris = (WorldType) unsafe.allocateInstance(WorldType.class);
|
||||
unsafe.putIntVolatile(iris, unsafe.objectFieldOffset(Enum.class.getDeclaredField("ordinal")), 0);
|
||||
unsafe.putObjectVolatile(iris, unsafe.objectFieldOffset(Enum.class.getDeclaredField("name")), "IRIS");
|
||||
|
||||
IRIS = iris;
|
||||
} catch (Throwable e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user