Record Class TrialSpawnerStateData.Packed
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData.Packed
- Enclosing class:
TrialSpawnerStateData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for thecooldownEndsAtrecord component.The field for thecurrentMobsrecord component.The field for thedetectedPlayersrecord component.private final Optional<ResourceKey<LootTable>> The field for theejectingLootTablerecord component.static final com.mojang.serialization.MapCodec<TrialSpawnerStateData.Packed> private final longThe field for thenextMobSpawnsAtrecord component.The field for thenextSpawnDatarecord component.private final intThe field for thetotalMobsSpawnedrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecooldownEndsAtrecord component.Returns the value of thecurrentMobsrecord component.Returns the value of thedetectedPlayersrecord component.Returns the value of theejectingLootTablerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thenextMobSpawnsAtrecord component.Returns the value of thenextSpawnDatarecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalMobsSpawnedrecord component.
-
Field Details
-
detectedPlayers
The field for thedetectedPlayersrecord component. -
currentMobs
The field for thecurrentMobsrecord component. -
cooldownEndsAt
private final long cooldownEndsAtThe field for thecooldownEndsAtrecord component. -
nextMobSpawnsAt
private final long nextMobSpawnsAtThe field for thenextMobSpawnsAtrecord component. -
totalMobsSpawned
private final int totalMobsSpawnedThe field for thetotalMobsSpawnedrecord component. -
nextSpawnData
The field for thenextSpawnDatarecord component. -
ejectingLootTable
The field for theejectingLootTablerecord component. -
MAP_CODEC
-
-
Constructor Details
-
Packed
public Packed(Set<UUID> detectedPlayers, Set<UUID> currentMobs, long cooldownEndsAt, long nextMobSpawnsAt, int totalMobsSpawned, Optional<SpawnData> nextSpawnData, Optional<ResourceKey<LootTable>> ejectingLootTable) Creates an instance of aPackedrecord class.- Parameters:
detectedPlayers- the value for thedetectedPlayersrecord componentcurrentMobs- the value for thecurrentMobsrecord componentcooldownEndsAt- the value for thecooldownEndsAtrecord componentnextMobSpawnsAt- the value for thenextMobSpawnsAtrecord componenttotalMobsSpawned- the value for thetotalMobsSpawnedrecord componentnextSpawnData- the value for thenextSpawnDatarecord componentejectingLootTable- the value for theejectingLootTablerecord 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 '=='. -
detectedPlayers
Returns the value of thedetectedPlayersrecord component.- Returns:
- the value of the
detectedPlayersrecord component
-
currentMobs
Returns the value of thecurrentMobsrecord component.- Returns:
- the value of the
currentMobsrecord component
-
cooldownEndsAt
public long cooldownEndsAt()Returns the value of thecooldownEndsAtrecord component.- Returns:
- the value of the
cooldownEndsAtrecord component
-
nextMobSpawnsAt
public long nextMobSpawnsAt()Returns the value of thenextMobSpawnsAtrecord component.- Returns:
- the value of the
nextMobSpawnsAtrecord component
-
totalMobsSpawned
public int totalMobsSpawned()Returns the value of thetotalMobsSpawnedrecord component.- Returns:
- the value of the
totalMobsSpawnedrecord component
-
nextSpawnData
Returns the value of thenextSpawnDatarecord component.- Returns:
- the value of the
nextSpawnDatarecord component
-
ejectingLootTable
Returns the value of theejectingLootTablerecord component.- Returns:
- the value of the
ejectingLootTablerecord component
-