记录类 TrialSpawnerStateData.Packed
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData.Packed
-
字段概要
字段修饰符和类型字段说明private final long
cooldownEndsAt
记录组件的字段。currentMobs
记录组件的字段。detectedPlayers
记录组件的字段。private final Optional
<ResourceKey<LootTable>> ejectingLootTable
记录组件的字段。static final com.mojang.serialization.MapCodec
<TrialSpawnerStateData.Packed> private final long
nextMobSpawnsAt
记录组件的字段。nextSpawnData
记录组件的字段。private final int
totalMobsSpawned
记录组件的字段。 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明long
返回cooldownEndsAt
记录组件的值。返回currentMobs
记录组件的值。返回detectedPlayers
记录组件的值。返回ejectingLootTable
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。final int
hashCode()
返回此对象的哈希代码值。long
返回nextMobSpawnsAt
记录组件的值。返回nextSpawnData
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。int
返回totalMobsSpawned
记录组件的值。
-
字段详细资料
-
detectedPlayers
detectedPlayers
记录组件的字段。 -
currentMobs
currentMobs
记录组件的字段。 -
cooldownEndsAt
private final long cooldownEndsAtcooldownEndsAt
记录组件的字段。 -
nextMobSpawnsAt
private final long nextMobSpawnsAtnextMobSpawnsAt
记录组件的字段。 -
totalMobsSpawned
private final int totalMobsSpawnedtotalMobsSpawned
记录组件的字段。 -
nextSpawnData
nextSpawnData
记录组件的字段。 -
ejectingLootTable
ejectingLootTable
记录组件的字段。 -
MAP_CODEC
-
-
构造器详细资料
-
Packed
public Packed(Set<UUID> detectedPlayers, Set<UUID> currentMobs, long cooldownEndsAt, long nextMobSpawnsAt, int totalMobsSpawned, Optional<SpawnData> nextSpawnData, Optional<ResourceKey<LootTable>> ejectingLootTable) 创建Packed
记录类的实例。- 参数:
detectedPlayers
-detectedPlayers
记录组件的值currentMobs
-currentMobs
记录组件的值cooldownEndsAt
-cooldownEndsAt
记录组件的值nextMobSpawnsAt
-nextMobSpawnsAt
记录组件的值totalMobsSpawned
-totalMobsSpawned
记录组件的值nextSpawnData
-nextSpawnData
记录组件的值ejectingLootTable
-ejectingLootTable
记录组件的值
-
-
方法详细资料
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
detectedPlayers
返回detectedPlayers
记录组件的值。- 返回:
detectedPlayers
记录组件的值
-
currentMobs
返回currentMobs
记录组件的值。- 返回:
currentMobs
记录组件的值
-
cooldownEndsAt
public long cooldownEndsAt()返回cooldownEndsAt
记录组件的值。- 返回:
cooldownEndsAt
记录组件的值
-
nextMobSpawnsAt
public long nextMobSpawnsAt()返回nextMobSpawnsAt
记录组件的值。- 返回:
nextMobSpawnsAt
记录组件的值
-
totalMobsSpawned
public int totalMobsSpawned()返回totalMobsSpawned
记录组件的值。- 返回:
totalMobsSpawned
记录组件的值
-
nextSpawnData
返回nextSpawnData
记录组件的值。- 返回:
nextSpawnData
记录组件的值
-
ejectingLootTable
返回ejectingLootTable
记录组件的值。- 返回:
ejectingLootTable
记录组件的值
-