Mojira Archive
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)

Fixed

[Mod] tryashtar

Maria Lemón

2019-10-17, 10:07 AM

2020-06-11, 01:56 AM

2019-11-28, 06:50 PM

5

3

Confirmed

Important

Items

19w42a, 1.15 Pre-Release 2

1.15 Pre-release 3