9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-23 08:59:27 +00:00

更新语言文件

This commit is contained in:
XiaoMoMi
2025-05-07 20:45:28 +08:00
parent e221c5a50b
commit c13f01c159
4 changed files with 11 additions and 17 deletions

View File

@@ -43,11 +43,11 @@ public class NumberProviders {
}
public static NumberProvider fromMap(Map<String, Object> map) {
String type = ResourceConfigUtils.requireNonEmptyStringOrThrow(map.get("type"), "warning.config.loot_table.number.missing_type");
String type = ResourceConfigUtils.requireNonEmptyStringOrThrow(map.get("type"), "warning.config.number.missing_type");
Key key = Key.withDefaultNamespace(type, Key.DEFAULT_NAMESPACE);
Factory<NumberProvider> factory = BuiltInRegistries.NUMBER_PROVIDER_FACTORY.getValue(key);
if (factory == null) {
throw new LocalizedResourceConfigException("warning.config.loot_table.number.invalid_type", type);
throw new LocalizedResourceConfigException("warning.config.number.invalid_type", type);
}
return factory.create(map);
}