Class PlayerInputC2SPacket
java.lang.Object
net.minecraft.network.packet.c2s.play.PlayerInputC2SPacket
- All Implemented Interfaces:
Packet<ServerPlayPacketListener>
public class PlayerInputC2SPacket extends Object implements Packet<ServerPlayPacketListener>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PlayerInputC2SPacket()PlayerInputC2SPacket(float sideways, float forward, boolean jumping, boolean sneaking) -
Method Summary
Modifier and Type Method Description voidapply(ServerPlayPacketListener serverPlayPacketListener)floatgetForward()floatgetSideways()booleanisJumping()booleanisSneaking()voidread(PacketByteBuf buf)voidwrite(PacketByteBuf buf)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
sideways
private float sideways -
forward
private float forward -
jumping
private boolean jumping -
sneaking
private boolean sneaking
-
-
Constructor Details
-
PlayerInputC2SPacket
public PlayerInputC2SPacket() -
PlayerInputC2SPacket
@Environment(CLIENT) public PlayerInputC2SPacket(float sideways, float forward, boolean jumping, boolean sneaking)
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ServerPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ServerPlayPacketListener>- Throws:
IOException
-
apply
- Specified by:
applyin interfacePacket<ServerPlayPacketListener>
-
getSideways
public float getSideways() -
getForward
public float getForward() -
isJumping
public boolean isJumping() -
isSneaking
public boolean isSneaking()
-