Skip to content

Commit 7c8c2cc

Browse files
committed
*sigh*
1 parent ca9292c commit 7c8c2cc

File tree

1 file changed

+14
-2
lines changed
  • src/main/java/com/falsepattern/lib/internal

1 file changed

+14
-2
lines changed

src/main/java/com/falsepattern/lib/internal/Share.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,26 @@
2323

2424
import lombok.AccessLevel;
2525
import lombok.NoArgsConstructor;
26+
import lombok.val;
2627
import org.apache.logging.log4j.LogManager;
2728
import org.apache.logging.log4j.Logger;
2829

29-
import net.minecraft.launchwrapper.Launch;
30+
import net.minecraft.launchwrapper.LaunchClassLoader;
31+
32+
import java.io.IOException;
3033

3134
@NoArgsConstructor(access = AccessLevel.PRIVATE)
3235
public final class Share {
3336
public static final Logger LOG = LogManager.getLogger(Tags.MODNAME);
3437

35-
public static final boolean DEV_ENV = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
38+
public static final boolean DEV_ENV;
39+
40+
static {
41+
try {
42+
val bs = ((LaunchClassLoader) Share.class.getClassLoader()).getClassBytes("net.minecraft.world.World");
43+
DEV_ENV = bs != null;
44+
} catch (IOException e) {
45+
throw new RuntimeException(e);
46+
}
47+
}
3648
}

0 commit comments

Comments
 (0)