-
Notifications
You must be signed in to change notification settings - Fork 0
Install instructions
Haeki edited this page Mar 31, 2016
·
41 revisions
Simple:
Just download JavaKara from here and the files from the repository.
Open a labyrinth from the example world and enter the following code in the editor:
PathFinder pathFinder;
public void myProgram() {
pathFinder = new PathFinder(tools, world, kara);
pathFinder.start();
}
You must save your program in the same directory as the PathFinder source Files.
Advanced:
Since there is no function in kara to get the direction kara is facing it can cause some troubles if kara isn't facing in the right directon at the start.
The solution to fix this is to manipulate some code in the javakara.jar
- get the relevant file out of the javakara.jar and decompile it.
- open the javakara.jar with for example 7zip.
- go into the javakara diretory and copy the JavaKaraProgram$JavaKara.class file.
- decompile it (for example here)
- modify the file and recompile it.
- in the decompieled file search for
private Kara kara
and changeprivate
topublic
. - recompile the file using:
javac -classpath pathToThe/javakara.jar pathToThe/ModifiedClass
- put the new file back in the javakara.jar and replace the old one.
- now you can use
PathFinderModded
instead ofPathFinder
.