Class PingPongPacketAsync

java.lang.Object
org.cyclops.cyclopscore.network.PacketBase
org.cyclops.cyclopscore.network.PacketCodec
org.cyclops.cyclopscore.network.packet.debug.PingPongPacketAsync
All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
Direct Known Subclasses:
PingPongPacketComplexAsync, PingPongPacketSync

public class PingPongPacketAsync extends PacketCodec
Debug ping pong packet
  • Field Details

    • ID

      public static final net.minecraft.resources.ResourceLocation ID
    • remaining

      protected int remaining
  • Constructor Details

    • PingPongPacketAsync

      public PingPongPacketAsync()
      Empty packet.
    • PingPongPacketAsync

      public PingPongPacketAsync(int remaining)
    • PingPongPacketAsync

      public PingPongPacketAsync(net.minecraft.resources.ResourceLocation id)
    • PingPongPacketAsync

      public PingPongPacketAsync(net.minecraft.resources.ResourceLocation id, int remaining)
  • Method Details

    • isAsync

      public boolean isAsync()
      Specified by:
      isAsync in class PacketBase
      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

      protected void log(net.minecraft.world.entity.player.Player player, String message)
    • newPacket

      protected PingPongPacketAsync 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 class PacketBase
      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 class PacketBase
      Parameters:
      level - The world.
      player - The player.
    • toString

      public String toString()
      Overrides:
      toString in class Object