Record Class AddEntityToSameBiomesModifier
java.lang.Object
java.lang.Record
com.mrbysco.camocreepers.modifier.AddEntityToSameBiomesModifier
- All Implemented Interfaces:
net.neoforged.neoforge.common.world.BiomeModifier
public record AddEntityToSameBiomesModifier(net.minecraft.world.entity.EntityType<?> originalType, net.minecraft.world.entity.EntityType<?> newType, int weight, int minGroup, int maxGroup)
extends Record
implements net.neoforged.neoforge.common.world.BiomeModifier
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.neoforged.neoforge.common.world.BiomeModifier
net.neoforged.neoforge.common.world.BiomeModifier.Phase -
Field Summary
Fields inherited from interface net.neoforged.neoforge.common.world.BiomeModifier
DIRECT_CODEC, LIST_CODEC, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAddEntityToSameBiomesModifier(net.minecraft.world.entity.EntityType<?> originalType, net.minecraft.world.entity.EntityType<?> newType, int weight, int minGroup, int maxGroup) Creates an instance of aAddEntityToSameBiomesModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends net.neoforged.neoforge.common.world.BiomeModifier> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxGroup()Returns the value of themaxGrouprecord component.intminGroup()Returns the value of theminGrouprecord component.voidmodify(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, net.neoforged.neoforge.common.world.BiomeModifier.Phase phase, net.neoforged.neoforge.common.world.ModifiableBiomeInfo.BiomeInfo.Builder builder) net.minecraft.world.entity.EntityType<?> newType()Returns the value of thenewTyperecord component.net.minecraft.world.entity.EntityType<?> Returns the value of theoriginalTyperecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Constructor Details
-
AddEntityToSameBiomesModifier
public AddEntityToSameBiomesModifier(net.minecraft.world.entity.EntityType<?> originalType, net.minecraft.world.entity.EntityType<?> newType, int weight, int minGroup, int maxGroup) Creates an instance of aAddEntityToSameBiomesModifierrecord class.- Parameters:
originalType- the value for theoriginalTyperecord componentnewType- the value for thenewTyperecord componentweight- the value for theweightrecord componentminGroup- the value for theminGrouprecord componentmaxGroup- the value for themaxGrouprecord component
-
-
Method Details
-
modify
public void modify(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, net.neoforged.neoforge.common.world.BiomeModifier.Phase phase, net.neoforged.neoforge.common.world.ModifiableBiomeInfo.BiomeInfo.Builder builder) - Specified by:
modifyin interfacenet.neoforged.neoforge.common.world.BiomeModifier
-
codec
public com.mojang.serialization.MapCodec<? extends net.neoforged.neoforge.common.world.BiomeModifier> codec()- Specified by:
codecin interfacenet.neoforged.neoforge.common.world.BiomeModifier
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
originalType
public net.minecraft.world.entity.EntityType<?> originalType()Returns the value of theoriginalTyperecord component.- Returns:
- the value of the
originalTyperecord component
-
newType
public net.minecraft.world.entity.EntityType<?> newType()Returns the value of thenewTyperecord component.- Returns:
- the value of the
newTyperecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
minGroup
public int minGroup()Returns the value of theminGrouprecord component.- Returns:
- the value of the
minGrouprecord component
-
maxGroup
public int maxGroup()Returns the value of themaxGrouprecord component.- Returns:
- the value of the
maxGrouprecord component
-