Is there a way to establish permanent global variables?

Started by ululu on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Sep 2019
Points:
647

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
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
Active 4 years ago
Joined Aug 2019
Points:
740

User statistics:

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

I think GLOBAL_MAP is the permanent one.

GLOBAL_MAP and GLOBAL_WORLD…
Wed, 09/25/2019 - 16:07

GLOBAL_MAP and GLOBAL_WORLD are permanent, plus all NBT tag variables in procedures.

Active 8 months ago
Joined Apr 2020
Points:
732

User statistics:

  • Modifications: 6
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 43
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?

Active 8 months ago
Joined Apr 2020
Points:
732

User statistics:

  • Modifications: 6
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 43
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.

Active 8 months ago
Joined Apr 2020
Points:
732

User statistics:

  • Modifications: 6
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 43
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?

Active 8 months ago
Joined Apr 2020
Points:
732

User statistics:

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

Even closing it with task manager leaves the loading screen there

Active 8 months ago
Joined Apr 2020
Points:
732

User statistics:

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

Thanks seems to be working fine :)