mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
add ConfigPack#getConfigTypeRegistry
This commit is contained in:
@@ -342,4 +342,14 @@ public class ConfigPack implements LoaderRegistrar {
|
|||||||
public WorldConfig toWorldConfig(TerraWorld world){
|
public WorldConfig toWorldConfig(TerraWorld world){
|
||||||
return new WorldConfig(world, this, main);
|
return new WorldConfig(world, this, main);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CheckedRegistry<ConfigType<?>> getConfigTypeRegistry() {
|
||||||
|
return new CheckedRegistry<ConfigType<?>>(configTypeRegistry) {
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public void addUnchecked(String identifier, ConfigType<?> value) {
|
||||||
|
if(contains(identifier)) throw new UnsupportedOperationException("Cannot override values in ConfigTypeRegistry!");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user