mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-18 14:19:58 +00:00
e
This commit is contained in:
@@ -41,6 +41,7 @@ public class Chunk {
|
|||||||
private int lastMCAUpdate;
|
private int lastMCAUpdate;
|
||||||
private CompoundTag data;
|
private CompoundTag data;
|
||||||
private int dataVersion;
|
private int dataVersion;
|
||||||
|
private int nativeIrisVersion;
|
||||||
private long lastUpdate;
|
private long lastUpdate;
|
||||||
private long inhabitedTime;
|
private long inhabitedTime;
|
||||||
private MCABiomeContainer biomes;
|
private MCABiomeContainer biomes;
|
||||||
@@ -83,6 +84,11 @@ public class Chunk {
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void injectIrisData(Chunk c) {
|
||||||
|
World mainWorld = getServer().getWorlds().get(0);
|
||||||
|
c.data.put("Iris", nativeIrisVersion());
|
||||||
|
}
|
||||||
|
|
||||||
private static CompoundTag defaultLevel() {
|
private static CompoundTag defaultLevel() {
|
||||||
CompoundTag level = new CompoundTag();
|
CompoundTag level = new CompoundTag();
|
||||||
level.putString("Status", "full");
|
level.putString("Status", "full");
|
||||||
@@ -90,14 +96,19 @@ public class Chunk {
|
|||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static CompoundTag nativeIrisVersion() {
|
||||||
|
CompoundTag level = new CompoundTag();
|
||||||
|
level.putString("Generator", "Iris " + Iris.instance.getDescription().getVersion());
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
private void initReferences(long loadFlags) {
|
private void initReferences(long loadFlags) {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
throw new NullPointerException("data cannot be null");
|
throw new NullPointerException("data cannot be null");
|
||||||
}
|
}
|
||||||
CompoundTag level;
|
|
||||||
if ((level = data.getCompoundTag("Level")) == null) {
|
CompoundTag level = data;
|
||||||
throw new IllegalArgumentException("data does not contain \"Level\" tag");
|
|
||||||
}
|
|
||||||
World mainWorld = getServer().getWorlds().get(0);
|
World mainWorld = getServer().getWorlds().get(0);
|
||||||
dataVersion = data.getInt("DataVersion");
|
dataVersion = data.getInt("DataVersion");
|
||||||
inhabitedTime = level.getLong("InhabitedTime");
|
inhabitedTime = level.getLong("InhabitedTime");
|
||||||
|
|||||||
Reference in New Issue
Block a user