记录类 CommonPlayerSpawnInfo
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.CommonPlayerSpawnInfo
public record CommonPlayerSpawnInfo(Holder<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, GameType gameType, @Nullable GameType previousGameType, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown, int seaLevel)
extends Record
-
字段概要
字段修饰符和类型字段说明private final ResourceKey
<Level> dimension
记录组件的字段。private final Holder
<DimensionType> dimensionType
记录组件的字段。private final GameType
gameType
记录组件的字段。private final boolean
isDebug
记录组件的字段。private final boolean
isFlat
记录组件的字段。lastDeathLocation
记录组件的字段。private final int
portalCooldown
记录组件的字段。private final GameType
previousGameType
记录组件的字段。private final int
seaLevel
记录组件的字段。private final long
seed
记录组件的字段。 -
构造器概要
构造器构造器说明CommonPlayerSpawnInfo
(Holder<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, GameType gameType, GameType previousGameType, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown, int seaLevel) 创建CommonPlayerSpawnInfo
记录类的实例。CommonPlayerSpawnInfo
(RegistryFriendlyByteBuf p_321843_) -
方法概要
修饰符和类型方法说明返回dimension
记录组件的值。返回dimensionType
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。gameType()
返回gameType
记录组件的值。final int
hashCode()
返回此对象的哈希代码值。boolean
isDebug()
返回isDebug
记录组件的值。boolean
isFlat()
返回isFlat
记录组件的值。返回lastDeathLocation
记录组件的值。int
返回portalCooldown
记录组件的值。返回previousGameType
记录组件的值。int
seaLevel()
返回seaLevel
记录组件的值。long
seed()
返回seed
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。void
write
(RegistryFriendlyByteBuf p_321515_)
-
字段详细资料
-
dimensionType
dimensionType
记录组件的字段。 -
dimension
dimension
记录组件的字段。 -
seed
private final long seedseed
记录组件的字段。 -
gameType
gameType
记录组件的字段。 -
previousGameType
previousGameType
记录组件的字段。 -
isDebug
private final boolean isDebugisDebug
记录组件的字段。 -
isFlat
private final boolean isFlatisFlat
记录组件的字段。 -
lastDeathLocation
lastDeathLocation
记录组件的字段。 -
portalCooldown
private final int portalCooldownportalCooldown
记录组件的字段。 -
seaLevel
private final int seaLevelseaLevel
记录组件的字段。
-
-
构造器详细资料
-
CommonPlayerSpawnInfo
-
CommonPlayerSpawnInfo
public CommonPlayerSpawnInfo(Holder<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, GameType gameType, @Nullable GameType previousGameType, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown, int seaLevel) 创建CommonPlayerSpawnInfo
记录类的实例。- 参数:
dimensionType
-dimensionType
记录组件的值dimension
-dimension
记录组件的值seed
-seed
记录组件的值gameType
-gameType
记录组件的值previousGameType
-previousGameType
记录组件的值isDebug
-isDebug
记录组件的值isFlat
-isFlat
记录组件的值lastDeathLocation
-lastDeathLocation
记录组件的值portalCooldown
-portalCooldown
记录组件的值seaLevel
-seaLevel
记录组件的值
-
-
方法详细资料
-
write
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
dimensionType
返回dimensionType
记录组件的值。- 返回:
dimensionType
记录组件的值
-
dimension
返回dimension
记录组件的值。- 返回:
dimension
记录组件的值
-
seed
public long seed()返回seed
记录组件的值。- 返回:
seed
记录组件的值
-
gameType
返回gameType
记录组件的值。- 返回:
gameType
记录组件的值
-
previousGameType
返回previousGameType
记录组件的值。- 返回:
previousGameType
记录组件的值
-
isDebug
public boolean isDebug()返回isDebug
记录组件的值。- 返回:
isDebug
记录组件的值
-
isFlat
public boolean isFlat()返回isFlat
记录组件的值。- 返回:
isFlat
记录组件的值
-
lastDeathLocation
返回lastDeathLocation
记录组件的值。- 返回:
lastDeathLocation
记录组件的值
-
portalCooldown
public int portalCooldown()返回portalCooldown
记录组件的值。- 返回:
portalCooldown
记录组件的值
-
seaLevel
public int seaLevel()返回seaLevel
记录组件的值。- 返回:
seaLevel
记录组件的值
-