How to get a block to store data after being mined...

Started by Joshua Rohn on

Topic category: Help with modding (Java Edition)

Last seen on 03:05, 13. May 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to get a block to store data after being mined...

Hi everyone! I'm relatively new to MCreator. I'm building a mod that uses a battery to store forge energy and I'm wondering how to get the amount of stored energy to save when I mine the block. As of now, when I place the block again, all the stored energy is gone. Is there a way to store it in a variable or NBT data? I noticed there is a trigger for when the player starts breaking the block....  Any assistance or pointing me in the right direction would be greatly appreciated!