Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -1,7 +1,7 @@
--- a/net/minecraft/server/IChunkLoader.java
+++ b/net/minecraft/server/IChunkLoader.java
@@ -17,15 +17,56 @@
this.b = datafixer;
@@ -18,15 +18,54 @@
this.a = new IOWorker(new RegionFileCache(file), "chunk");
}
- public NBTTagCompound getChunkData(DimensionManager dimensionmanager, Supplier<WorldPersistentData> supplier, NBTTagCompound nbttagcompound) {
@@ -15,18 +15,16 @@
+ }
+ }
+
+ if (this.chunkExists(pos)) {
+ NBTTagCompound nbt = read(pos);
+ if (nbt != null) {
+ NBTTagCompound level = nbt.getCompound("Level");
+ if (level.getBoolean("TerrainPopulated")) {
+ return true;
+ }
+ NBTTagCompound nbt = read(pos);
+ if (nbt != null) {
+ NBTTagCompound level = nbt.getCompound("Level");
+ if (level.getBoolean("TerrainPopulated")) {
+ return true;
+ }
+
+ ChunkStatus status = ChunkStatus.a(level.getString("Status"));
+ if (status != null && status.b(ChunkStatus.FEATURES)) {
+ return true;
+ }
+ ChunkStatus status = ChunkStatus.a(level.getString("Status"));
+ if (status != null && status.b(ChunkStatus.FEATURES)) {
+ return true;
+ }
+ }
+
@@ -53,9 +51,9 @@
if (i < 1493) {
nbttagcompound = GameProfileSerializer.a(this.b, DataFixTypes.CHUNK, nbttagcompound, i, 1493);
if (nbttagcompound.getCompound("Level").getBoolean("hasLegacyStructureData")) {
if (this.a == null) {
- this.a = PersistentStructureLegacy.a(dimensionmanager, (WorldPersistentData) supplier.get());
+ this.a = PersistentStructureLegacy.a(dimensionmanager.getType(), (WorldPersistentData) supplier.get()); // CraftBukkit - getType
if (this.c == null) {
- this.c = PersistentStructureLegacy.a(dimensionmanager, (WorldPersistentData) supplier.get());
+ this.c = PersistentStructureLegacy.a(dimensionmanager.getType(), (WorldPersistentData) supplier.get()); // CraftBukkit - getType
}
nbttagcompound = this.a.a(nbttagcompound);
nbttagcompound = this.c.a(nbttagcompound);