Skip to content

Commit

Permalink
Fixed Redirect throwing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ScribbleTAS committed Oct 22, 2023
1 parent 95c7065 commit 6455551
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

Expand Down Expand Up @@ -50,7 +49,7 @@ public void inject_loadWorld(CallbackInfo ci) {
@Shadow
private GuiScreen currentScreen;

@Redirect(method = "displayGuiScreen", at = @At(value = "FIELD", target = "currentScreen:Lnet/minecraft/client/gui/GuiScreen;", opcode = Opcodes.PUTFIELD))
@Redirect(method = "displayGuiScreen", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Minecraft;currentScreen:Lnet/minecraft/client/gui/GuiScreen;", opcode = Opcodes.PUTFIELD))
public void modify_displayGuiScreen(Minecraft mc, GuiScreen guiScreen) {
guiScreen = EventOpenGui.fireOpenGuiEvent(guiScreen);
currentScreen = guiScreen;
Expand Down

0 comments on commit 6455551

Please sign in to comment.