geforkt von Mirrors/Paper
Fix foxes not dropping items
Dieser Commit ist enthalten in:
Ursprung
cf17353783
Commit
9db83af2ab
@ -1,4 +1,4 @@
|
|||||||
From 91e26b7d4f46295ba6b5efd3577a49eeed07b55c Mon Sep 17 00:00:00 2001
|
From 87f19f8f0e3245d63d69328ac2941f934d31a857 Mon Sep 17 00:00:00 2001
|
||||||
From: Phoenix616 <mail@moep.tv>
|
From: Phoenix616 <mail@moep.tv>
|
||||||
Date: Tue, 21 Aug 2018 01:39:35 +0100
|
Date: Tue, 21 Aug 2018 01:39:35 +0100
|
||||||
Subject: [PATCH] Improve death events
|
Subject: [PATCH] Improve death events
|
||||||
@ -61,7 +61,7 @@ index 7031dd0e4c..f6dc96434b 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
|
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
|
||||||
index 917d603507..c099e2fbb6 100644
|
index 917d603507..95d6b3f369 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityFox.java
|
--- a/src/main/java/net/minecraft/server/EntityFox.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFox.java
|
+++ b/src/main/java/net/minecraft/server/EntityFox.java
|
||||||
@@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal {
|
@@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal {
|
||||||
@ -69,9 +69,10 @@ index 917d603507..c099e2fbb6 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
- protected void d(DamageSource damagesource) {
|
- protected void d(DamageSource damagesource) {
|
||||||
|
- ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND);
|
||||||
+ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
|
+ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
|
||||||
ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND);
|
+ ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND).cloneItemStack(); // Paper
|
||||||
|
+
|
||||||
+ // Paper start - Cancellable death event
|
+ // Paper start - Cancellable death event
|
||||||
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = super.d(damagesource);
|
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = super.d(damagesource);
|
||||||
+
|
+
|
||||||
@ -81,7 +82,7 @@ index 917d603507..c099e2fbb6 100644
|
|||||||
+ return deathEvent;
|
+ return deathEvent;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
|
||||||
if (!itemstack.isEmpty()) {
|
if (!itemstack.isEmpty()) {
|
||||||
this.a(itemstack);
|
this.a(itemstack);
|
||||||
this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a);
|
this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren