13
0
geforkt von Mirrors/Paper

Updated Upstream (CraftBukkit) (#4663)

Dieser Commit ist enthalten in:
Mariell 2020-10-17 22:42:18 +02:00
Ursprung f2a3a8db27
Commit 2d4ed8726c
4 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -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
}

Datei anzeigen

@ -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
+ };

Datei anzeigen

@ -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;

@ -1 +1 @@
Subproject commit 4ef13f94d6a4042e0dadd622666a50cee7468d26
Subproject commit b8dd5ec216c567d97f3b3d3e23c9b493b61ce962