Help with Item NBT Number Tags

Started by Saladifier on Wed, 09/22/2021 - 20:38

Topic category: Help with modding (Java Edition)

Last seen on 12:30, 15. Oct 2021
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with Item NBT Number Tags
Wed, 09/22/2021 - 20:38

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 12:30, 15. Oct 2021
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 (: