mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
6048122e23
This patch appears to be causing some issues with 1.14.3 entity AI
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From e17fd478da771d89e0b77adb036d3152650f0827 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 82b3c0a7de..aa50435bec 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
@@ -598,4 +598,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|
public <T> void setMemory(MemoryKey<T> memoryKey, T t) {
|
|
getHandle().getBehaviorController().setMemory(CraftMemoryKey.fromMemoryKey(memoryKey), CraftMemoryMapper.toNms(t));
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getArrowsStuck() {
|
|
+ return getHandle().getArrowCount();
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setArrowsStuck(int arrows) {
|
|
+ getHandle().setArrowCount(arrows);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
--
|
|
2.22.0
|
|
|