use of org.spongepowered.common.interfaces.world.biome.IMixinBiome in project SpongeCommon by SpongePowered.
the class BiomeTypeRegistryModule method registerAdditional.
@AdditionalRegistration
public void registerAdditional() {
for (Biome biome : Biome.REGISTRY) {
if (biome != null && !this.biomeTypes.contains(biome)) {
String id = ((BiomeType) biome).getId();
if (id == null) {
ResourceLocation reg_id = Biome.REGISTRY.getNameForObject(biome);
((IMixinBiome) biome).setModId(reg_id.getResourceDomain());
id = reg_id.toString();
((IMixinBiome) biome).setId(id);
}
this.biomeTypes.add((BiomeType) biome);
this.catalogTypeMap.put(id, (BiomeType) biome);
}
}
// Re-map fields in case mods have changed vanilla world types
RegistryHelper.mapFields(BiomeTypes.class, provideCatalogMap());
}
use of org.spongepowered.common.interfaces.world.biome.IMixinBiome in project SpongeCommon by SpongePowered.
the class BiomeTypeRegistryModule method registerDefaults.
@Override
public void registerDefaults() {
for (Biome biome : Biome.REGISTRY) {
if (biome != null) {
String id = ((BiomeType) biome).getId();
if (id == null) {
ResourceLocation reg_id = Biome.REGISTRY.getNameForObject(biome);
((IMixinBiome) biome).setModId(reg_id.getResourceDomain());
id = reg_id.toString();
((IMixinBiome) biome).setId(id);
}
this.biomeTypes.add((BiomeType) biome);
this.catalogTypeMap.put(id, (BiomeType) biome);
}
}
}
Aggregations