From aa0f664cda65647a62eb384abe16f46550af5ebb Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 27 May 2019 21:20:00 -0700 Subject: [PATCH] =?UTF-8?q?just=20for=20debugging=20purposes=20?= =?UTF-8?q?=F0=9F=98=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../baritone/api/utils/ExampleBaritoneControl.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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.");