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
-
currentMobs
-
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
-
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
-
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. -
detectedPlayers
-
currentMobs
-
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
-
ejectingLootTable
Returns the value of theejectingLootTablerecord component.- Returns:
- the value of the
ejectingLootTablerecord component
-