34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
|
From 8c092bb304056ff0413ebeacfeb40ebff94bf669 Mon Sep 17 00:00:00 2001
|
||
|
From: Francisco Saldanha <francisco.gsaldanha@gmail.com>
|
||
|
Date: Wed, 3 May 2017 19:08:58 -0300
|
||
|
Subject: [PATCH] Drop exp on instant-respawn
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
index 73332d6a2..141a378b5 100644
|
||
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
@@ -464,6 +464,19 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||
|
|
||
|
// Griffin start - Instant respawn
|
||
|
if (getBukkitEntity().isOnline() && SpigotConfig.instantRespawn) {
|
||
|
+ // exp start - we have to handle it here because that's handled somewhere else (while the entity is still dead, which doesn't happen with this)
|
||
|
+ // code borrowed from EntityLiving
|
||
|
+ int i;
|
||
|
+ i = this.expToDrop;
|
||
|
+ while (i > 0) {
|
||
|
+ int j = EntityExperienceOrb.getOrbValue(i);
|
||
|
+
|
||
|
+ i -= j;
|
||
|
+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j));
|
||
|
+ }
|
||
|
+ this.expToDrop = 0;
|
||
|
+ // exp end
|
||
|
+
|
||
|
ChunkCoordinates chunkcoordinates = getBed();
|
||
|
ChunkCoordinates chunkcoordinates1;
|
||
|
|
||
|
--
|
||
|
2.13.3
|
||
|
|