Package net.minecraftforge.common.world
Record Class ForgeBiomeModifiers.AddFeaturesBiomeModifier
java.lang.Object
java.lang.Record
net.minecraftforge.common.world.ForgeBiomeModifiers.AddFeaturesBiomeModifier
- Record Components:
- biomes- Biomes to add features to.
- features- PlacedFeatures to add to biomes.
- step- Decoration step to run features in.
- All Implemented Interfaces:
- BiomeModifier
- Enclosing class:
- ForgeBiomeModifiers
public static record ForgeBiomeModifiers.AddFeaturesBiomeModifier(HolderSet<Biome> biomes, HolderSet<PlacedFeature> features, GenerationStep.Decoration step)
extends Record
implements BiomeModifier
Stock biome modifier that adds features to biomes. Has the following json format:
 {
   "type": "forge:add_features", // required
   "biomes": "#namespace:your_biome_tag" // accepts a biome id, [list of biome ids], or #namespace:biome_tag
   "features": "namespace:your_feature", // accepts a placed feature id, [list of placed feature ids], or #namespace:feature_tag
   "step": "underground_ores" // accepts a Decoration enum name
 }
 
 Be wary of using this to add vanilla PlacedFeatures to biomes, as doing so may cause a feature cycle violation.
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraftforge.common.world.BiomeModifierBiomeModifier.Phase
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe field for thebiomesrecord component.static final com.mojang.serialization.Codec<ForgeBiomeModifiers.AddFeaturesBiomeModifier>private final HolderSet<PlacedFeature>The field for thefeaturesrecord component.private final GenerationStep.DecorationThe field for thesteprecord component.Fields inherited from interface net.minecraftforge.common.world.BiomeModifierDIRECT_CODEC, LIST_CODEC, REFERENCE_CODEC
- 
Constructor SummaryConstructorsConstructorDescriptionAddFeaturesBiomeModifier(HolderSet<Biome> biomes, HolderSet<PlacedFeature> features, GenerationStep.Decoration step) Creates an instance of aAddFeaturesBiomeModifierrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionbiomes()Returns the value of thebiomesrecord component.com.mojang.serialization.Codec<? extends BiomeModifier>codec()final booleanIndicates whether some other object is "equal to" this one.features()Returns the value of thefeaturesrecord component.final inthashCode()Returns a hash code value for this object.voidmodify(Holder<Biome> biome, BiomeModifier.Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder) Modifies the information via the provided biome builder.step()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
biomesThe field for thebiomesrecord component.
- 
featuresThe field for thefeaturesrecord component.
- 
stepThe field for thesteprecord component.
- 
CODECpublic static final com.mojang.serialization.Codec<ForgeBiomeModifiers.AddFeaturesBiomeModifier> CODEC
 
- 
- 
Constructor Details- 
AddFeaturesBiomeModifierpublic AddFeaturesBiomeModifier(HolderSet<Biome> biomes, HolderSet<PlacedFeature> features, GenerationStep.Decoration step) Creates an instance of aAddFeaturesBiomeModifierrecord class.
 
- 
- 
Method Details- 
modifypublic void modify(Holder<Biome> biome, BiomeModifier.Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder) Description copied from interface:BiomeModifierModifies the information via the provided biome builder. Allows mob spawns and world-gen features to be added or removed, and climate and client effects to be modified.- Specified by:
- modifyin interface- BiomeModifier
- Parameters:
- biome- the named biome being modified (with original data readable).
- phase- biome modification phase. Biome modifiers apply in each phase in order of the enum constants.
- builder- mutable biome info builder. Apply changes to this.
 
- 
codec- Specified by:
- codecin interface- BiomeModifier
- Returns:
- the codec which serializes and deserializes this biome modifier
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
- 
biomesReturns the value of thebiomesrecord component.- Returns:
- the value of the biomesrecord component
 
- 
featuresReturns the value of thefeaturesrecord component.- Returns:
- the value of the featuresrecord component
 
- 
stepReturns the value of thesteprecord component.- Returns:
- the value of the steprecord component
 
 
-