From 2d4ed8726cec9b96d623c5414115a3860c77fa75 Mon Sep 17 00:00:00 2001 From: Mariell Date: Sat, 17 Oct 2020 22:42:18 +0200 Subject: [PATCH] Updated Upstream (CraftBukkit) (#4663) --- .../API-to-get-a-BlockState-without-a-snapshot.patch | 4 ++-- .../Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch | 12 ++++++------ ...erence-to-current-Chunk-for-Entity-and-Bloc.patch | 4 ++-- work/CraftBukkit | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch index 7ff7a9abf4..96e8d48ac2 100644 --- a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch @@ -31,8 +31,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); + this.persistentDataContainer.clear(); // Paper - clear instead of reinit - NBTTagCompound persistentDataTag = nbttagcompound.getCompound("PublicBukkitValues"); - if (persistentDataTag != null) { + NBTBase persistentDataTag = nbttagcompound.get("PublicBukkitValues"); + if (persistentDataTag instanceof NBTTagCompound) { @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { // Paper } diff --git a/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch index a2f5cd9bf5..b6f773db40 100644 --- a/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch +++ b/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch @@ -26,9 +26,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - object = new Chunk(worldserver.getMinecraftWorld(), chunkcoordintpair, biomestorage, chunkconverter, (TickList) object1, (TickList) object2, j, achunksection, (chunk) -> { - loadEntities(nbttagcompound1, chunk); - // CraftBukkit start - load chunk persistent data from nbt -- NBTTagCompound persistentBase = nbttagcompound1.getCompound("BukkitValues"); -- if (persistentBase != null) { -- chunk.persistentDataContainer.putAll(nbttagcompound1); +- NBTBase persistentBase = nbttagcompound1.get("ChunkBukkitValues"); +- if (persistentBase instanceof NBTTagCompound) { +- chunk.persistentDataContainer.putAll((NBTTagCompound) persistentBase); - } - // CraftBukkit end - }); @@ -78,9 +78,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return (chunk) -> { + loadEntities(nbt, chunk); + // CraftBukkit start - load chunk persistent data from nbt -+ NBTBase persistentBase = nbt.get("BukkitValues"); // Paper - use NBTBase & #get -+ if (persistentBase instanceof NBTTagCompound) { // Paper - instanceof to check nullability & type; previous was if(true) -+ chunk.persistentDataContainer.putAll((NBTTagCompound) persistentBase); // Paper ++ NBTBase persistentBase = nbt.get("ChunkBukkitValues"); ++ if (persistentBase instanceof NBTTagCompound) { ++ chunk.persistentDataContainer.putAll((NBTTagCompound) persistentBase); + } + // CraftBukkit end + }; diff --git a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index 88fb2ce9dd..3356231462 100644 --- a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -140,9 +140,9 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -0,0 +0,0 @@ import net.minecraft.server.EntityZombieHusk; - import net.minecraft.server.EntityZombieVillager; +@@ -0,0 +0,0 @@ import net.minecraft.server.EntityZombieVillager; import net.minecraft.server.IChatBaseComponent; + import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; +import org.bukkit.Chunk; // Paper import org.bukkit.EntityEffect; diff --git a/work/CraftBukkit b/work/CraftBukkit index 4ef13f94d6..b8dd5ec216 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 4ef13f94d6a4042e0dadd622666a50cee7468d26 +Subproject commit b8dd5ec216c567d97f3b3d3e23c9b493b61ce962