Interface BiomeModifier

All Known Implementing Classes:
BiomeModifiers.AddCarversBiomeModifier, BiomeModifiers.AddFeaturesBiomeModifier, BiomeModifiers.AddSpawnCostsBiomeModifier, BiomeModifiers.AddSpawnsBiomeModifier, BiomeModifiers.RemoveCarversBiomeModifier, BiomeModifiers.RemoveFeaturesBiomeModifier, BiomeModifiers.RemoveSpawnCostsBiomeModifier, BiomeModifiers.RemoveSpawnsBiomeModifier, BiomeModifierSyncTest.TestModifier, BiomeModifierTest.TestModifier, NoneBiomeModifier

public interface BiomeModifier
JSON-serializable biome modifier. Requires a Codec to deserialize biome modifiers from biome modifier jsons.

Biome modifier jsons have the following json format:

 {
   "type": "yourmod:yourserializer", // Indicates a registered biome modifier serializer
   // Additional fields can be specified here according to the codec
 }
 

Datapacks can also disable a biome modifier by overriding the json and using "type": "neoforge:none".

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<BiomeModifier>
    Codec for (de)serializing biome modifiers inline.
    static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<BiomeModifier>>
    Codec for referring to biome modifiers by id, list of id, or tags.
    static final com.mojang.serialization.Codec<net.minecraft.core.Holder<BiomeModifier>>
    Codec for referring to biome modifiers by id in other datapack registry files.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.MapCodec<? extends BiomeModifier>
     
    void
    modify(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, BiomeModifier.Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder)
    Modifies the information via the provided biome builder.
  • Field Details

    • DIRECT_CODEC

      static final com.mojang.serialization.Codec<BiomeModifier> DIRECT_CODEC
      Codec for (de)serializing biome modifiers inline. Mods can use this for data generation.
    • REFERENCE_CODEC

      static final com.mojang.serialization.Codec<net.minecraft.core.Holder<BiomeModifier>> REFERENCE_CODEC
      Codec for referring to biome modifiers by id in other datapack registry files. Can only be used with RegistryOps.
    • LIST_CODEC

      static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<BiomeModifier>> LIST_CODEC
      Codec for referring to biome modifiers by id, list of id, or tags. Can only be used with RegistryOps.
  • Method Details

    • modify

      void modify(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, BiomeModifier.Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder)
      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.
      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

      com.mojang.serialization.MapCodec<? extends BiomeModifier> codec()
      Returns:
      the codec which serializes and deserializes this biome modifier