Paper/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch
Shane Freeder 243d2313b9
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
323d6ca3 #535: Add EntityCategory API to LivingEntity
7d3323d8 #526: Add Block#applyBoneMeal()

CraftBukkit Changes:
bf451617 SPIGOT-6109: Improve loot handling
bfea4559 SPIGOT-6111: NPE in CraftHumanEntity#openWorkbench & CraftHumanEntity#openEnchanting
ee7116b4 Add note to CONTRIBUTING.md to suggest keeping commit messages / titles the same
eae15943 #721: Add EntityCategory API to LivingEntity
8c611560 #702: Add Block#applyBoneMeal()
8408de02 #716: Fix barrel open API playing sound twice
74b6982b #711: Add Full RGB support to the console
2020-08-27 14:37:37 +01:00

28 Zeilen
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index c608732fb2b7c3d80a1fe12c007e0237caadcbfc..dd12147fd5b37b0b6e54568d65f571534d0b3c67 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -657,4 +657,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Spigot.");
}
+
+ // Paper start
+ @Override
+ public int getArrowsStuck() {
+ return getHandle().getArrowCount();
+ }
+
+ @Override
+ public void setArrowsStuck(int arrows) {
+ getHandle().setArrowCount(arrows);
+ }
+ // Paper end
}