Record Class BiomeModifierTest.TestModifier

java.lang.Object
java.lang.Record
net.neoforged.neoforge.oldtest.world.BiomeModifierTest.TestModifier
All Implemented Interfaces:
BiomeModifier
Enclosing class:
BiomeModifierTest

public static record BiomeModifierTest.TestModifier(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, net.minecraft.world.level.biome.Biome.Precipitation precipitation, int waterColor) extends Record implements BiomeModifier
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.neoforged.neoforge.common.world.BiomeModifier

    BiomeModifier.Phase
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome>
    The field for the biomes record component.
    private final net.minecraft.world.level.biome.Biome.Precipitation
    The field for the precipitation record component.
    private final int
    The field for the waterColor record component.

    Fields inherited from interface net.neoforged.neoforge.common.world.BiomeModifier

    DIRECT_CODEC, LIST_CODEC, REFERENCE_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestModifier(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, net.minecraft.world.level.biome.Biome.Precipitation precipitation, int waterColor)
    Creates an instance of a TestModifier record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome>
    Returns the value of the biomes record component.
    com.mojang.serialization.MapCodec<? extends BiomeModifier>
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    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.
    net.minecraft.world.level.biome.Biome.Precipitation
    Returns the value of the precipitation record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the waterColor record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • biomes

      private final net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes
      The field for the biomes record component.
    • precipitation

      private final net.minecraft.world.level.biome.Biome.Precipitation precipitation
      The field for the precipitation record component.
    • waterColor

      private final int waterColor
      The field for the waterColor record component.
  • Constructor Details

    • TestModifier

      public TestModifier(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, net.minecraft.world.level.biome.Biome.Precipitation precipitation, int waterColor)
      Creates an instance of a TestModifier record class.
      Parameters:
      biomes - the value for the biomes record component
      precipitation - the value for the precipitation record component
      waterColor - the value for the waterColor record component
  • Method Details

    • modify

      public void modify(net.minecraft.core.Holder<net.minecraft.world.level.biome.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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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 net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes()
      Returns the value of the biomes record component.
      Returns:
      the value of the biomes record component
    • precipitation

      public net.minecraft.world.level.biome.Biome.Precipitation precipitation()
      Returns the value of the precipitation record component.
      Returns:
      the value of the precipitation record component
    • waterColor

      public int waterColor()
      Returns the value of the waterColor record component.
      Returns:
      the value of the waterColor record component