mojira.dev
MC-228729

CanPlaceOn doesn't work with ink sacs/dyes used on signs

The bug

Glow inc sacs or dyes with the CanPlaceOn tag validly set can't be applied to signs in adventure mode.

Expected:
It works, just like putting a book in a lectern, stripping a log with an axe, etc. (use item on block)

Actual:
It doesn't work.

Steps to reproduce

  1. Place down a wall sign

  2. Go into gamemode adventure

  3. Give yourself an glow ink sac with the following command

    /give @p glow_ink_sac{CanPlaceOn:["minecraft:oak_sign"]}
  4. Try using it on the sign

-> ❌ It doesn't work.

Linked issues

Attachments

Comments 9

Can confirm in 1.17.1.

Can confirm in 1.18.1.

Can confirm in 1.18.2.

Can confirm in 1.19.

Can confirm in 1.19.1.

Can confirm in 1.19.2.

Not sure if it was faultily tested, but the steps to reproduce says to place a wall sign, but doesn't list the wall sign ID in the CanPlaceOn list; either change the ID or change the step to standing oak sign.

Can confirm in 1.21.4.

It affects all variants of signs, including standing/wall signs and ceiling/wall hanging signs.

The command should be updated to

/give @s glow_ink_sac[can_place_on={blocks:"#all_signs"}]

AgentM

(Unassigned)

Confirmed

Platform

Low

Commands

CanPlaceOn, adventure-mode, glow_ink, sign

1.17, 1.17.1, 1.18.1, 1.18.2, 1.19, ..., 23w14a, 1.20.1, 23w33a, 1.20.4, 1.21.1

Retrieved