mojira.dev
MC-313104

Adventure mode players do no-action arm swing when using flint and steel on TNT unless it has can_break

The bug

If a player in adventure mode attempts to use flint and steel item on TNT, the arm swings with no action taking place, unless TNT is listed in the item’s can_break component. The use of this component for this purpose is highly unusual, but it is intended according to MC-312277. However, this behavior does not match other lightable blocks, and the false swinging seems unintended either way.

How to reproduce

  1. Be in adventure mode

  2. /give @p flint_and_steel[can_place_on={blocks:["tnt"]}]

  3. Place TNT

  4. Try to use the flint and steel on the TNT

Expected result

Either it should succeed, or the arm should not swing

Observed result

The arm swings but nothing happens

Notes

Interactions for TNT being controlled by can_break is very unusual, and I recommend it be reconsidered. Not only does this make it impossible to allow adventure mode players to ignite TNT without also destroying it (behavior which was possible before), it’s inconsistent from all other block interactions, including flint and steel lighting other blocks like campfires.

Current behavior (TNT)

Expected behavior (campfire)

Neither component

❌ Arm swings

✔ Can’t interact

Only can_place_on

❌ Arm swings

✔ Interaction succeeds

Only can_break

❌ Interaction succeeds

✔ Can’t interact

Both components

✔ Interaction succeeds

✔ Interaction succeeds

I was going to request a review of MC-312277 with this reasoning, but the arm swinging issue seems sufficiently buggy to me to warrant this new report.

Comments 0

No comments.

tryashtar

(Unassigned)

Confirmed

26.3, 26.4 Snapshot 7

Retrieved