henkelmax / replay-voice-chat

A compatibility mod to record Simple Voice Chat with ReplayMod
MIT License
21 stars 9 forks source link

Crash on group create #17

Closed Bryan1029384756 closed 1 year ago

Bryan1029384756 commented 1 year ago

Bug description The mod crashes when creating a group in voice chat

Steps to reproduce the issue

  1. Join SinglePlayer or Multiplayer world
  2. Press G to create group and enter name and click create
  3. Crash

Expected behavior Not crash on group create

Log files https://gist.github.com/Bryan1029384756/e830058bc90e88dc91bd4c176d7db23a

Versions

Other mods N/A

They changed the code in 1.20.1 instead of GroupChatManagerMixin being

@Inject(method = "renderIcons", at = @At(value = "HEAD"), cancellable = true)
    private static void renderIcons(PoseStack matrixStack, CallbackInfo ci) {
        if (ReplayInterface.INSTANCE.isInReplayEditor) {
            ci.cancel();
        }
    }

it should be

@Inject(method = "renderIcons", at = @At(value = "HEAD"), cancellable = true)
    private static void renderIcons(GuiGraphics guiGraphics, CallbackInfo ci) {
        if (ReplayInterface.INSTANCE.isInReplayEditor) {
            ci.cancel();
        }
    }
henkelmax commented 1 year ago

Thank you for reporting this and also for proposing a solution!