Record Class BiomeModifiers.SpawnEntry
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.helper.BiomeModifiers.SpawnEntry
- Enclosing class:
BiomeModifiers
public static record BiomeModifiers.SpawnEntry(net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData data, int weight)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BiomeModifiers.SpawnEntry> -
Constructor Summary
ConstructorsConstructorDescriptionSpawnEntry(net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData data, int weight) Creates an instance of aSpawnEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.biome.MobSpawnSettings.SpawnerDatadata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
SpawnEntry
public SpawnEntry(net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData data, int weight) Creates an instance of aSpawnEntryrecord class.- Parameters:
data- the value for thedatarecord componentweight- the value for theweightrecord component
-
-
Method Details
-
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. -
data
public net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-