Started by
TCMFatbird
on
Topic category: Help with Minecraft modding (Java Edition)
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!
(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.)
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).
I did that but I do not know what to do after that.
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.