Class ServerboundContainerClickPacket
java.lang.Object
net.minecraft.network.protocol.game.ServerboundContainerClickPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
public class ServerboundContainerClickPacket
extends Object
implements Packet<ServerGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intButton usedprivate final ItemStackprivate final it.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack> private final ClickTypeInventory operation modeprivate final intThe id of the window which was clicked. 0 for player inventory.private static final intprivate final intId of the clicked slotprivate static final StreamCodec<RegistryFriendlyByteBuf, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack>> private final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionServerboundContainerClickPacket(int pContainerId, int pStateId, int pSlotNum, int pButtonNum, ClickType pClickType, ItemStack pCarriedItem, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack> pChangedSlots) private -
Method Summary
Modifier and TypeMethodDescriptionintit.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack> intintintvoidhandle(ServerGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.type()private voidwrite(RegistryFriendlyByteBuf pBuffer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ServerboundContainerClickPacket> STREAM_CODEC -
MAX_SLOT_COUNT
private static final int MAX_SLOT_COUNT- See Also:
-
SLOTS_STREAM_CODEC
private static final StreamCodec<RegistryFriendlyByteBuf,it.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack>> SLOTS_STREAM_CODEC -
containerId
private final int containerIdThe id of the window which was clicked. 0 for player inventory. -
stateId
private final int stateId -
slotNum
private final int slotNumId of the clicked slot -
buttonNum
private final int buttonNumButton used -
clickType
Inventory operation mode -
carriedItem
-
changedSlots
-
-
Constructor Details
-
ServerboundContainerClickPacket
-
ServerboundContainerClickPacket
-
-
Method Details
-
write
-
type
- Specified by:
typein interfacePacket<ServerGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ServerGamePacketListener>
-
getContainerId
public int getContainerId() -
getSlotNum
public int getSlotNum() -
getButtonNum
public int getButtonNum() -
getCarriedItem
-
getChangedSlots
-
getClickType
-
getStateId
public int getStateId()
-