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(HolderSet<Biome> biomes, Biome.Precipitation precipitation, int waterColor)
extends Record
implements BiomeModifier
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.neoforged.neoforge.common.world.BiomeModifierBiomeModifier.Phase
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe field for thebiomesrecord component.private final Biome.PrecipitationThe field for theprecipitationrecord component.private final intThe field for thewaterColorrecord component.Fields inherited from interface net.neoforged.neoforge.common.world.BiomeModifierDIRECT_CODEC, LIST_CODEC, REFERENCE_CODEC
- 
Constructor SummaryConstructorsConstructorDescriptionTestModifier(HolderSet<Biome> biomes, Biome.Precipitation precipitation, int waterColor) Creates an instance of aTestModifierrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionbiomes()Returns the value of thebiomesrecord component.com.mojang.serialization.Codec<? 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.Returns the value of theprecipitationrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thewaterColorrecord component.
- 
Field Details- 
biomesThe field for thebiomesrecord component.
- 
precipitationThe field for theprecipitationrecord component.
- 
waterColorprivate final int waterColorThe field for thewaterColorrecord component.
 
- 
- 
Constructor Details- 
TestModifierCreates an instance of aTestModifierrecord class.- Parameters:
- biomes- the value for the- biomesrecord component
- precipitation- the value for the- precipitationrecord component
- waterColor- the value for the- waterColorrecord component
 
 
- 
- 
Method Details- 
modifypublic 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 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- Specified by:
- codecin interface- BiomeModifier
- Returns:
- the codec which serializes and deserializes this biome modifier
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
biomesReturns the value of thebiomesrecord component.- Returns:
- the value of the biomesrecord component
 
- 
precipitationReturns the value of theprecipitationrecord component.- Returns:
- the value of the precipitationrecord component
 
- 
waterColorpublic int waterColor()Returns the value of thewaterColorrecord component.- Returns:
- the value of the waterColorrecord component
 
 
-