Help with Item NBT Number Tags

Started by Saladifier on

Topic category: Help with modding (Java Edition)

Last seen on 01:58, 11. Jul 2022
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with Item NBT Number Tags

I am trying to make a mod where I can inject a fuel into a helmet, and I can display the fuel level while the helmet is worn. I am trying to use NBT Tags to do this. I have declared in the injection procedure to set fuelLevel to 100, but when I go to call that anywhere else it isn't found. For example I want their to be natural seeping, and every tick I want to lose a fuel point, but it doesn't register the nbt tags.

Here is a video showing the procedures and the issue:

https://youtu.be/V8BjJv7Vc7U

Last seen on 01:58, 11. Jul 2022
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So I actually figured it out…
Thu, 09/23/2021 - 00:42

So I actually figured it out. The issue was I was using the nbt tag on helmet, rather than provided itemstack, so I had to reconfigure everything so the NBT could be on a specific thing that the user was wearing. Then I made a seperate update trigger for the helmet where it constantly set a global variable to equal the nbt tag. Now it works (:

Last seen on 17:07, 24. Sep 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay so I know this was a…
Tue, 06/07/2022 - 03:23

Okay so I know this was a year ago but could you please show me how you did this/ go into more detail cause I'm trying to do something similar.