-
Notifications
You must be signed in to change notification settings - Fork 2
BiomeListBuilder
BiomeListBuilder provides an interface to build lists of biomes with types and IDs - as well as overworld filtering.
Create a BiomeListBuilder via BiomeListBuilder.create()
When the builder is finished being configured, it can be converted to an array of Biome registry keys by the collect()
method.
Accepts a list of biome keys or biome types. These are added as "bonus", regardless of any type filters.
RegistryKey<Biome>[] biomes = BiomeListBuilder.create().extra(Biomes.FOREST).extra(BiomeTypes.HOT).collect();
Provides a list of types that a biome must have ALL of in order to be added to the list.
RegistryKey<Biome>[] biomes = BiomeListBuilder.create().withTypes(BiomeTypes.COLD, BiomeTypes.FOREST).collect();
Provides a list of types that a biome cannot have any of in order to be added to the list. Overrides With Types, but not extras.
RegistryKey<Biome>[] biomes = BiomeListBuilder.create().withTypes(BiomeTypes.FOREST).withoutTypes(BiomeTypes.COLD).collect();
Excludes a list of biomes from being added to the list, regardless of withTypes.
RegistryKey<Biome>[] biomes = BiomeListBuilder.create().withTypes(BiomeTypes.FOREST).withoutBiomes(Biome.FOREST_HILLS).collect();
Filters all biomes (except extras) to include the OVERWORLD type. If the biome does not have OVERWORLD, it will not be added to the list.
RegistryKey<Biome>[] biomes = BiomeListBuilder.create().withTypes(BiomeTypes.FOREST).onlyOverworld().collect();