mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Add PrepareGrindstoneEvent
This commit is contained in:
41
patches/server/0129-PaperPR-Fix-enderdragon-exp-dupe.patch
Normal file
41
patches/server/0129-PaperPR-Fix-enderdragon-exp-dupe.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From 4720840046eea35a58d5f4a60bc7337f5ca9bce9 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] PaperPR - Fix enderdragon exp dupe
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/EntityEnderDragon.java | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
index f06fde3242..6abe47f776 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
@@ -33,7 +33,7 @@ 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; } // Purpur
|
||||
public float bB;
|
||||
@Nullable
|
||||
public EntityEnderCrystal currentEnderCrystal;
|
||||
@@ -908,6 +908,7 @@ 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()); // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -916,6 +917,7 @@ 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")); // Purpur
|
||||
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
Reference in New Issue
Block a user