make dev env detection more reliable

This commit is contained in:
FalsePattern committed 2022-09-25 14:18:15 +02:00
1 parent dc27fceefa
commit 0af5c94b4b
1 file changed
+2 -2
@@ -27,7 +27,7 @@ import lombok.val;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.minecraft.launchwrapper.LaunchClassLoader;
import net.minecraft.launchwrapper.Launch;
import java.io.IOException;
@@ -39,7 +39,7 @@ public final class Share {
static {
try {
val bs = ((LaunchClassLoader) Share.class.getClassLoader()).getClassBytes("net.minecraft.world.World");
val bs = Launch.classLoader.getClassBytes("net.minecraft.world.World");
DEV_ENV = bs != null;
} catch (IOException e) {
throw new RuntimeException(e);