aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.gradle2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/e.java19
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java2
3 files changed, 20 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index 487874f4..37d6059a 100755
--- a/build.gradle
+++ b/build.gradle
@@ -103,6 +103,8 @@ processResources
}
shadowJar {
+ relocate "org.java_websocket", "kr.syeyoung.org.java_websocket"
+
dependencies {
include(dependency("org.java-websocket:Java-WebSocket:1.5.1"))
include(dependency("org.slf4j:slf4j-api:1.7.25"))
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/e.java b/src/main/java/kr/syeyoung/dungeonsguide/e.java
index a8d76c49..3855a5d1 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/e.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/e.java
@@ -1,5 +1,6 @@
package kr.syeyoung.dungeonsguide;
+import com.google.common.collect.Sets;
import kr.syeyoung.dungeonsguide.commands.*;
import kr.syeyoung.dungeonsguide.config.Config;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry;
@@ -17,16 +18,21 @@ import kr.syeyoung.dungeonsguide.utils.AhUtils;
import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraft.command.ICommand;
+import net.minecraft.launchwrapper.LaunchClassLoader;
+import net.minecraft.launchwrapper.LogWrapper;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
+import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import net.minecraftforge.fml.common.ProgressManager;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
+import net.minecraftforge.fml.relauncher.ReflectionHelper;
import org.apache.commons.io.IOUtils;
+import org.apache.logging.log4j.LogManager;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
@@ -75,7 +81,16 @@ public class e implements c, CloseListener {
public void init(FMLInitializationEvent event) {
ProgressManager.ProgressBar progressbar = ProgressManager.push("DungeonsGuide", 4);
-
+ try {
+ Set<String> invalid = ReflectionHelper.getPrivateValue(LaunchClassLoader.class, (LaunchClassLoader) a.class.getClassLoader(), "invalidClasses");
+ ((LaunchClassLoader)a.class.getClassLoader()).clearNegativeEntries(Sets.newHashSet("org.slf4j.LoggerFactory"));
+ for (String s : invalid) {
+ System.out.println(s+" in invalid");
+ }
+ invalid.clear();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
progressbar.step("Registering Events & Commands");
dungeonsGuide = this;
@@ -110,8 +125,6 @@ public class e implements c, CloseListener {
}
Keybinds.register();
-
-
progressbar.step("Opening connection");
try {
stompConnection = new StompClient(new URI(stompURL), authenticator.c(), this);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java
index e26d589b..6840788f 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java
@@ -69,6 +69,8 @@ public class FeatureSimonSaysSolver extends SimpleFeature implements WorldRender
@Override
public void onInteract(PlayerInteractEvent event) {
+ if (!isEnabled()) return;
+
DungeonContext dc = ss.getContext();
if (dc == null) return;
if (!(dc.getBossfightProcessor() instanceof BossfightProcessorNecron)) return;