13
0
geforkt von Mirrors/Paper

Fix Reason = Player for Experience Orb drop

Dieser Commit ist enthalten in:
Aikar 2018-05-18 19:40:33 -04:00
Ursprung cf82968f35
Commit e8a70d7bd1

Datei anzeigen

@ -129,7 +129,7 @@ index 6ac89d1e3..177d8582f 100644
// CraftBukkit end // CraftBukkit end
Item item = itemstack.getItem(); Item item = itemstack.getItem();
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 9e864864d..91e8c1d75 100644 index 9e864864d..38c043375 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
@ -138,7 +138,7 @@ index 9e864864d..91e8c1d75 100644
i -= j; i -= j;
- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j)); - this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j));
+ EntityLiving attacker = killer != null ? killer : lastDamager; // Paper + EntityLiving attacker = killer != null ? killer : lastDamager; // Paper
+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j, this instanceof Player ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this)); // Paper + this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j, this instanceof EntityPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this)); // Paper
} }
this.expToDrop = 0; this.expToDrop = 0;
// CraftBukkit end // CraftBukkit end