Class PingPongPacketAsync
java.lang.Object
org.cyclops.cyclopscore.network.PacketBase
org.cyclops.cyclopscore.network.PacketCodec
org.cyclops.cyclopscore.network.packet.debug.PingPongPacketAsync
- Direct Known Subclasses:
PingPongPacketComplexAsync
,PingPongPacketSync
Debug ping pong packet
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.cyclopscore.network.PacketCodec
PacketCodec.ICodecAction, PacketCodec.ICodecRunnable
-
Field Summary
FieldsFields inherited from class org.cyclops.cyclopscore.network.PacketCodec
fieldCache, READ_STRING_MAX_LENGTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionClient
(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player) Actions for client-side.void
actionServer
(net.minecraft.world.level.Level level, net.minecraft.server.level.ServerPlayer player) Actions for server-side.boolean
isAsync()
protected void
protected PingPongPacketAsync
toString()
Methods inherited from class org.cyclops.cyclopscore.network.PacketCodec
addCodedAction, decode, encode, getAction, getActionSuper, read, write
-
Field Details
-
remaining
protected int remaining
-
-
Constructor Details
-
PingPongPacketAsync
public PingPongPacketAsync()Empty packet. -
PingPongPacketAsync
public PingPongPacketAsync(int remaining)
-
-
Method Details
-
isAsync
public boolean isAsync()- Specified by:
isAsync
in classPacketBase
- Returns:
- If this packet can run on a thread other than the main-thread of Minecraft. If this is asynchronous, the player parameter inside the action is not guaranteed to be defined.
-
log
-
newPacket
-
actionClient
public void actionClient(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player) Description copied from class:PacketBase
Actions for client-side.- Specified by:
actionClient
in classPacketBase
- Parameters:
level
- The world.player
- The player. Can be null if this packet is asynchronous.
-
actionServer
public void actionServer(net.minecraft.world.level.Level level, net.minecraft.server.level.ServerPlayer player) Description copied from class:PacketBase
Actions for server-side.- Specified by:
actionServer
in classPacketBase
- Parameters:
level
- The world.player
- The player.
-
toString
-