How do I add energy to a block?

Started by Elvis_The_Snail on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I add energy to a block?
Thu, 10/23/2025 - 00:52 (edited)

I need help figuring out how to make a block that gains energy externally (eg. solar panel) every tick, and can't find out how.

Edited by Elvis_The_Snail on Thu, 10/23/2025 - 00:52
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(if using recent versions of…
Tue, 10/28/2025 - 08:00

(if using recent versions of Mcreator) 
In the custom block, check enable block entity, then in the energy tab enable energy storage and set the values you want.
After this move onto the triggers, mainly block tick, first check if the current time is day.
Add another if statement checking if the get energy of block at xyz is not equal to the get energy capacity of block at xyz (any direction is fine)
Then add Send [energy amount per tick] energy to block at xyz (any direction is fine)