Record Class MobSpawnSettings.SpawnerData
java.lang.Object
java.lang.Record
net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData
- Enclosing class:
MobSpawnSettings
public static record MobSpawnSettings.SpawnerData(EntityType<?> type, IntProvider count)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<MobSpawnSettings.SpawnerData> private final IntProviderThe field for thecountrecord component.private final EntityType<?> The field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSpawnerData(EntityType<?> type, IntProvider count) Creates an instance of aSpawnerDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptioncount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.EntityType<?> type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
count
The field for thecountrecord component. -
CODEC
-
-
Constructor Details
-
SpawnerData
Creates an instance of aSpawnerDatarecord class.- Parameters:
type- the value for thetyperecord componentcount- the value for thecountrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
count
Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-