how to make random item names

Started by Eryx on

Topic category: Help with modding (Java Edition)

Last seen on 00:56, 29. Sep 2023
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make random item names

How can I make a item that has a random name in mcreator, like it can select a random name that I give it then random prefix then random item name and then random suffix.

Last seen on 18:01, 13. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure that…
Mon, 10/02/2023 - 11:00

Make a procedure that randomly combines some text of your choosing, then sets the display name of the item to whatever it comes up with. (There's tools for this in the 'text' tab, you'll want to create a local string variable for the combined text, then set the item's name to that variable.) You may also want to check if the item is named so that the name doesn't constantly reset, or just make sure this only triggers once.

If you wanted to be really fancy, you could add custom localization entries and reference those for your item name, so the mod could be translated, but it's not strictly necessary.