Skip to content

Commit

Permalink
1.18.2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Sep 15, 2024
1 parent d87d626 commit 46973f5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.events.GuiEventListener;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.contents.TranslatableContents;
import net.minecraft.network.chat.TranslatableComponent;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -23,13 +23,13 @@ public abstract class ModMenuEventHandlerVRMixin {
Button reportBugsButton = null;
for (GuiEventListener guiEventListener : screen.children()) {
if (guiEventListener instanceof Button button) {
if (button.getMessage().getContents() instanceof TranslatableContents contents
if (button.getMessage() instanceof TranslatableComponent contents
&& "modmenu.title".equals(contents.getKey())) {
modmenuButton = button;
} else if (button.getMessage().getContents() instanceof TranslatableContents contents
} else if (button.getMessage() instanceof TranslatableComponent contents
&& "vivecraft.gui.commands".equals(contents.getKey())) {
commandsButton = button;
} else if (button.getMessage().getContents() instanceof TranslatableContents contents
} else if (button.getMessage() instanceof TranslatableComponent contents
&& "menu.reportBugs".equals(contents.getKey())) {
reportBugsButton = button;
}
Expand Down

0 comments on commit 46973f5

Please sign in to comment.