9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 12:29:15 +00:00

修复属性

This commit is contained in:
XiaoMoMi
2025-07-02 02:51:41 +08:00
parent 0752737888
commit 37505c1575
20 changed files with 306 additions and 139 deletions

View File

@@ -3595,6 +3595,10 @@ public final class CoreReflections {
);
public static final Constructor<?> constructor$TrimPattern = requireNonNull(
VersionHelper.isOrAbove1_21_5() ?
ReflectionUtils.getConstructor(clazz$TrimPattern, clazz$ResourceLocation, clazz$Component, boolean.class) :
VersionHelper.isOrAbove1_20_2() ?
ReflectionUtils.getConstructor(clazz$TrimPattern, clazz$ResourceLocation, clazz$Holder, clazz$Component, boolean.class) :
ReflectionUtils.getConstructor(clazz$TrimPattern, clazz$ResourceLocation, clazz$Holder, clazz$Component)
);
}

View File

@@ -12,7 +12,7 @@ public final class MAttributeHolders {
private static Object getById(String id) {
Object rl = FastNMS.INSTANCE.method$ResourceLocation$fromNamespaceAndPath("minecraft", id);
return FastNMS.INSTANCE.method$Registry$getValue(MBuiltInRegistries.ATTRIBUTE, rl);
return FastNMS.INSTANCE.method$Registry$getHolderByResourceLocation(MBuiltInRegistries.ATTRIBUTE, rl);
}
static {