Search in sources :

Example 1 with TheEndBiomeSource

use of net.minecraft.world.level.biome.TheEndBiomeSource in project SkyblockBuilder by MelanX.

the class VoidWorldType method defaultEndGenerator.

private static ChunkGenerator defaultEndGenerator(RegistryAccess dynamicRegistries, long seed) {
    Registry<NoiseGeneratorSettings> noiseGeneratorSettings = dynamicRegistries.registryOrThrow(Registry.NOISE_GENERATOR_SETTINGS_REGISTRY);
    Registry<StructureSet> structureSets = dynamicRegistries.registryOrThrow(Registry.STRUCTURE_SET_REGISTRY);
    Registry<NormalNoise.NoiseParameters> noises = dynamicRegistries.registryOrThrow(Registry.NOISE_REGISTRY);
    TheEndBiomeSource biomeSource = new TheEndBiomeSource(dynamicRegistries.registryOrThrow(Registry.BIOME_REGISTRY), seed);
    Holder<NoiseGeneratorSettings> settings = noiseGeneratorSettings.getOrCreateHolder(NoiseGeneratorSettings.END);
    return new NoiseBasedChunkGenerator(structureSets, noises, biomeSource, seed, settings);
}
Also used : TheEndBiomeSource(net.minecraft.world.level.biome.TheEndBiomeSource) StructureSet(net.minecraft.world.level.levelgen.structure.StructureSet) SkyblockNoiseBasedChunkGenerator(de.melanx.skyblockbuilder.world.chunkgenerators.SkyblockNoiseBasedChunkGenerator) NoiseBasedChunkGenerator(net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator) NoiseGeneratorSettings(net.minecraft.world.level.levelgen.NoiseGeneratorSettings)

Example 2 with TheEndBiomeSource

use of net.minecraft.world.level.biome.TheEndBiomeSource in project SkyblockBuilder by MelanX.

the class VoidWorldType method endChunkGenerator.

private static ChunkGenerator endChunkGenerator(RegistryAccess dynamicRegistries, Registry<StructureSet> structureSets, Registry<NormalNoise.NoiseParameters> noises, Registry<Biome> biomeRegistry, Registry<NoiseGeneratorSettings> dimensionSettingsRegistry, long seed) {
    TheEndBiomeSource biomeSource = (TheEndBiomeSource) BiomeSourceConverter.customBiomeSource(Level.END, dynamicRegistries, new TheEndBiomeSource(biomeRegistry, seed));
    Holder<NoiseGeneratorSettings> settings = dimensionSettingsRegistry.getOrCreateHolder(NoiseGeneratorSettings.END);
    return new SkyblockEndChunkGenerator(structureSets, noises, biomeSource, seed, settings, Level.END);
}
Also used : TheEndBiomeSource(net.minecraft.world.level.biome.TheEndBiomeSource) SkyblockEndChunkGenerator(de.melanx.skyblockbuilder.world.chunkgenerators.SkyblockEndChunkGenerator) NoiseGeneratorSettings(net.minecraft.world.level.levelgen.NoiseGeneratorSettings)

Aggregations

TheEndBiomeSource (net.minecraft.world.level.biome.TheEndBiomeSource)2 NoiseGeneratorSettings (net.minecraft.world.level.levelgen.NoiseGeneratorSettings)2 SkyblockEndChunkGenerator (de.melanx.skyblockbuilder.world.chunkgenerators.SkyblockEndChunkGenerator)1 SkyblockNoiseBasedChunkGenerator (de.melanx.skyblockbuilder.world.chunkgenerators.SkyblockNoiseBasedChunkGenerator)1 NoiseBasedChunkGenerator (net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator)1 StructureSet (net.minecraft.world.level.levelgen.structure.StructureSet)1