Screenshot to Clipboard (Forge)

Screenshot to Clipboard (Forge)

3M Downloads

[Bug] Crash on 1.21.5

LittleCircleOO opened this issue ยท 0 comments

commented

Due to the 1.21.5 code restructuring of the screenshot function, the target method of mixin was lost, resulting in a MixinApplyError exception being thrown when taking a screenshot.

ScreenshotMixinAWT.java

//before
@Inject(at = @At(value = "HEAD"), method = "method_1661")

//after
@Inject(at = @At(value = "HEAD"), method = "method_22691")

Fabric/ScreenshotMixinMacOS.java

//before
@Inject(at = @At("TAIL"), method = "method_1661")

//after
@Inject(at = @At("TAIL"), method = "method_22691")

NeoForge/ScreenshotMixinMacOS.java

//before
@Inject(at = @At("TAIL"), method = {
    "method_1661(Lnet/minecraft/client/texture/NativeImage;Ljava/io/File;Lnet/neoforged/neoforge/client/event/ScreenshotEvent;Ljava/util/function/Consumer;)V",
    "lambda$_grab$2(Lnet/minecraft/client/texture/NativeImage;Ljava/io/File;Lnet/neoforged/neoforge/client/event/ScreenshotEvent;Ljava/util/function/Consumer;)V"

//after
@Inject(at = @At("TAIL"), method = {
    "method_22691(Lnet/minecraft/client/texture/NativeImage;Ljava/io/File;Lnet/neoforged/neoforge/client/event/ScreenshotEvent;Ljava/util/function/Consumer;)V",
    "lambda$grab$1(Lnet/minecraft/client/texture/NativeImage;Ljava/io/File;Lnet/neoforged/neoforge/client/event/ScreenshotEvent;Ljava/util/function/Consumer;)V"

Crash Log:
https://mclo.gs/ySZm3st