fix structure completer

This commit is contained in:
dfsek 2021-05-09 22:34:44 -07:00
parent 97aa9d9a91
commit 77bb04e91f
2 changed files with 5 additions and 2 deletions

View File

@ -193,6 +193,10 @@ public class ConfigPack implements LoaderRegistrar {
registryMap.forEach((clazz, pair) -> pair.getLeft().getDeadEntries().forEach((id, value) -> main.getDebugLogger().warn("Dead entry in '" + clazz + "' registry: '" + id + "'")));
}
protected Map<Class<?>, ImmutablePair<OpenRegistry<?>, CheckedRegistry<?>>> getRegistryMap() {
return registryMap;
}
@SuppressWarnings({"unchecked", "rawtypes"})
private void load(long start, TerraPlugin main) throws ConfigException {
main.getEventManager().callEvent(new ConfigPackPreLoadEvent(this));

View File

@ -31,8 +31,7 @@ public class WorldConfig {
this.pack = pack;
this.samplerCache = new SamplerCache(main, world);
pack.getConfigTypeRegistry().forEach(configType -> registryMap.put(configType.getTypeClass(), new LockedRegistry<>(pack.getRegistry(configType.getTypeClass()))));
pack.getRegistryMap().forEach((clazz, pair) -> registryMap.put(clazz, new LockedRegistry<>(pair.getLeft())));
OpenRegistry<TerraBiome> biomeOpenRegistry = new OpenRegistry<>();
pack.getRegistry(BiomeBuilder.class).forEach((id, biome) -> biomeOpenRegistry.add(id, biome.apply(world.getWorld().getSeed())));