write to a file to indicate success
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ install:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- docker run --rm cabaletta/baritone ./gradlew javadoc
|
- docker run --rm cabaletta/baritone ./gradlew javadoc
|
||||||
- docker run --name baritone cabaletta/baritone /bin/sh -c "set -e; /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 128x128x24 -ac +extension GLX +render; DISPLAY=:99 BARITONE_AUTO_TEST=true ./gradlew runClient"
|
- docker run --name baritone cabaletta/baritone /bin/sh -c "set -e; /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 128x128x24 -ac +extension GLX +render; DISPLAY=:99 BARITONE_AUTO_TEST=true ./gradlew runClient; cat /code/autotest/success"
|
||||||
- docker cp baritone:/code/dist dist
|
- docker cp baritone:/code/dist dist
|
||||||
- ls dist
|
- ls dist
|
||||||
- cat dist/checksums.txt
|
- cat dist/checksums.txt
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ import net.minecraft.world.WorldSettings;
|
|||||||
import net.minecraft.world.WorldType;
|
import net.minecraft.world.WorldType;
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
import net.minecraft.world.dimension.DimensionType;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Responsible for automatically testing Baritone's pathing algorithm by automatically creating a world with a specific
|
* Responsible for automatically testing Baritone's pathing algorithm by automatically creating a world with a specific
|
||||||
* seed, setting a specified goal, and only allowing a certain amount of ticks to pass before the pathing test is
|
* seed, setting a specified goal, and only allowing a certain amount of ticks to pass before the pathing test is
|
||||||
@@ -127,6 +131,11 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper {
|
|||||||
// If we have reached our goal, print a message and safely close the game
|
// If we have reached our goal, print a message and safely close the game
|
||||||
if (GOAL.isInGoal(ctx.playerFeet())) {
|
if (GOAL.isInGoal(ctx.playerFeet())) {
|
||||||
System.out.println("Successfully pathed to " + ctx.playerFeet() + " in " + event.getCount() + " ticks");
|
System.out.println("Successfully pathed to " + ctx.playerFeet() + " in " + event.getCount() + " ticks");
|
||||||
|
try {
|
||||||
|
Files.write(Paths.get(Minecraft.getInstance().gameDir.toString()), "Success!".getBytes());
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
mc.shutdown();
|
mc.shutdown();
|
||||||
mc.shutdownMinecraftApplet();
|
mc.shutdownMinecraftApplet();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user