Record Class BiomeModifiers.AddCarversBiomeModifier
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.world.BiomeModifiers.AddCarversBiomeModifier
- Record Components:
biomes
- Biomes to add features to.carvers
- ConfiguredWorldCarvers to add to biomes.step
- Carving step to run features in.
- All Implemented Interfaces:
BiomeModifier
- Enclosing class:
BiomeModifiers
public static record BiomeModifiers.AddCarversBiomeModifier(HolderSet<Biome> biomes, HolderSet<ConfiguredWorldCarver<?>> carvers, GenerationStep.Carving step)
extends Record
implements BiomeModifier
Stock biome modifier that adds carvers to biomes (from the configured_carver json registry). Has the following json format:
{ "type": "neoforge:add_carvers", // required "biomes": "#namespace:your_biome_tag" // accepts a biome id, [list of biome ids], or #namespace:biome_tag "carvers": "namespace:your_carver", // accepts a configured carver id, [list of configured carver ids], or #namespace:carver_tag "step": "air" // Carving step, can be "air" or "liquid" }
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.neoforged.neoforge.common.world.BiomeModifier
BiomeModifier.Phase
-
Field Summary
Modifier and TypeFieldDescriptionThe field for thebiomes
record component.private final HolderSet
<ConfiguredWorldCarver<?>> The field for thecarvers
record component.private final GenerationStep.Carving
The field for thestep
record component.Fields inherited from interface net.neoforged.neoforge.common.world.BiomeModifier
DIRECT_CODEC, LIST_CODEC, REFERENCE_CODEC
-
Constructor Summary
ConstructorDescriptionAddCarversBiomeModifier
(HolderSet<Biome> biomes, HolderSet<ConfiguredWorldCarver<?>> carvers, GenerationStep.Carving step) Creates an instance of aAddCarversBiomeModifier
record class. -
Method Summary
Modifier and TypeMethodDescriptionbiomes()
Returns the value of thebiomes
record component.carvers()
Returns the value of thecarvers
record component.com.mojang.serialization.MapCodec
<? extends BiomeModifier> codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.void
modify
(Holder<Biome> biome, BiomeModifier.Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder) Modifies the information via the provided biome builder.step()
Returns the value of thestep
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
AddCarversBiomeModifier
public AddCarversBiomeModifier(HolderSet<Biome> biomes, HolderSet<ConfiguredWorldCarver<?>> carvers, GenerationStep.Carving step) Creates an instance of aAddCarversBiomeModifier
record class.
-
-
Method Details
-
modify
public void modify(Holder<Biome> biome, BiomeModifier.Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder) Description copied from interface:BiomeModifier
Modifies 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:
modify
in interfaceBiomeModifier
- 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:
codec
in interfaceBiomeModifier
- Returns:
- the codec which serializes and deserializes this biome modifier
-
toString
Returns 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. -
hashCode
public 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. -
equals
Indicates 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)
. -
biomes
Returns the value of thebiomes
record component.- Returns:
- the value of the
biomes
record component
-
carvers
Returns the value of thecarvers
record component.- Returns:
- the value of the
carvers
record component
-
step
Returns the value of thestep
record component.- Returns:
- the value of the
step
record component
-