28 lines
1.4 KiB
Diff
28 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
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 43e3755f0fa75b5f72ec620f3f6647ef6bce38c5..3a37e481729abc890cb2f9884b8501f630c3cf32 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
|
|
|
|
}
|
|
|