mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07:00
Fix enderdragon exp dupe
Properly track death stage when unloading/loading in the dragon
This commit is contained in:
37
Spigot-Server-Patches/Fix-enderdragon-exp-dupe.patch
Normal file
37
Spigot-Server-Patches/Fix-enderdragon-exp-dupe.patch
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||||
|
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||||
|
public float bx;
|
||||||
|
public float by;
|
||||||
|
public boolean bz;
|
||||||
|
- public int bA;
|
||||||
|
+ public int bA; public final int getDeathTicks() { return this.bA; } public final void setDeathTicks(final int value) { this.bA = value; } // Paper
|
||||||
|
public float bB;
|
||||||
|
@Nullable
|
||||||
|
public EntityEnderCrystal currentEnderCrystal;
|
||||||
|
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||||
|
public void b(NBTTagCompound nbttagcompound) {
|
||||||
|
super.b(nbttagcompound);
|
||||||
|
nbttagcompound.setInt("DragonPhase", this.bO.a().getControllerPhase().b());
|
||||||
|
+ nbttagcompound.setInt("Paper.DeathTick", this.getDeathTicks()); // Paper
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||||
|
if (nbttagcompound.hasKey("DragonPhase")) {
|
||||||
|
this.bO.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase")));
|
||||||
|
}
|
||||||
|
+ this.setDeathTicks(nbttagcompound.getInt("Paper.DeathTick")); // Paper
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user