Record Class CommonPlayerSpawnInfo
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.CommonPlayerSpawnInfo
public record CommonPlayerSpawnInfo(ResourceKey<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, GameType gameType, @Nullable GameType previousGameType, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ResourceKey<Level>The field for thedimensionrecord component.private final ResourceKey<DimensionType>The field for thedimensionTyperecord component.private final GameTypeThe field for thegameTyperecord component.private final booleanThe field for theisDebugrecord component.private final booleanThe field for theisFlatrecord component.The field for thelastDeathLocationrecord component.private final intThe field for theportalCooldownrecord component.private final GameTypeThe field for thepreviousGameTyperecord component.private final longThe field for theseedrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionCommonPlayerSpawnInfo(FriendlyByteBuf p_294338_) CommonPlayerSpawnInfo(ResourceKey<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, GameType gameType, GameType previousGameType, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown) Creates an instance of aCommonPlayerSpawnInforecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thedimensionrecord component.Returns the value of thedimensionTyperecord component.final booleanIndicates whether some other object is "equal to" this one.gameType()Returns the value of thegameTyperecord component.final inthashCode()Returns a hash code value for this object.booleanisDebug()Returns the value of theisDebugrecord component.booleanisFlat()Returns the value of theisFlatrecord component.Returns the value of thelastDeathLocationrecord component.intReturns the value of theportalCooldownrecord component.Returns the value of thepreviousGameTyperecord component.longseed()Returns the value of theseedrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_294161_) 
- 
Field Details- 
dimensionTypeThe field for thedimensionTyperecord component.
- 
dimensionThe field for thedimensionrecord component.
- 
seedprivate final long seedThe field for theseedrecord component.
- 
gameTypeThe field for thegameTyperecord component.
- 
previousGameTypeThe field for thepreviousGameTyperecord component.
- 
isDebugprivate final boolean isDebugThe field for theisDebugrecord component.
- 
isFlatprivate final boolean isFlatThe field for theisFlatrecord component.
- 
lastDeathLocationThe field for thelastDeathLocationrecord component.
- 
portalCooldownprivate final int portalCooldownThe field for theportalCooldownrecord component.
 
- 
- 
Constructor Details- 
CommonPlayerSpawnInfo
- 
CommonPlayerSpawnInfopublic CommonPlayerSpawnInfo(ResourceKey<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, GameType gameType, @Nullable GameType previousGameType, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown) Creates an instance of aCommonPlayerSpawnInforecord class.- Parameters:
- dimensionType- the value for the- dimensionTyperecord component
- dimension- the value for the- dimensionrecord component
- seed- the value for the- seedrecord component
- gameType- the value for the- gameTyperecord component
- previousGameType- the value for the- previousGameTyperecord component
- isDebug- the value for the- isDebugrecord component
- isFlat- the value for the- isFlatrecord component
- lastDeathLocation- the value for the- lastDeathLocationrecord component
- portalCooldown- the value for the- portalCooldownrecord component
 
 
- 
- 
Method Details- 
write
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
dimensionTypeReturns the value of thedimensionTyperecord component.- Returns:
- the value of the dimensionTyperecord component
 
- 
dimensionReturns the value of thedimensionrecord component.- Returns:
- the value of the dimensionrecord component
 
- 
seedpublic long seed()Returns the value of theseedrecord component.- Returns:
- the value of the seedrecord component
 
- 
gameTypeReturns the value of thegameTyperecord component.- Returns:
- the value of the gameTyperecord component
 
- 
previousGameTypeReturns the value of thepreviousGameTyperecord component.- Returns:
- the value of the previousGameTyperecord component
 
- 
isDebugpublic boolean isDebug()Returns the value of theisDebugrecord component.- Returns:
- the value of the isDebugrecord component
 
- 
isFlatpublic boolean isFlat()Returns the value of theisFlatrecord component.- Returns:
- the value of the isFlatrecord component
 
- 
lastDeathLocationReturns the value of thelastDeathLocationrecord component.- Returns:
- the value of the lastDeathLocationrecord component
 
- 
portalCooldownpublic int portalCooldown()Returns the value of theportalCooldownrecord component.- Returns:
- the value of the portalCooldownrecord component
 
 
-