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.
steps - Carving steps to remove carvers from. Can be
All Implemented Interfaces:
BiomeModifier
Enclosing class:
BiomeModifiers

public static record BiomeModifiers.RemoveCarversBiomeModifier(HolderSet<Biome> biomes, HolderSet<ConfiguredWorldCarver<?>> carvers, Set<GenerationStep.Carving> steps) 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
 }
 
  • Field Details

  • Constructor Details

  • Method Details

    • allSteps

      Creates a modifier that removes the given features from all decoration steps in the given biomes.
      Parameters:
      biomes - Biomes to remove features from.
      carvers - PlacedFeatures to remove from biomes.
    • 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 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

      public com.mojang.serialization.MapCodec<? extends BiomeModifier> codec()
      Specified by:
      codec in interface BiomeModifier
      Returns:
      the codec which serializes and deserializes this biome modifier
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • biomes

      public HolderSet<Biome> biomes()
      Returns the value of the biomes record component.
      Returns:
      the value of the biomes record component
    • carvers

      public HolderSet<ConfiguredWorldCarver<?>> carvers()
      Returns the value of the carvers record component.
      Returns:
      the value of the carvers record component
    • steps

      public Set<GenerationStep.Carving> steps()
      Returns the value of the steps record component.
      Returns:
      the value of the steps record component