It is currently 08 Nov 2025, 19:27
   
Text Size

Running Simulation Mode programatically

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Running Simulation Mode programatically

Postby AronaDaal » 06 Oct 2020, 20:23

Hello! I have been working on a project where I build a deck and run a simulation, change, run again, etc. My desire is to run the simulator programmatically. I have attempted a few things to no avail:
1. I have the forge-gui-desktop-1.6.36-jar-with-dependencies.jar in my project was able to access the function:
Code: Select all
SimulateMatch.simulate(args);
where I pass in the correct args. However, I run into a NPE. Then I tried running from:
Code: Select all
Main.main(args)
since I saw some init blocks. Again, I run into a NPE.

I figure this is because it needs some dependencies to be initialized first, hence the jar file with dependencies.

2. So I attempted to execute the jar file in the code, however, I have been very unsuccessful trying to execute a jar file programmatically.

So I was hoping, how can I get solution #1 to work? Is there a function I can call to make sure things are initialized before executing the sim mode?
AronaDaal
 
Posts: 1
Joined: 06 Oct 2020, 20:14
Has thanked: 0 time
Been thanked: 0 time

Return to Forge

Who is online

Users browsing this forum: No registered users and 117 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 117 users online :: 0 registered, 0 hidden and 117 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 117 guests

Login Form