geforkt von Mirrors/Paper
29 Zeilen
1.3 KiB
Diff
29 Zeilen
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 ec9436005a3a6fdfb4783d1092bb361224eb6414..b224a630f8adb1fa357c838e6b32c784aed0b15b 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
|
||
|
@@ -879,6 +879,7 @@ 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
|
||
|
@@ -887,6 +888,7 @@ 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
|
||
|
|
||
|
}
|
||
|
|