Record Class BiomeModifierSyncTest.TestModifier
java.lang.Object
java.lang.Record
net.neoforged.neoforge.debug.registry.BiomeModifierSyncTest.TestModifier
- All Implemented Interfaces:
BiomeModifier
- Enclosing class:
BiomeModifierSyncTest
public static record BiomeModifierSyncTest.TestModifier(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, 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
FieldsModifier and TypeFieldDescriptionprivate final net.minecraft.core.HolderSet
<net.minecraft.world.level.biome.Biome> The field for thebiomes
record component.private final int
The field for thewaterColor
record component.Fields inherited from interface net.neoforged.neoforge.common.world.BiomeModifier
DIRECT_CODEC, LIST_CODEC, REFERENCE_CODEC
-
Constructor Summary
ConstructorsConstructorDescriptionTestModifier
(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, int waterColor) Creates an instance of aTestModifier
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.HolderSet
<net.minecraft.world.level.biome.Biome> biomes()
Returns the value of thebiomes
record component.com.mojang.serialization.MapCodec
<? extends BiomeModifier> codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
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.final String
toString()
Returns a string representation of this record class.int
Returns the value of thewaterColor
record component.
-
Field Details
-
biomes
private final net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomesThe field for thebiomes
record component. -
waterColor
private final int waterColorThe field for thewaterColor
record component.
-
-
Constructor Details
-
TestModifier
public TestModifier(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, int waterColor) Creates an instance of aTestModifier
record class.- Parameters:
biomes
- the value for thebiomes
record componentwaterColor
- the value for thewaterColor
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 interfaceBiomeModifier
- 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:
codec
in interfaceBiomeModifier
- Returns:
- the codec which serializes and deserializes this biome modifier
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
biomes
public net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes()Returns the value of thebiomes
record component.- Returns:
- the value of the
biomes
record component
-
waterColor
public int waterColor()Returns the value of thewaterColor
record component.- Returns:
- the value of the
waterColor
record component
-