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 PlayerInteractEntityC2SPacket.InteractionType |
type |
| Constructor and Description |
|---|
PlayerInteractEntityC2SPacket() |
PlayerInteractEntityC2SPacket(Entity entity) |
PlayerInteractEntityC2SPacket(Entity entity,
Hand hand) |
PlayerInteractEntityC2SPacket(Entity entity,
Hand hand,
Vec3d vec3d) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(ServerPlayPacketListener serverPlayPacketListener) |
Entity |
getEntity(World world) |
Hand |
getHand() |
Vec3d |
getHitPosition() |
PlayerInteractEntityC2SPacket.InteractionType |
getType() |
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
public PlayerInteractEntityC2SPacket()
public PlayerInteractEntityC2SPacket(Entity entity)
@Environment(value=CLIENT) public PlayerInteractEntityC2SPacket(Entity entity, Hand hand)
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 Hand getHand()
public Vec3d getHitPosition()