Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set Global Variables from configuration file #67

Open
3 tasks done
smmmadden opened this issue May 3, 2024 · 1 comment
Open
3 tasks done

Unable to set Global Variables from configuration file #67

smmmadden opened this issue May 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@smmmadden
Copy link

Issue description

I'm trying to create a procedure that will check the configuration file and read the properties, get their values and then set global variable values to them. The global variables would then be used with Cloth-Config Plugin that I can provide an in-game option to change configuration settings, but I need to get the latest values first to ensure the player sees the right settings.
What's happening is, if I use the Read JSON file and get values, I get a stack overflow and the Set Global elements return null. I also tried using the for each line of the file get the text and do...element and still the global variables are not getting set.
To prove that the global variables are not getting set (or reading the properties to do so), I added a logger to print out the value. The game errors on load with a null value.
image
image

How to reproduce this issue?

Created a config.json file
Added Global Variables to support Cloth-Config
image
Attempted to read the properties and set global variables in a procedure
Ran Client option
Fails

Operating system

Windows

Details

FileManager 5.10
MCreator 2024.1.17319
neoforge-1.20.4

Example workspace

No response

Logs

https://pastebin.com/4diu03L0

Issue tracker rule checks (please read carefully)

@smmmadden smmmadden added the bug Something isn't working label May 3, 2024
@smmmadden
Copy link
Author

So I did some further testing and can confirm that the use of Global variables with FileManager is definitely not supported. I created some local variables and set the values and confirmed that the variable was set correctly. But doing the same with a Global Variable causes minecraft to crash. You can see the two global variable entries added. Without those two, Minecraft client loads fine and works. With them, it did not.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant