mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
SPIGOT-4371: Trident damaged when event cancelled
This commit is contained in:
parent
97315374fb
commit
34caaf6d68
1 changed files with 13 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue