diff --git a/src/api/java/baritone/api/utils/ExampleBaritoneControl.java b/src/api/java/baritone/api/utils/ExampleBaritoneControl.java index 2b6186b5..8369d5f9 100644 --- a/src/api/java/baritone/api/utils/ExampleBaritoneControl.java +++ b/src/api/java/baritone/api/utils/ExampleBaritoneControl.java @@ -33,9 +33,11 @@ import baritone.api.process.IGetToBlockProcess; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ChunkProviderClient; +import net.minecraft.crash.CrashReport; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.ReportedException; import net.minecraft.util.math.BlockPos; import net.minecraft.world.chunk.Chunk; @@ -195,6 +197,17 @@ public class ExampleBaritoneControl implements Helper, AbstractGameEventListener logDirect("Goal: " + goal); return true; } + if (msg.equals("crash")) { + StringBuilder meme = new StringBuilder(); + CrashReport rep = (new CrashReport("Manually triggered debug crash", new Throwable())); + mc.addGraphicsAndWorldToCrashReport(rep); + new ReportedException(rep).printStackTrace(); + rep.getSectionsInStringBuilder(meme); + System.out.println(meme); + logDirect(meme.toString()); + logDirect("ok"); + return true; + } if (msg.equals("path")) { if (pathingBehavior.getGoal() == null) { logDirect("No goal.");