public class PlayerInteractEntityC2SPacket extends Object implements Packet<ServerPlayPacketListener>
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerInteractEntityC2SPacket.InteractionType |
| Modifier and Type | Field and Description |
|---|---|
private int |
entityId |
private Hand |
hand |
private Vec3d |
hitPos |
private boolean |
playerSneaking |
private PlayerInteractEntityC2SPacket.InteractionType |
type |
| Constructor and Description |
|---|
PlayerInteractEntityC2SPacket() |
PlayerInteractEntityC2SPacket(Entity target,
boolean playerSneaking) |
PlayerInteractEntityC2SPacket(Entity entity,
Hand hand,
boolean playerSneaking) |
PlayerInteractEntityC2SPacket(Entity entity,
Hand hand,
Vec3d hitPos,
boolean playerSneaking) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(ServerPlayPacketListener serverPlayPacketListener) |
Entity |
getEntity(World world) |
Hand |
getHand() |
Vec3d |
getHitPosition() |
PlayerInteractEntityC2SPacket.InteractionType |
getType() |
boolean |
isPlayerSneaking() |
void |
read(PacketByteBuf buf) |
void |
write(PacketByteBuf buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWritingErrorSkippableprivate int entityId
private PlayerInteractEntityC2SPacket.InteractionType type
private Vec3d hitPos
private Hand hand
private boolean playerSneaking
public PlayerInteractEntityC2SPacket()
@Environment(value=CLIENT) public PlayerInteractEntityC2SPacket(Entity target, boolean playerSneaking)
@Environment(value=CLIENT) public PlayerInteractEntityC2SPacket(Entity entity, Hand hand, boolean playerSneaking)
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 PlayerInteractEntityC2SPacket.InteractionType getType()
public Vec3d getHitPosition()
public boolean isPlayerSneaking()