PaperMC/patches/server-remapped/Fix-enderdragon-exp-dupe.patch
MiniDigger | Martin 95d25d98e8 Move patches around
2021-06-11 14:02:28 +02:00

28 lines
1.3 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/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -0,0 +0,0 @@ public class EnderDragon extends Mob implements Enemy {
public void addAdditionalSaveData(CompoundTag tag) {
super.addAdditionalSaveData(tag);
tag.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId());
+ tag.putInt("Paper.DeathTick", this.dragonDeathTime); // Paper
}
@Override
@@ -0,0 +0,0 @@ public class EnderDragon extends Mob implements Enemy {
if (tag.contains("DragonPhase")) {
this.phaseManager.setPhase(EnderDragonPhase.getById(tag.getInt("DragonPhase")));
}
+ this.dragonDeathTime = tag.getInt("Paper.DeathTick"); // Paper
}