mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 09:59:20 +00:00
fix(core): 修正错误的染色盔甲配置
This commit is contained in:
@@ -3671,11 +3671,12 @@ public final class CoreReflections {
|
||||
// 1.20.5+
|
||||
public static final Field field$ItemStack$CODEC = ReflectionUtils.getDeclaredField(clazz$ItemStack, "CODEC", "b");
|
||||
|
||||
public static final Codec<Object> instance$ItemStack$CODEC;
|
||||
public static final Codec<Object> instance$ItemStack$CODEC = getItemStack$CODEC();
|
||||
|
||||
static {
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Codec<Object> getItemStack$CODEC() {
|
||||
try {
|
||||
instance$ItemStack$CODEC = VersionHelper.isOrAbove1_20_5() ? (Codec<Object>) field$ItemStack$CODEC.get(null) : null;
|
||||
return VersionHelper.isOrAbove1_20_5() ? (Codec<Object>) field$ItemStack$CODEC.get(null) : null;
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new ReflectionInitException("Failed to init ItemStack$CODEC", e);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class ComponentBasedEquipment extends AbstractEquipment implements Suppli
|
||||
return new DyeableData(ResourceConfigUtils.getAsInt(data.get("color-when-undyed"), "color-when-undyed"));
|
||||
}
|
||||
}
|
||||
return new DyeableData(null);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user