Is there a way to establish permanent global variables?

Started by ululu on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to establish permanent global variables?
Wed, 09/25/2019 - 01:55 (edited)

From what I understand, global variables currently start at their default value every time they're loaded, i.e. a "GLOBAL_MAP" variable set to default to False will always be False when the world is loaded. Is there a way to permanently save the state of a variable so that it is loaded from memory, rather than as a default value?

Edited by ululu on Wed, 09/25/2019 - 01:55
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think GLOBAL_MAP is the…
Wed, 09/25/2019 - 06:46

I think GLOBAL_MAP is the permanent one.

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My mod resets my global…
Fri, 04/03/2020 - 22:25

My mod resets my global_world everytime you quit the world, why is this?

 

Name: EndDefeated

Variable type: Number

Scope: global_world

initial value: 0

 

Right clicking with an item sets the initial value to 1

 

The variable resets everytime you exit the world, do you have any solutions?

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No im still using 1.9.1 will…
Sat, 04/04/2020 - 13:10

No im still using 1.9.1 will updating to 2020.1 affect my mod in any way?

No, but please update to…
Sat, 04/04/2020 - 13:39

No, but please update to 2020.2 which fixes this bug, 2020.1 still has it.

affect my mod in any way?

Yes, it will fix many bugs your mod has right now due to not using the latest version.

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
MCreator 2020.2 freezes on…
Sat, 04/04/2020 - 15:18

MCreator 2020.2 freezes on loading generators 1.12.2 at around 60% of the loading bar, I have restarted my pc, uninstalled & resinstalled multiple times but I have the same issue.

Any solutions?

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Even closing it with task…
Sat, 04/04/2020 - 15:21

Even closing it with task manager leaves the loading screen there

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks seems to be working…
Sat, 04/04/2020 - 16:13

Thanks seems to be working fine :)