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

Flint and steel / fire charge is used/consumed when right-clicking on an ignited creeper / charged creeper

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.15.2, 20w22a, 1.16 Pre-release 2, 1.16 Pre-release 5, 1.16 Pre-release 7, 1.16.1, 1.16.2 Pre-release 1, 1.16.2 Pre-release 3, 1.16.2, 1.16.3, 1.16.4 Pre-release 1, 1.16.4, 20w46a, 20w48a, 21w08a, 21w17a, 1.17.1, 21w37a, 21w39a, 21w40a, 21w42a, 21w43a, 1.18 Pre-release 1, 1.18 Pre-release 5, 1.18, 1.18.1, 22w03a, 1.18.2, 22w14a, 1.19 Pre-release 4, 1.19, 22w24a, 1.19.1, 1.19.2, 22w45a, 1.19.4, 23w16a, 1.20.1, 23w45a
    • Confirmed
    • Items, Player Animation

      The bug

      Player can keep right-clicking on a creeper (with a flint and steel) even after the first time, even though the creeper is going to blow up anyway, losing durability for each hand swing.

      How to reproduce

      1. Spawn a creeper or a charged creeper
      2. Go into survival mode (creative mode works too but it won't lower flint and steel's durability)
      3. Start right-clicking on a creeper with a flint and steel
        Player is still able to use flint and steel even after the first time while creeper blows up, making player use more durability than 1

      Expected behavior would be that the player should only be able to right-click on a creeper once.

      Code analysis and fix

      Code analysis and fix by Avoma can be found in this comment.

        1. 2020-06-01_18.13.20.png
          2020-06-01_18.13.20.png
          175 kB
        2. 2020-06-01_18.13.45.png
          2020-06-01_18.13.45.png
          189 kB
        3. 2020-06-01_18.13.56.png
          2020-06-01_18.13.56.png
          176 kB
        4. 2020-06-01_18.13.57.png
          2020-06-01_18.13.57.png
          176 kB
        5. 2020-06-01_18.14.02.png
          2020-06-01_18.14.02.png
          191 kB
        6. 2020-06-01_18.26.33.png
          2020-06-01_18.26.33.png
          178 kB
        7. MC-186909.mp4
          5.00 MB
        8. MC-186909.png
          MC-186909.png
          629 kB
        9. MC-186909 - Current Code.png
          MC-186909 - Current Code.png
          49 kB
        10. MC-186909 - Fixed Code.png
          MC-186909 - Fixed Code.png
          51 kB

            Unassigned Unassigned
            PreverseDmitry Dmitry Konev
            Votes:
            10 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: