aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch
diff options
context:
space:
mode:
authorTamion <[email protected]>2024-02-09 21:56:13 +0100
committerGitHub <[email protected]>2024-02-09 21:56:13 +0100
commit9c04729de1727cdbcfb0d045ca0f883840eb994d (patch)
treee2a3dde9caeba1bcf90bbe8ab9603533e34e1fb0 /patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch
parent534659e97ef85308ff3facc00fb5e11f7b9b96f5 (diff)
downloadPaper-9c04729de1727cdbcfb0d045ca0f883840eb994d.tar.gz
Paper-9c04729de1727cdbcfb0d045ca0f883840eb994d.zip
Add Arrow/Stinger Removal Time API (#10193)
Diffstat (limited to 'patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch')
-rw-r--r--patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch20
1 files changed, 17 insertions, 3 deletions
diff --git a/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch
index fee4d4dd6e..f7b2fb6ec1 100644
--- a/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch
+++ b/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch
@@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now
deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 5825f942db3b9870631ff093708dee0e930fccc8..b93d03c1af8b82c009c3f6007cc30e888f6764e0 100644
+index 5825f942db3b9870631ff093708dee0e930fccc8..690364b874212cca2fe2078efa7b8f3f7880e39f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -266,9 +266,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -266,10 +266,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
@Override
@@ -24,10 +24,24 @@ index 5825f942db3b9870631ff093708dee0e930fccc8..b93d03c1af8b82c009c3f6007cc30e88
+ this.getHandle().setArrowCount(count);
+ }
+ // Paper end
++ }
++
++ // Paper start - Add methods for working with arrows stuck in living entities
++ @Override
++ public void setNextArrowRemoval(final int ticks) {
++ Preconditions.checkArgument(ticks >= 0, "New amount of ticks before next arrow removal must be >= 0");
++ this.getHandle().removeArrowTime = ticks;
++ }
++
++ @Override
++ public int getNextArrowRemoval() {
++ return this.getHandle().removeArrowTime;
}
++ // Paper end - Add methods for working with arrows stuck in living entities
@Override
-@@ -786,4 +792,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+ public void damage(double amount) {
+@@ -786,4 +805,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible);
}