28 lines
1.2 KiB
Java
28 lines
1.2 KiB
Java
package net.minecraft.data.worldgen;
|
|
|
|
import net.minecraft.core.HolderGetter;
|
|
import net.minecraft.core.registries.Registries;
|
|
import net.minecraft.data.worldgen.biome.OverworldBiomes;
|
|
import net.minecraft.resources.ResourceKey;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.world.level.biome.Biome;
|
|
import net.minecraft.world.level.levelgen.carver.ConfiguredWorldCarver;
|
|
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
|
|
|
public class WinterDropBiomes {
|
|
public static final ResourceKey<Biome> PALE_GARDEN = createKey("pale_garden");
|
|
|
|
public static ResourceKey<Biome> createKey(String name) {
|
|
return ResourceKey.create(Registries.BIOME, ResourceLocation.withDefaultNamespace(name));
|
|
}
|
|
|
|
public static void register(BootstrapContext<Biome> context, String name, Biome biome) {
|
|
context.register(createKey(name), biome);
|
|
}
|
|
|
|
public static void bootstrap(BootstrapContext<Biome> context) {
|
|
HolderGetter<PlacedFeature> holderGetter = context.lookup(Registries.PLACED_FEATURE);
|
|
HolderGetter<ConfiguredWorldCarver<?>> holderGetter2 = context.lookup(Registries.CONFIGURED_CARVER);
|
|
context.register(PALE_GARDEN, OverworldBiomes.darkForest(holderGetter, holderGetter2, true));
|
|
}
|
|
}
|