Skip to content

Commit

Permalink
Print stack trace on OutOfMemoryError
Browse files Browse the repository at this point in the history
  • Loading branch information
TechPizzaDev committed Jul 29, 2023
1 parent 1e1b24b commit 68fe9aa
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.adventurecraft.awakening.mixin.client;

import com.llamalad7.mixinextras.sugar.Local;
import dev.adventurecraft.awakening.ACMainThread;
import dev.adventurecraft.awakening.ACMod;
import dev.adventurecraft.awakening.client.options.Config;
Expand Down Expand Up @@ -471,6 +472,18 @@ private boolean disableDoubleToggle() {
return true;
}

@Inject(
method = "run",
remap = false,
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/Minecraft;method_2131()V",
shift = At.Shift.AFTER,
ordinal = 0))
private void printStackOnOutOfMem(CallbackInfo ci, @Local OutOfMemoryError error) {
error.printStackTrace();
}

@Inject(
method = "method_2111",
at = @At(
Expand Down

0 comments on commit 68fe9aa

Please sign in to comment.