Skip to content

BiomeListBuilder

itsmeow edited this page Jan 4, 2022 · 1 revision

About

BiomeListBuilder provides an interface to build lists of biomes with types and IDs - as well as overworld filtering.

Usage

Creation

Create a BiomeListBuilder via BiomeListBuilder.create()

Building

When the builder is finished being configured, it can be converted to an array of Biome registry keys by the collect() method.

Methods

Extra

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();

With Types

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();

Without Types

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();

Without Biomes

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();

Only Overworld

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();