Slot documentation stuff (#1198)

* Slot documentation stuff

* Fix javadoc paragraphs and add comment about click data with throw action type
This commit is contained in:
Joseph Burton 2020-03-19 14:41:44 +00:00 committed by GitHub
parent a36211bd7c
commit 69b0299c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 13 deletions

View File

@ -55,9 +55,11 @@ CLASS net/minecraft/class_465 net/minecraft/client/gui/screen/ingame/HandledScre
ARG 3 yPosition
ARG 4 amountText
METHOD method_2383 onMouseClick (Lnet/minecraft/class_1735;IILnet/minecraft/class_1713;)V
COMMENT @see net.minecraft.screen.ScreenHandler#onSlotClick(int, int)
ARG 1 slot
ARG 2 invSlot
ARG 3 button
ARG 3 clickData
ARG 4 actionType
METHOD method_2384 handleHotbarKeyPressed (II)Z
ARG 1 keyCode
ARG 2 scanCode

View File

@ -52,9 +52,10 @@ CLASS net/minecraft/class_636 net/minecraft/client/network/ClientPlayerInteracti
ARG 2 entity
ARG 3 hand
METHOD method_2906 clickSlot (IIILnet/minecraft/class_1713;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1799;
COMMENT @see net.minecraft.screen.ScreenHandler#onSlotClick(int, int)
ARG 1 syncId
ARG 2 slotId
ARG 3 mouseButton
ARG 3 clickData
ARG 4 actionType
ARG 5 player
METHOD method_2907 setGameMode (Lnet/minecraft/class_1934;)V

View File

@ -1,15 +1,20 @@
CLASS net/minecraft/class_2813 net/minecraft/network/packet/c2s/play/ClickWindowC2SPacket
FIELD field_12815 actionType Lnet/minecraft/class_1713;
FIELD field_12816 stack Lnet/minecraft/class_1799;
FIELD field_12817 button I
FIELD field_12817 clickData I
FIELD field_12818 slot I
FIELD field_12819 syncId I
FIELD field_12820 transactionId S
FIELD field_12820 actionId S
METHOD <init> (IIILnet/minecraft/class_1713;Lnet/minecraft/class_1799;S)V
ARG 1 syncId
ARG 2 slot
ARG 3 clickData
ARG 4 actionType
ARG 5 stack
METHOD method_12189 getTransactionId ()S
ARG 6 actionId
METHOD method_12189 getActionId ()S
METHOD method_12190 getStack ()Lnet/minecraft/class_1799;
METHOD method_12192 getSlot ()I
METHOD method_12193 getButton ()I
METHOD method_12193 getClickData ()I
METHOD method_12194 getSyncId ()I
METHOD method_12195 getActionType ()Lnet/minecraft/class_1713;

View File

@ -36,20 +36,26 @@ CLASS net/minecraft/class_1703 net/minecraft/screen/ScreenHandler
METHOD method_7590 setPlayerRestriction (Lnet/minecraft/class_1657;Z)V
ARG 1 player
ARG 2 unrestricted
METHOD method_7591 packClickData (II)I
ARG 0 buttonId
ARG 1 quickCraftStage
METHOD method_7591 packQuickCraftData (II)I
ARG 0 quickCraftStage
ARG 1 buttonId
METHOD method_7592 canInsertItemIntoSlot (Lnet/minecraft/class_1735;Lnet/minecraft/class_1799;Z)Z
ARG 0 slot
ARG 1 stack
ARG 2 allowOverflow
METHOD method_7593 onSlotClick (IILnet/minecraft/class_1713;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1799;
COMMENT Performs a slot click. This can behave in many different ways depending mainly on the action type.
COMMENT @return The stack that was clicked on before anything changed, used mostly for verifying that the client and server are in sync
ARG 1 slotId
COMMENT The ID of the slot clicked on. -999 is a special value used for the cursor stack
ARG 2 clickData
COMMENT Metadata for the click. Usually equal to the button ID, but can have different meanings depending on the action type. Check the docs for each SlotActionType value
ARG 3 actionType
COMMENT The type of slot click. Check the docs for each SlotActionType value for details
ARG 4 player
METHOD method_7594 unpackButtonId (I)I
ARG 0 clickData
COMMENT The player
METHOD method_7594 unpackQuickCraftStage (I)I
ARG 0 quickCraftData
METHOD method_7595 close (Lnet/minecraft/class_1657;)V
ARG 1 player
METHOD method_7596 addListener (Lnet/minecraft/class_1712;)V
@ -109,8 +115,8 @@ CLASS net/minecraft/class_1703 net/minecraft/screen/ScreenHandler
METHOD method_7619 setStackInSlot (ILnet/minecraft/class_1799;)V
ARG 1 slot
ARG 2 stack
METHOD method_7620 unpackQuickCraftStage (I)I
ARG 0 clickData
METHOD method_7620 unpackQuickCraftButton (I)I
ARG 0 quickCraftData
METHOD method_7621 addSlot (Lnet/minecraft/class_1735;)Lnet/minecraft/class_1735;
ARG 1 slot
METHOD method_7622 isNotRestricted (Lnet/minecraft/class_1657;)Z

View File

@ -1 +1,23 @@
CLASS net/minecraft/class_1713 net/minecraft/screen/slot/SlotActionType
FIELD field_7789 QUICK_CRAFT Lnet/minecraft/class_1713;
COMMENT Drags items between multiple slots. This is usually triggered by the player clicking and dragging between slots.
COMMENT
COMMENT <p>This action happens in 3 stages. Stage 0 signals that the drag has begun, and stage 2 signals that the drag has ended. In between multiple stage 1s signal which slots were dragged on.</p>
COMMENT
COMMENT <p>The stage is packed into the click data along with the mouse button that was clicked. See {@link net.minecraft.screen.ScreenHandler#packQuickCraftData(int, int) ScreenHandler.packQuickCraftData(int, int)} for details.</p>
FIELD field_7790 PICKUP Lnet/minecraft/class_1713;
COMMENT Performs a normal slot click. This can pickup or place items in the slot, possibly merging the cursor stack into the slot, or swapping the slot stack with the cursor stack if they can't be merged.
FIELD field_7791 SWAP Lnet/minecraft/class_1713;
COMMENT Exchanges items between a slot and a hotbar slot. This is usually triggered by the player pressing a 1-9 number key while hovering over a slot.
COMMENT
COMMENT <p>When the action type is swap, the click data is the hotbar slot to swap with (0-8).</p>
FIELD field_7793 PICKUP_ALL Lnet/minecraft/class_1713;
COMMENT Replenishes the cursor stack with items from the screen handler. This is usually triggered by the player double clicking.
FIELD field_7794 QUICK_MOVE Lnet/minecraft/class_1713;
COMMENT Performs a shift-click. This usually quickly moves items between the player's inventory and the open screen handler.
FIELD field_7795 THROW Lnet/minecraft/class_1713;
COMMENT Throws the item out of the inventory. This is usually triggered by the player pressing Q while hovering over a slot, or clicking outside the window.
COMMENT
COMMENT <p>When the action type is throw, the click data determines whether to throw a whole stack (1) or a single item from that stack (0).</p>
FIELD field_7796 CLONE Lnet/minecraft/class_1713;
COMMENT Clones the item in the slot. Usually triggered by middle clicking an item in creative mode.