aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0599-Stinger-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0599-Stinger-API.patch')
-rw-r--r--patches/server/0599-Stinger-API.patch26
1 files changed, 22 insertions, 4 deletions
diff --git a/patches/server/0599-Stinger-API.patch b/patches/server/0599-Stinger-API.patch
index 73ff5d1ee1..499d7d5c10 100644
--- a/patches/server/0599-Stinger-API.patch
+++ b/patches/server/0599-Stinger-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 796412196f26f22b639b82192a3288a81ebd10b4..711f4ca8ee42a14e40af86d93a9685b4b9a2ba99 100644
+index 5effef8e6a360b4d6910be9f4b7a5363d38675ed..33d5e64fa76ef789a51197e5ec3b5ebbcb82b8c5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -337,7 +337,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -337,6 +337,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
// Paper end
}
@@ -17,12 +17,18 @@ index 796412196f26f22b639b82192a3288a81ebd10b4..711f4ca8ee42a14e40af86d93a9685b4
+ public int getBeeStingerCooldown() {
+ return getHandle().removeStingerTime;
+ }
-+
+
+ // Paper start - Add methods for working with arrows stuck in living entities
+ @Override
+@@ -351,6 +356,34 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+ }
+ // Paper end - Add methods for working with arrows stuck in living entities
+
+ @Override
+ public void setBeeStingerCooldown(int ticks) {
+ getHandle().removeStingerTime = ticks;
+ }
-
++
+ @Override
+ public int getBeeStingersInBody() {
+ return getHandle().getStingerCount();
@@ -33,7 +39,19 @@ index 796412196f26f22b639b82192a3288a81ebd10b4..711f4ca8ee42a14e40af86d93a9685b4
+ Preconditions.checkArgument(count >= 0, "New bee stinger amount must be >= 0");
+ getHandle().setStingerCount(count);
+ }
++
++ @Override
++ public void setNextBeeStingerRemoval(final int ticks) {
++ Preconditions.checkArgument(ticks >= 0, "New amount of ticks before next bee stinger removal must be >= 0");
++ this.getHandle().removeStingerTime = ticks;
++ }
++
++ @Override
++ public int getNextBeeStingerRemoval() {
++ return this.getHandle().removeStingerTime;
++ }
+ // Paper end - Bee Stinger API
++
@Override
public void damage(double amount) {
this.damage(amount, null);