use of ru.bclib.world.generator.BCLibEndBiomeSource in project BCLib by paulevsGitch.
the class DimensionTypeMixin method bclib_updateDimensions.
@Inject(method = "defaultDimensions(Lnet/minecraft/core/RegistryAccess;JZ)Lnet/minecraft/core/MappedRegistry;", locals = LocalCapture.CAPTURE_FAILHARD, at = @At("TAIL"))
private static void bclib_updateDimensions(RegistryAccess registryAccess, long seed, boolean bl, CallbackInfoReturnable<MappedRegistry<LevelStem>> info, MappedRegistry<LevelStem> mappedRegistry, Registry<DimensionType> registry, Registry<Biome> biomeRegistry, Registry<NoiseGeneratorSettings> noiseSettingsRegistry, Registry<NormalNoise.NoiseParameters> noiseParamRegistry) {
int id = mappedRegistry.getId(mappedRegistry.get(LevelStem.NETHER));
mappedRegistry.registerOrOverride(OptionalInt.of(id), LevelStem.NETHER, new LevelStem(() -> registry.getOrThrow(DimensionType.NETHER_LOCATION), new NoiseBasedChunkGenerator(noiseParamRegistry, new BCLibNetherBiomeSource(biomeRegistry, seed), seed, () -> noiseSettingsRegistry.getOrThrow(NoiseGeneratorSettings.NETHER))), Lifecycle.stable());
id = mappedRegistry.getId(mappedRegistry.get(LevelStem.END));
mappedRegistry.registerOrOverride(OptionalInt.of(id), LevelStem.END, new LevelStem(() -> registry.getOrThrow(DimensionType.END_LOCATION), new NoiseBasedChunkGenerator(noiseParamRegistry, new BCLibEndBiomeSource(biomeRegistry, seed), seed, () -> noiseSettingsRegistry.getOrThrow(NoiseGeneratorSettings.END))), Lifecycle.stable());
}
Aggregations