Interface BiomeModifier

All Known Implementing Classes:
ForgeBiomeModifiers.AddFeaturesBiomeModifier, ForgeBiomeModifiers.AddSpawnsBiomeModifier, ForgeBiomeModifiers.RemoveFeaturesBiomeModifier, ForgeBiomeModifiers.RemoveSpawnsBiomeModifier, 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": "forge:none".

  • 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<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<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

      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.Codec<? extends BiomeModifier> codec()
      Returns:
      the codec which serializes and deserializes this biome modifier