Topic category: Help with Minecraft modding (Java Edition)
Hello everyone!
I have a little issue with a thing. I want to create some sort of "global energy storing system" for each player. Each player will store individual global value like EMC from ProjectE mod. This global value will be used in machines like furnace for example. When a specific player place this furnace in a world then this furnace will bind to the player so this furnace will use his global value (stored energy) for smelting etc.. Other players can interact with this furnace too but this furnace always consume owner "global stored energy".
The next thing except consuming players "global energy" is to produce this global energy. For example: Player will place a block called for example "Energy producer" into the world. This block will bind to his "global energy system" and when a player put for example redstone dust to the gui slot then this redstone dust will be consumed and produce 10 energy for his "global energy system". When other players put a redstone dust into slot then the redstone will be consumed and produce 10 energy for owner of the machine.
I tried to use PLAYER_PERSISTENT variable and use this variable in my blocks procedure. But I have got an compiling error everytime I want to use this global variable in tick event trigger on blocks procedure.
I tried to find someone who had similar idea but I have found nothing so I would appreciate if anyone will help me with this or give me some info how to make it work. :)
And also I am sorry if something I wrote is hard to understant. My english is not perfect.