2020-06-26 01:58:00 +00:00
|
|
|
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
|
2020-11-03 02:22:15 +00:00
|
|
|
index 144ad80520487749a212c0b2c030386af53af14e..de53af8c01f8fa9636386737b6bc071b32f87cd1 100644
|
2020-06-26 01:58:00 +00:00
|
|
|
--- 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);
|
2020-08-25 02:22:08 +00:00
|
|
|
nbttagcompound.setInt("DragonPhase", this.bG.a().getControllerPhase().b());
|
2020-06-26 01:58:00 +00:00
|
|
|
+ nbttagcompound.setInt("Paper.DeathTick", this.deathAnimationTicks); // Paper
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@@ -838,6 +839,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
|
|
|
if (nbttagcompound.hasKey("DragonPhase")) {
|
2020-08-25 02:22:08 +00:00
|
|
|
this.bG.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase")));
|
2020-06-26 01:58:00 +00:00
|
|
|
}
|
|
|
|
+ this.deathAnimationTicks = nbttagcompound.getInt("Paper.DeathTick"); // Paper
|
|
|
|
|
|
|
|
}
|
|
|
|
|