Global variable GUI / Adding number to variable bug

Issue description

Hay Klemen, I found some bugs for 1.8.3

The first issue is global variables for GUIs crash due to some bit of code not formatted right according to forge.
I don't think this is a user side error as I have been able to narrow it down to adding a text variable to the GUI with a global variable option.
I have left that bug in the GUI for your testing.

If you remove the variable it will work fine again.

So the other bug is also to do with the global variables and this is an odd one but I was able to use overlays to display the global variable numbers as guides were not working.
and in 1.8.3 adding to a global variable just does not work at all, even though the same code using subtraction will work fine.

One more thing I just want to throw past you is a brief feature request I can make a new post for your records but I want to know if you will be adding support for blocks to call other block procedures for that specific coordinate block.

global works fine for some things but it's more fit for server-wide variables, not local server variables if you get what I mean. Basically, there is no way to target a block far as I know for its variable to edit or change its variable remotely or via other connected blocks such as wires.

Anyhow, let me know if you would consider adding that feature and if so I will make a new thread for that particular feature request for your record.

Issue comments

  1. For the issue with crashing, I will investigate and report back
  2. This is a known issue and will be fixed in 1.8.4
  3. You can already call procedure at different coordinates using Call at procedure block in Advanced category of procedure blocks
  4. You can have block specific variables using NBT tags: https://mcreator.net/tracker/issue/42990

Cool thanks, I never really thought much into what NBT really was until now it makes more sense why there was set values in the game such as true/false, 1.0, and words.

Sorry I think you misunderstood me, the question kinda changed now because of finding out about NBT was added but can you call variables of saying a block with NBT to the other block to change/edit the value of the main NBT block.

I am not sure if this would be even posable with NBT but the problem I am having to try to get a power pulse from one point to another point may it be thought other blocks that do not affect the whole world.
 
Someone did a tutorial in French that is broken at the moment because of the procedure add thing but it uses global variables because you can call those ones into other block and change the values but it makes the power variables for the whole world not just for the blocks connected to them.

So sorry if it was not clear the first time about the calling I did not mean calling procedures but calling variables like you can call the global variable. I think I saw some NBT tags but I am not sure if I can call them or not at the time of posting this reply.

You can use tick update to read the nbt of neighbor blocks and possibly reduce their value and increase your value to make the transmission of the value from one block to another.

Thanks for your reply Klemen :)

So from what I understand I need to set a variable for the power generator lets call it G for the generator to have a block that outputs say +5 every 0.5 game ticks or (for 10 tick rate)

And store that data somewhere say in variable B for a battery block then
Then for the wire block would have to make a variable say W for the wire to sore local power along the line that can detect if the battery is on its side and if so then remove say -1 B and add +1 W and to this if variable is not at the full.

So when it's in the wire I just need to grab the power from the W variable to use in the device which uses its own variable for power consumption.

One question though do I need to call the procedure in order to use the NBT or will it work without doing that?
I noticed that there is also a number dependency option, I got lost with what one I need to use to call the variable. it may not even be either of them IDK.

Thanks for helping so much I am sure there are more important things you could be doing with your time. And it means a tone to me that you have taken the time the help me resolve this problem and help me learn.

It's for a tutorial so, in the end, it will help more people learn about NBT and other features.

Yes, the procedure needs to be called somewhere. It can be a global trigger, but for your case, I would use tick update and update/transfer the power each tick.