mojira.dev
MC-163946

Tridents with one durability remaining can be thrown

The bug

When a trident has one durability remaining, it can be used. This causes it to break in the hand but still throw a trident entity.

Tridents are intended to disallow use when they are about to break:

// TridentItem#use
if (itemStack.getDamageValue() >= itemStack.getMaxDamage()) {
    return InteractionResultHolder.fail(itemStack);
}

However, this only prevents tridents with 0 durability from being thrown, rather than tridents with 1 durability.

This behavior broke when MC-120664 was fixed.

How to reproduce

/give @p trident{Damage:250}
/give @p trident{Damage:249}

Try to use the first trident (✔  you can't)
Try to use the second trident (❌  you can, it throws and breaks weirdly)

Linked issues

Comments 1

Confirmed for 1.15-pre2.

tryashtar

migrated

Confirmed

Important

Items

19w42a, 1.15 Pre-Release 2

1.15 Pre-release 3

Retrieved