Class ButtonClickPacket
java.lang.Object
org.cyclops.cyclopscore.network.PacketBase
org.cyclops.cyclopscore.network.PacketCodec
org.cyclops.cyclopscore.network.packet.ButtonClickPacket
Packet for notifying the server of a button click.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.cyclopscore.network.PacketCodec
PacketCodec.ICodecAction, PacketCodec.ICodecRunnable
-
Field Summary
Fields 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()
Methods inherited from class org.cyclops.cyclopscore.network.PacketCodec
addCodedAction, decode, encode, getAction, getActionSuper, read, write
-
Constructor Details
-
ButtonClickPacket
public ButtonClickPacket() -
ButtonClickPacket
-
-
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.
-
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.
-