Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-163946

Tridents with one durability remaining can be thrown

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 19w42a, 1.15 Pre-Release 2
    • 1.15 Pre-release 3
    • None
    • Confirmed
    • Items
    • Important

    Description

      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)

      Attachments

        Issue Links

          Activity

            People

              Excited Maria Lemón
              tryashtar [Mod] tryashtar
              Votes:
              5 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                CHK: