Class ServerboundInteractPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundInteractPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionServerboundInteractPacket(int entityId, @NonNull InteractAction action, float targetX, float targetY, float targetZ, Hand hand, boolean isSneaking) ServerboundInteractPacket(int entityId, InteractAction action, boolean isSneaking) ServerboundInteractPacket(int entityId, InteractAction action, @NonNull Hand hand, boolean isSneaking) ServerboundInteractPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboolean@NonNull InteractActionintgetHand()floatfloatfloatinthashCode()booleanvoidserialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper) @NonNull StringtoString()@NonNull ServerboundInteractPacketwithAction(@NonNull InteractAction action) @NonNull ServerboundInteractPacketwithEntityId(int entityId) @NonNull ServerboundInteractPacket@NonNull ServerboundInteractPacketwithSneaking(boolean isSneaking) @NonNull ServerboundInteractPacketwithTargetX(float targetX) @NonNull ServerboundInteractPacketwithTargetY(float targetY) @NonNull ServerboundInteractPacketwithTargetZ(float targetZ) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isPriority
-
Constructor Details
-
ServerboundInteractPacket
-
ServerboundInteractPacket
public ServerboundInteractPacket(int entityId, InteractAction action, @NonNull @NonNull Hand hand, boolean isSneaking) -
ServerboundInteractPacket
-
ServerboundInteractPacket
public ServerboundInteractPacket(int entityId, @NonNull @NonNull InteractAction action, float targetX, float targetY, float targetZ, Hand hand, boolean isSneaking)
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceMinecraftPacket
-
getEntityId
public int getEntityId() -
getAction
-
getTargetX
public float getTargetX() -
getTargetY
public float getTargetY() -
getTargetZ
public float getTargetZ() -
getHand
-
isSneaking
public boolean isSneaking() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withEntityId
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withAction
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTargetX
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTargetY
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTargetZ
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHand
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSneaking
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-