aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch')
-rw-r--r--Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch
new file mode 100644
index 0000000000..654d69e3c6
--- /dev/null
+++ b/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Spottedleaf <[email protected]>
+Date: Fri, 12 Jun 2020 22:25:11 -0700
+Subject: [PATCH] Fix enderdragon exp dupe
+
+Properly track death stage when unloading/loading in the
+dragon
+
+diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
+index 73e9859e675902d9fc5942547966b52426a496a2..63a759cc18b5b765bc9d34f71dd775fd35dee280 100644
+--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
++++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
+@@ -830,6 +830,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
+ public void saveData(NBTTagCompound nbttagcompound) {
+ super.saveData(nbttagcompound);
+ nbttagcompound.setInt("DragonPhase", this.bN.a().getControllerPhase().b());
++ nbttagcompound.setInt("Paper.DeathTick", this.deathAnimationTicks); // Paper
+ }
+
+ @Override
+@@ -838,6 +839,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
+ if (nbttagcompound.hasKey("DragonPhase")) {
+ this.bN.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase")));
+ }
++ this.deathAnimationTicks = nbttagcompound.getInt("Paper.DeathTick"); // Paper
+
+ }
+