Started by
Saladifier
on
Topic category: Help with Minecraft modding (Java Edition)
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:
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 (:
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.
I could also use something like that....