Package net.minecraft.world.level.biome
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, int minCount, int maxCount)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<MobSpawnSettings.SpawnerData> private final int
The field for themaxCount
record component.private final int
The field for theminCount
record component.private final EntityType
<?> The field for thetype
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSpawnerData
(EntityType<?> type, int minCount, int maxCount) Creates an instance of aSpawnerData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
maxCount()
Returns the value of themaxCount
record component.int
minCount()
Returns the value of theminCount
record component.toString()
Returns a string representation of this record class.EntityType
<?> type()
Returns the value of thetype
record component.
-
Field Details
-
type
The field for thetype
record component. -
minCount
private final int minCountThe field for theminCount
record component. -
maxCount
private final int maxCountThe field for themaxCount
record component. -
CODEC
-
-
Constructor Details
-
SpawnerData
Creates an instance of aSpawnerData
record class.- Parameters:
type
- the value for thetype
record componentminCount
- the value for theminCount
record componentmaxCount
- the value for themaxCount
record component
-
-
Method Details
-
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 '=='. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
minCount
public int minCount()Returns the value of theminCount
record component.- Returns:
- the value of the
minCount
record component
-
maxCount
public int maxCount()Returns the value of themaxCount
record component.- Returns:
- the value of the
maxCount
record component
-