Record Class JoinGamePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.JoinGamePacket
- All Implemented Interfaces:
NetworkBuffer.Writer,SendablePacket,ServerPacket
public record JoinGamePacket(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, String dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, DeathLocation deathLocation, int portalCooldown)
extends Record
implements ServerPacket
-
Constructor Summary
ConstructorsConstructorDescriptionJoinGamePacket(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, String dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, DeathLocation deathLocation, int portalCooldown) Creates an instance of aJoinGamePacketrecord class.JoinGamePacket(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeathLocationrecord component.Returns the value of thedimensionTyperecord component.booleanReturns the value of thedoLimitedCraftingrecord component.booleanReturns the value of theenableRespawnScreenrecord component.intentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.gameMode()Returns the value of thegameModerecord component.intgetId(@NotNull ConnectionState state) Gets the id of this packet.final inthashCode()Returns a hash code value for this object.longReturns the value of thehashedSeedrecord component.booleanisDebug()Returns the value of theisDebugrecord component.booleanisFlat()Returns the value of theisFlatrecord component.booleanReturns the value of theisHardcorerecord component.intReturns the value of themaxPlayersrecord component.intReturns the value of theportalCooldownrecord component.Returns the value of thepreviousGameModerecord component.booleanReturns the value of thereducedDebugInforecord component.intReturns the value of thesimulationDistancerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theviewDistancerecord component.world()Returns the value of theworldrecord component.worlds()Returns the value of theworldsrecord component.voidwrite(@NotNull NetworkBuffer writer)
-
Constructor Details
-
JoinGamePacket
public JoinGamePacket(int entityId, boolean isHardcore, List<String> worlds, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, String dimensionType, String world, long hashedSeed, GameMode gameMode, GameMode previousGameMode, boolean isDebug, boolean isFlat, DeathLocation deathLocation, int portalCooldown) Creates an instance of aJoinGamePacketrecord class.- Parameters:
entityId- the value for theentityIdrecord componentisHardcore- the value for theisHardcorerecord componentworlds- the value for theworldsrecord componentmaxPlayers- the value for themaxPlayersrecord componentviewDistance- the value for theviewDistancerecord componentsimulationDistance- the value for thesimulationDistancerecord componentreducedDebugInfo- the value for thereducedDebugInforecord componentenableRespawnScreen- the value for theenableRespawnScreenrecord componentdoLimitedCrafting- the value for thedoLimitedCraftingrecord componentdimensionType- the value for thedimensionTyperecord componentworld- the value for theworldrecord componenthashedSeed- the value for thehashedSeedrecord componentgameMode- the value for thegameModerecord componentpreviousGameMode- the value for thepreviousGameModerecord componentisDebug- the value for theisDebugrecord componentisFlat- the value for theisFlatrecord componentdeathLocation- the value for thedeathLocationrecord componentportalCooldown- the value for theportalCooldownrecord component
-
JoinGamePacket
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
getId
Description copied from interface:ServerPacketGets the id of this packet.Written in the final buffer header so it needs to match the client id.
- Specified by:
getIdin interfaceServerPacket- Returns:
- the id of this packet
-
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 '=='. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
isHardcore
public boolean isHardcore()Returns the value of theisHardcorerecord component.- Returns:
- the value of the
isHardcorerecord component
-
worlds
Returns the value of theworldsrecord component.- Returns:
- the value of the
worldsrecord component
-
maxPlayers
public int maxPlayers()Returns the value of themaxPlayersrecord component.- Returns:
- the value of the
maxPlayersrecord component
-
viewDistance
public int viewDistance()Returns the value of theviewDistancerecord component.- Returns:
- the value of the
viewDistancerecord component
-
simulationDistance
public int simulationDistance()Returns the value of thesimulationDistancerecord component.- Returns:
- the value of the
simulationDistancerecord component
-
reducedDebugInfo
public boolean reducedDebugInfo()Returns the value of thereducedDebugInforecord component.- Returns:
- the value of the
reducedDebugInforecord component
-
enableRespawnScreen
public boolean enableRespawnScreen()Returns the value of theenableRespawnScreenrecord component.- Returns:
- the value of the
enableRespawnScreenrecord component
-
doLimitedCrafting
public boolean doLimitedCrafting()Returns the value of thedoLimitedCraftingrecord component.- Returns:
- the value of the
doLimitedCraftingrecord component
-
dimensionType
Returns the value of thedimensionTyperecord component.- Returns:
- the value of the
dimensionTyperecord component
-
world
Returns the value of theworldrecord component.- Returns:
- the value of the
worldrecord component
-
hashedSeed
public long hashedSeed()Returns the value of thehashedSeedrecord component.- Returns:
- the value of the
hashedSeedrecord component
-
gameMode
Returns the value of thegameModerecord component.- Returns:
- the value of the
gameModerecord component
-
previousGameMode
Returns the value of thepreviousGameModerecord component.- Returns:
- the value of the
previousGameModerecord component
-
isDebug
public boolean isDebug()Returns the value of theisDebugrecord component.- Returns:
- the value of the
isDebugrecord component
-
isFlat
public boolean isFlat()Returns the value of theisFlatrecord component.- Returns:
- the value of the
isFlatrecord component
-
deathLocation
Returns the value of thedeathLocationrecord component.- Returns:
- the value of the
deathLocationrecord component
-
portalCooldown
public int portalCooldown()Returns the value of theportalCooldownrecord component.- Returns:
- the value of the
portalCooldownrecord component
-