Class BiomeSpecificWeightedGeneList.Builder
java.lang.Object
com.hexagram2021.chromosomelib.registry.IWeightedGeneList.Builder
com.hexagram2021.chromosomelib.registry.BiomeSpecificWeightedGeneList.Builder
- Enclosing class:
- BiomeSpecificWeightedGeneList
Builder for BiomeSpecificWeightedGeneList.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>,com.google.common.collect.ImmutableList.Builder<IWeightedGeneList.Entry>> Biome-specific gene lists.Fields inherited from class com.hexagram2021.chromosomelib.registry.IWeightedGeneList.Builder
shadowed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, IWeightedGeneList.Entry... elements) Add some genes to a biome to the builder.add(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, net.minecraft.core.Holder<Gene> gene, int weight) Add a gene to a biome to the builder.add(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, IWeightedGeneList.Entry... elements) Add some genes to some biomes to the builder.add(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, net.minecraft.core.Holder<Gene> gene, int weight) Add a gene to some biomes to the builder.addAll(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, Iterable<IWeightedGeneList.Entry> elements) Add all genes from a collection to a biome to the builder.addAll(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, Iterator<IWeightedGeneList.Entry> elements) Add all genes from a collection to a biome to the builder.addAll(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, Iterable<IWeightedGeneList.Entry> elements) Add all genes from a collection to some biomes to the builder.addAll(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, Iterator<IWeightedGeneList.Entry> elements) Add all genes from a collection to some biomes to the builder.Methods inherited from class com.hexagram2021.chromosomelib.registry.IWeightedGeneList.Builder
add, add, addAll, addAll
-
Field Details
-
biomeSpecificShadowed
protected final Map<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>,com.google.common.collect.ImmutableList.Builder<IWeightedGeneList.Entry>> biomeSpecificShadowedBiome-specific gene lists.
-
-
Constructor Details
-
Builder
- Parameters:
factory- factory for creating a weighted gene list
-
-
Method Details
-
add
public BiomeSpecificWeightedGeneList.Builder add(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, net.minecraft.core.Holder<Gene> gene, int weight) Add a gene to a biome to the builder.- Parameters:
biome- the biomegene- the geneweight- the weight- Returns:
- this builder
-
add
public BiomeSpecificWeightedGeneList.Builder add(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, IWeightedGeneList.Entry... elements) Add some genes to a biome to the builder.- Parameters:
biome- the biomeelements- elements- Returns:
- this builder
-
addAll
public BiomeSpecificWeightedGeneList.Builder addAll(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, Iterable<IWeightedGeneList.Entry> elements) Add all genes from a collection to a biome to the builder.- Parameters:
biome- the biomeelements- a collection- Returns:
- this builder
-
addAll
public BiomeSpecificWeightedGeneList.Builder addAll(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, Iterator<IWeightedGeneList.Entry> elements) Add all genes from a collection to a biome to the builder.- Parameters:
biome- the biomeelements- a collection- Returns:
- this builder
-
add
public BiomeSpecificWeightedGeneList.Builder add(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, net.minecraft.core.Holder<Gene> gene, int weight) Add a gene to some biomes to the builder.- Parameters:
biomes- a set of biomesgene- the geneweight- the weight- Returns:
- this builder
-
add
public BiomeSpecificWeightedGeneList.Builder add(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, IWeightedGeneList.Entry... elements) Add some genes to some biomes to the builder.- Parameters:
biomes- a set of biomeselements- elements- Returns:
- this builder
-
addAll
public BiomeSpecificWeightedGeneList.Builder addAll(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, Iterable<IWeightedGeneList.Entry> elements) Add all genes from a collection to some biomes to the builder.- Parameters:
biomes- a set of biomeselements- a collection- Returns:
- this builder
-
addAll
public BiomeSpecificWeightedGeneList.Builder addAll(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, Iterator<IWeightedGeneList.Entry> elements) Add all genes from a collection to some biomes to the builder.- Parameters:
biomes- a set of biomeselements- a collection- Returns:
- this builder
-