Class ServerboundUseItemOnPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundUseItemOnPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionServerboundUseItemOnPacket(io.netty.buffer.ByteBuf in) ServerboundUseItemOnPacket(org.cloudburstmc.math.vector.Vector3i position, Direction face, Hand hand, float cursorX, float cursorY, float cursorZ, boolean insideBlock, boolean hitWorldBorder, int sequence) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanfloatfloatfloatgetFace()getHand()org.cloudburstmc.math.vector.Vector3iintinthashCode()booleanbooleanvoidserialize(io.netty.buffer.ByteBuf out) booleanGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread.@NonNull StringtoString()@NonNull ServerboundUseItemOnPacketwithCursorX(float cursorX) @NonNull ServerboundUseItemOnPacketwithCursorY(float cursorY) @NonNull ServerboundUseItemOnPacketwithCursorZ(float cursorZ) @NonNull ServerboundUseItemOnPacket@NonNull ServerboundUseItemOnPacket@NonNull ServerboundUseItemOnPacketwithHitWorldBorder(boolean hitWorldBorder) @NonNull ServerboundUseItemOnPacketwithInsideBlock(boolean insideBlock) @NonNull ServerboundUseItemOnPacketwithPosition(org.cloudburstmc.math.vector.Vector3i position) @NonNull ServerboundUseItemOnPacketwithSequence(int sequence) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isTerminal
-
Constructor Details
-
ServerboundUseItemOnPacket
public ServerboundUseItemOnPacket(io.netty.buffer.ByteBuf in) -
ServerboundUseItemOnPacket
-
-
Method Details
-
serialize
public void serialize(io.netty.buffer.ByteBuf out) - Specified by:
serializein interfaceMinecraftPacket
-
shouldRunOnGameThread
public boolean shouldRunOnGameThread()Description copied from interface:PacketGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread. Packets that qualify for this are usually packets with an ensureRunningOnSameThread call at the top of their packet listener method in the Minecraft code. Packets which need extra attention because they aren't "fully" handled async are marked using // GAME THREAD DETAIL comments in the MCProtocolLib code.- Specified by:
shouldRunOnGameThreadin interfacePacket- Returns:
- Whether the packet be handled async from the Netty thread.
-
getPosition
public org.cloudburstmc.math.vector.Vector3i getPosition() -
getFace
-
getHand
-
getCursorX
public float getCursorX() -
getCursorY
public float getCursorY() -
getCursorZ
public float getCursorZ() -
isInsideBlock
public boolean isInsideBlock() -
isHitWorldBorder
public boolean isHitWorldBorder() -
getSequence
public int getSequence() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withPosition
public @NonNull ServerboundUseItemOnPacket withPosition(org.cloudburstmc.math.vector.Vector3i position) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFace
- 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).
-
withCursorX
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCursorY
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCursorZ
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withInsideBlock
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHitWorldBorder
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSequence
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-