Variables shared within a block, but not actually globle

Started by ydydxhg on

Topic category: Advanced modding

Last seen on 11:46, 25. May 2020
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Variables shared within a block, but not actually globle

HI guys,

Please correct me if I am wrong here, 

I think the local variables are only used within a procedure call, just like variables defined in the scope of a Java method, as an example.

and Global variables are like static variables shared by the whole mod package....? say you create a block that does something, and when you use a global variable in the procedures, multiple instances of the that block will use the same value. well, this is whats happening with my current project.... 

But what i want is something that only shares within the block instance. is there something like this? 

Last seen on 16:15, 8. Dec 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
for that use nbt block data
Sun, 05/17/2020 - 11:05

for that use nbt block data

Last seen on 11:46, 25. May 2020
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ah ok, i will check it out,…
Tue, 05/19/2020 - 21:41

ah ok, i will check it out, thanks a lot