public class PlayerActionC2SPacket extends Object implements Packet<ServerPlayPacketListener>
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerActionC2SPacket.Action |
| Modifier and Type | Field and Description |
|---|---|
private PlayerActionC2SPacket.Action |
action |
private Direction |
direction |
private BlockPos |
pos |
| Constructor and Description |
|---|
PlayerActionC2SPacket() |
PlayerActionC2SPacket(PlayerActionC2SPacket.Action action,
BlockPos pos,
Direction direction) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(ServerPlayPacketListener serverPlayPacketListener) |
PlayerActionC2SPacket.Action |
getAction() |
Direction |
getDirection() |
BlockPos |
getPos() |
void |
read(PacketByteBuf buf) |
void |
write(PacketByteBuf buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWritingErrorSkippableprivate BlockPos pos
private Direction direction
private PlayerActionC2SPacket.Action action
public PlayerActionC2SPacket()
@Environment(value=CLIENT) public PlayerActionC2SPacket(PlayerActionC2SPacket.Action action, BlockPos pos, Direction direction)
public void read(PacketByteBuf buf) throws IOException
read in interface Packet<ServerPlayPacketListener>IOExceptionpublic void write(PacketByteBuf buf) throws IOException
write in interface Packet<ServerPlayPacketListener>IOExceptionpublic void apply(ServerPlayPacketListener serverPlayPacketListener)
apply in interface Packet<ServerPlayPacketListener>public BlockPos getPos()
public Direction getDirection()
public PlayerActionC2SPacket.Action getAction()