aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0448-Add-LivingEntity-clearActiveItem.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-04-27 15:50:33 -0700
committerJake Potrebic <[email protected]>2024-04-27 15:50:38 -0700
commitd02bb811de6f9d7e42001137b93d6a6f88359ab6 (patch)
treea396cbb1f0ada45b98703f8125f06f17334dc080 /patches/server/0448-Add-LivingEntity-clearActiveItem.patch
parentdd571d89f2202bda719a40fd15f92cc754b6ade1 (diff)
downloadPaper-d02bb811de6f9d7e42001137b93d6a6f88359ab6.tar.gz
Paper-d02bb811de6f9d7e42001137b93d6a6f88359ab6.zip
proper migration to gamerules for keep spawn loaded distance
Diffstat (limited to 'patches/server/0448-Add-LivingEntity-clearActiveItem.patch')
-rw-r--r--patches/server/0448-Add-LivingEntity-clearActiveItem.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0448-Add-LivingEntity-clearActiveItem.patch b/patches/server/0448-Add-LivingEntity-clearActiveItem.patch
new file mode 100644
index 0000000000..50382e523c
--- /dev/null
+++ b/patches/server/0448-Add-LivingEntity-clearActiveItem.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Anrza <[email protected]>
+Date: Wed, 15 Jul 2020 12:08:49 +0200
+Subject: [PATCH] Add LivingEntity#clearActiveItem
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+index aff940a7bacf53571f8e7bcd520419994596ebb3..7158f88e90c624b7ed3345ad7fb47745d4491d88 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+@@ -934,6 +934,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+ return this.getHandle().getUseItem().asBukkitMirror();
+ }
+
++ // Paper start
++ @Override
++ public void clearActiveItem() {
++ getHandle().stopUsingItem();
++ }
++ // Paper end
++
+ @Override
+ public int getActiveItemRemainingTime() {
+ return this.getHandle().getUseItemRemainingTicks();