2020-06-20 21:04:50 +02: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
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
2020-06-20 21:04:50 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2021-03-16 08:19:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
2020-06-20 21:04:50 +02:00
|
|
|
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
2020-06-26 03:58:00 +02:00
|
|
|
public void saveData(NBTTagCompound nbttagcompound) {
|
|
|
|
super.saveData(nbttagcompound);
|
2020-08-25 04:22:08 +02:00
|
|
|
nbttagcompound.setInt("DragonPhase", this.bG.a().getControllerPhase().b());
|
2020-06-26 03:58:00 +02:00
|
|
|
+ nbttagcompound.setInt("Paper.DeathTick", this.deathAnimationTicks); // Paper
|
2020-06-20 21:04:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
|
|
|
if (nbttagcompound.hasKey("DragonPhase")) {
|
2020-08-25 04:22:08 +02:00
|
|
|
this.bG.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase")));
|
2020-06-20 21:04:50 +02:00
|
|
|
}
|
2020-06-26 03:58:00 +02:00
|
|
|
+ this.deathAnimationTicks = nbttagcompound.getInt("Paper.DeathTick"); // Paper
|
2020-06-20 21:04:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|