Custom Data Number Tag in Item

Started by xhytenzhi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom Data Number Tag in Item
Fri, 06/12/2026 - 20:02 (edited)

Hello,

it is REALLY weird. I have some procedures, wich write values in |Custom Data number tag "Name" of Itemstack.
See this example:

As long as i start my MOD directly from MCreator, the values get written on my items as i wont and i can use them for continuing calculations. ALL FINE

Ingame (MCreator) looks like this: All stats were written on my item and they work.

 

When i export my MOD and start it "standalone" ( same NeoForge Version, with Curious MOD ( also included in MCreator ) , i get 0 for ALL values:

 

Please note: The Names of the attributes are random, they do not impact this problem, they are generated randomly on every item creation.
Fun Fact: When i create an item in a world in MCreator and i transfer it to the standalone version, i have the same item, WITH stats written on it AND i can read them for other calculations. Its also the same problem with or without curious.

I also used LOGs to show me the every single value calculation until the last step, and all values are avaiable and correct, but not the final result
So the "simple" question is:
WHY does the procedure | Set custom data number tag X for ITEMSTACK X to X | work in MCreator and not outside of it??

 

Edited by xhytenzhi on Fri, 06/12/2026 - 20:02
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you running mcreator…
Fri, 06/12/2026 - 20:25

Are you running mcreator server?

Otherwise it's an issue with calling that procedure, most likely issue of syncing between server and client, depends where you call

Also you're converting number to text and back just to format it to certain decimal values? Just format it once on the (final) return text. And the name values in your images differ as if they are from two different versions

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When i launch from MCreator,…
Fri, 06/12/2026 - 21:11

When i launch from MCreator, i press the "Run Client" Button.
The Problem appears outside of MCreator in Singleplayer and/or Multiplayer Server.

 

Yes i just use the format to have lesser decimal values. The Display Procedure is separate and also uses Format Codes.. i can try to remove the formatting from the data number tags and only use it for displaying them for the player.

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
so... it really was the…
Fri, 06/12/2026 - 21:24

so... it really was the format thing, changed it to this and it works.