mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Iris WC use dimension heights
This commit is contained in:
parent
b108a0164a
commit
bfd7a02c9d
@ -33,8 +33,6 @@ public class IrisWorldCreator {
|
|||||||
private boolean studio = false;
|
private boolean studio = false;
|
||||||
private String dimensionName = null;
|
private String dimensionName = null;
|
||||||
private long seed = 1337;
|
private long seed = 1337;
|
||||||
private int maxHeight = 320;
|
|
||||||
private int minHeight = -64;
|
|
||||||
|
|
||||||
public IrisWorldCreator() {
|
public IrisWorldCreator() {
|
||||||
|
|
||||||
@ -45,12 +43,6 @@ public class IrisWorldCreator {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IrisWorldCreator height(int minHeight, int maxHeight) {
|
|
||||||
this.maxHeight = maxHeight;
|
|
||||||
this.minHeight = minHeight;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IrisWorldCreator name(String name) {
|
public IrisWorldCreator name(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
return this;
|
return this;
|
||||||
@ -72,16 +64,18 @@ public class IrisWorldCreator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public WorldCreator create() {
|
public WorldCreator create() {
|
||||||
|
IrisDimension dim = IrisData.loadAnyDimension(dimensionName);
|
||||||
|
|
||||||
IrisWorld w = IrisWorld.builder()
|
IrisWorld w = IrisWorld.builder()
|
||||||
.name(name)
|
.name(name)
|
||||||
.minHeight(minHeight)
|
.minHeight(dim.getMinHeight())
|
||||||
.maxHeight(maxHeight)
|
.maxHeight(dim.getMaxHeight())
|
||||||
.seed(seed)
|
.seed(seed)
|
||||||
.worldFolder(new File(name))
|
.worldFolder(new File(name))
|
||||||
.environment(findEnvironment())
|
.environment(findEnvironment())
|
||||||
.build();
|
.build();
|
||||||
ChunkGenerator g = new BukkitChunkGenerator(w, studio, studio
|
ChunkGenerator g = new BukkitChunkGenerator(w, studio, studio
|
||||||
? IrisData.loadAnyDimension(dimensionName).getLoader().getDataFolder() :
|
? dim.getLoader().getDataFolder() :
|
||||||
new File(w.worldFolder(), "iris/pack"), dimensionName);
|
new File(w.worldFolder(), "iris/pack"), dimensionName);
|
||||||
|
|
||||||
return new WorldCreator(name)
|
return new WorldCreator(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user