summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemTrident.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-09-15 19:07:03 +1000
committermd_5 <git@md-5.net>2018-09-15 19:07:03 +1000
commit34caaf6d680ea1f1fa918bbd12daee09ca7a6fc8 (patch)
tree0bd331db2b8d909fcfa508aaca5d590f8135a8e9 /nms-patches/ItemTrident.patch
parent97315374fb5a017352f12858ad93c701dd4b11d7 (diff)
downloadcraftbukkit-34caaf6d680ea1f1fa918bbd12daee09ca7a6fc8.tar
craftbukkit-34caaf6d680ea1f1fa918bbd12daee09ca7a6fc8.tar.gz
craftbukkit-34caaf6d680ea1f1fa918bbd12daee09ca7a6fc8.tar.lz
craftbukkit-34caaf6d680ea1f1fa918bbd12daee09ca7a6fc8.tar.xz
craftbukkit-34caaf6d680ea1f1fa918bbd12daee09ca7a6fc8.zip
SPIGOT-4371: Trident damaged when event cancelled
Diffstat (limited to 'nms-patches/ItemTrident.patch')
-rw-r--r--nms-patches/ItemTrident.patch15
1 files changed, 13 insertions, 2 deletions
diff --git a/nms-patches/ItemTrident.patch b/nms-patches/ItemTrident.patch
index f4b26b00..868e9c5b 100644
--- a/nms-patches/ItemTrident.patch
+++ b/nms-patches/ItemTrident.patch
@@ -14,7 +14,16 @@
}
public boolean a(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
-@@ -42,7 +46,15 @@
+@@ -33,7 +37,7 @@
+
+ if (k <= 0 || entityhuman.ao()) {
+ if (!world.isClientSide) {
+- itemstack.damage(1, entityhuman);
++ // itemstack.damage(1, entityhuman); // CraftBukkit - moved down
+ if (k == 0) {
+ EntityThrownTrident entitythrowntrident = new EntityThrownTrident(world, entityhuman, itemstack);
+
+@@ -42,7 +46,17 @@
entitythrowntrident.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY;
}
@@ -26,12 +35,14 @@
+ }
+ return;
+ }
++
++ itemstack.damage(1, entityhuman);
+ // CraftBukkit end
+
if (!entityhuman.abilities.canInstantlyBuild) {
entityhuman.inventory.f(itemstack);
}
-@@ -53,6 +65,10 @@
+@@ -53,6 +67,10 @@
SoundEffect soundeffect = SoundEffects.ITEM_TRIDENT_THROW;
if (k > 0) {