Record Class BiomeModifiers.RemoveCarversBiomeModifier
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.world.BiomeModifiers.RemoveCarversBiomeModifier
- Record Components:
biomes- Biomes to remove carvers from.carvers- ConfiguredWorldCarvers to remove from biomes.
- All Implemented Interfaces:
BiomeModifier
- Enclosing class:
BiomeModifiers
public static record BiomeModifiers.RemoveCarversBiomeModifier(HolderSet<Biome> biomes, HolderSet<ConfiguredWorldCarver<?>> carvers)
extends Record
implements BiomeModifier
Stock biome modifier that removes carvers from biomes. Has the following json format:
{
"type": "neoforge:remove_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
"steps": "air" OR "liquid" OR ["air", "liquid"] // one or more carving steps; optional field, defaults to all steps if not specified
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface BiomeModifier
BiomeModifier.Phase -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thebiomesrecord component.private final HolderSet<ConfiguredWorldCarver<?>> The field for thecarversrecord component.Fields inherited from interface BiomeModifier
DIRECT_CODEC, LIST_CODEC, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionRemoveCarversBiomeModifier(HolderSet<Biome> biomes, HolderSet<ConfiguredWorldCarver<?>> carvers) Creates an instance of aRemoveCarversBiomeModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbiomes()Returns the value of thebiomesrecord component.carvers()Returns the value of thecarversrecord component.com.mojang.serialization.MapCodec<? extends BiomeModifier> codec()final booleanIndicates whether some other object is "equal to" this one.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.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
biomes
-
carvers
The field for thecarversrecord component.
-
-
Constructor Details
-
RemoveCarversBiomeModifier
-
-
Method Details
-
modify
public 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 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:
codecin interfaceBiomeModifier- Returns:
- the codec which serializes and deserializes this biome modifier
-
toString
-
hashCode
-
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
-
carvers
-