From f47064b5ed44875dbf2dd44c18de079c760b10d8 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Mon, 6 Feb 2023 13:53:08 +0900 Subject: - Fix parallel universe not working - Fix dg not unloading properly Signed-off-by: syeyoung --- mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod/src/main/java/kr') diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java index 509fbd79..e7eb4bd6 100755 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java @@ -261,6 +261,10 @@ public class DungeonsGuide implements DGInterface { Minecraft.getMinecraft().refreshResources(); + + // Fix Parallel universe not working when player joins hypickle before dg loads + if (Minecraft.getMinecraft().getNetHandler() != null) + Minecraft.getMinecraft().getNetHandler().getNetworkManager().channel().pipeline().addBefore("packet_handler", "dg_packet_handler", packetInjector); } // hotswap fails in dev env due to intellij auto log collection or smth. it holds ref to stacktrace. @@ -312,7 +316,7 @@ public class DungeonsGuide implements DGInterface { } - Set commands = ReflectionHelper.getPrivateValue(CommandHandler.class, ClientCommandHandler.instance, "commandSet"); + Set commands = ReflectionHelper.getPrivateValue(CommandHandler.class, ClientCommandHandler.instance, "commandSet","field_71561_b","field_6467","c"); for (ICommand registeredCommand : registeredCommands) { ClientCommandHandler.instance.getCommands().remove(registeredCommand.getCommandName()); -- cgit