public class PlayerInputC2SPacket extends Object implements Packet<ServerPlayPacketListener>
Modifier and Type | Field and Description |
---|---|
private float |
forward |
private boolean |
jumping |
private float |
sideways |
private boolean |
sneaking |
Constructor and Description |
---|
PlayerInputC2SPacket() |
PlayerInputC2SPacket(float sideways,
float forward,
boolean jumping,
boolean sneaking) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ServerPlayPacketListener serverPlayPacketListener) |
float |
getForward() |
float |
getSideways() |
boolean |
isJumping() |
boolean |
isSneaking() |
void |
read(PacketByteBuf buf) |
void |
write(PacketByteBuf buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isWritingErrorSkippable
private float sideways
private float forward
private boolean jumping
private boolean sneaking
public PlayerInputC2SPacket()
@Environment(value=CLIENT) public PlayerInputC2SPacket(float sideways, float forward, boolean jumping, boolean sneaking)
public void read(PacketByteBuf buf) throws IOException
read
in interface Packet<ServerPlayPacketListener>
IOException
public void write(PacketByteBuf buf) throws IOException
write
in interface Packet<ServerPlayPacketListener>
IOException
public void apply(ServerPlayPacketListener serverPlayPacketListener)
apply
in interface Packet<ServerPlayPacketListener>
public float getSideways()
public float getForward()
public boolean isJumping()
public boolean isSneaking()