It is currently 05 Mar 2021, 14:16
   
Text Size

Running Simulation Mode programatically

Moderators: timmermac, friarsol, Blacksmith, KrazyTheFox, Agetian, 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 23 guests


Who is online

In total there are 23 users online :: 0 registered, 0 hidden and 23 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 23 guests

Login Form