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 TypeMethodDescriptionvoidactionClient(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player) Actions for client-side.voidactionServer(net.minecraft.world.level.Level level, net.minecraft.server.level.ServerPlayer player) Actions for server-side.booleanisAsync()protected voidprotected PingPongPacketAsynctoString()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:
isAsyncin 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:PacketBaseActions for client-side.- Specified by:
actionClientin 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:PacketBaseActions for server-side.- Specified by:
actionServerin classPacketBase- Parameters:
level- The world.player- The player.
-
toString
-