mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
SPIGOT-5458: Riptide tridents don't lose durability
This commit is contained in:
parent
e43416a342
commit
e631456c7d
@ -27,7 +27,7 @@
|
|||||||
if (k == 0) {
|
if (k == 0) {
|
||||||
EntityThrownTrident entitythrowntrident = new EntityThrownTrident(world, entityhuman, itemstack);
|
EntityThrownTrident entitythrowntrident = new EntityThrownTrident(world, entityhuman, itemstack);
|
||||||
|
|
||||||
@@ -48,7 +55,20 @@
|
@@ -48,16 +55,40 @@
|
||||||
entitythrowntrident.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
entitythrowntrident.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,16 @@
|
|||||||
world.playSound((EntityHuman) null, (Entity) entitythrowntrident, SoundEffects.ITEM_TRIDENT_THROW, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
world.playSound((EntityHuman) null, (Entity) entitythrowntrident, SoundEffects.ITEM_TRIDENT_THROW, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
||||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
entityhuman.inventory.f(itemstack);
|
entityhuman.inventory.f(itemstack);
|
||||||
@@ -58,6 +78,10 @@
|
}
|
||||||
|
}
|
||||||
|
+ // CraftBukkit start - SPIGOT-5458 also need in this branch :(
|
||||||
|
+ else {
|
||||||
|
+ itemstack.damage(1, entityhuman, (entityhuman1) -> {
|
||||||
|
+ entityhuman1.d(entityliving.getRaisedHand());
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkkit end
|
||||||
|
}
|
||||||
|
|
||||||
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
||||||
if (k > 0) {
|
if (k > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user