How to run procedure when player crouches & right-clicks sign?

Started by TCMFatbird on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to run procedure when player crouches & right-clicks sign?

I am trying to make a mod to get more customizable signs where my first item is a "bolding agent" which when crouching & right-clicking on a sign, it turns the text on the sign bold. Problem is, I have no idea how to do that. I just mostly need help with the part to run a procedure when the player right-clicks a sign while crouching with the item.

Thanks in advance!

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(The player doesn't actually…
Wed, 11/26/2025 - 15:41

(The player doesn't actually have to shift-click they can just right click the sign while holding the item; I noticed this when dye-ing signs.)

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a procedure, the…
Wed, 11/26/2025 - 16:52

Create a procedure, the trigger should be when player right click block, then use an IF statement and look for is sneaking/crouching (you can use the search bar to locate it).

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did that but I do not know…
Wed, 11/26/2025 - 17:39

I did that but I do not know what to do after that.

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You'll need to modify the…
Mon, 12/01/2025 - 01:04

You'll need to modify the sign's NBT data (how they store text) and add the formatting code for bold text at the beginning of the NBT text, and replace it with the new bolded NBT text.


Original NBT + §l at beginning = bold text NBT.

You could also do this with a mix of commands & procedures if you really want.