mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
Feat: add LaunchWrapper check , fix EventKey
This commit is contained in:
1 parent
b70cea6a09
commit
fa1abcb59d
4 files changed
+12
-1
No files matched your search
@@ -49,4 +49,8 @@ public class Detector {
|
||||
|
||||
return DetectorType.UNKNOWN;
|
||||
}
|
||||
|
||||
public static boolean isLaunchWrapper() {
|
||||
return classExists("net.minecraft.launchwrapper.Launch");
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,11 @@ public class Loader {
|
||||
throw new IllegalStateException("Cannot find Minecraft client thread");
|
||||
}
|
||||
|
||||
// Check if LaunchWrapper exists
|
||||
if (Detector.isLaunchWrapper()){
|
||||
System.out.println("LaunchWrapper detected");
|
||||
}
|
||||
|
||||
// Get Minecraft ClassLoader
|
||||
minecraftClassLoader = clientThread.getContextClassLoader();
|
||||
System.out.println("Minecraft ClassLoader: " + minecraftClassLoader);
|
||||
|
||||
@@ -27,6 +27,7 @@ public class OrangeX {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
System.out.println("OrangeX stopping...");
|
||||
System.out.println("OrangeX stopped.");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package cn.xiaozhou233.orangex.event.impl;
|
||||
|
||||
import cn.xiaozhou233.orangex.event.Event;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class EventKey {
|
||||
public class EventKey extends Event {
|
||||
private final int key;
|
||||
}
|
||||
Reference in new issue
Block a user