mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-30 12:29:15 +00:00
拆分注入代码
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
package net.momirealms.craftengine.core.block;
|
||||
|
||||
public class StatePredicate {
|
||||
private static Object TRUE;
|
||||
private static Object FALSE;
|
||||
|
||||
public static void init(Object alwaysTrue, Object alwaysFalse) {
|
||||
TRUE = alwaysTrue;
|
||||
FALSE = alwaysFalse;
|
||||
}
|
||||
|
||||
public static Object alwaysTrue() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
public static Object alwaysFalse() {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.lang.reflect.Field;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
public class VersionHelper {
|
||||
// todo 在跨平台时候,将其设计到平台实现
|
||||
private static final Class<?> clazz$DetectedVersion = requireNonNull(
|
||||
ReflectionUtils.getClazz("net.minecraft.DetectedVersion", "net.minecraft.MinecraftVersion"));
|
||||
private static final Class<?> clazz$WorldVersion = requireNonNull(
|
||||
|
||||
Reference in New Issue
Block a user