Bundle related methods (#1843)

* Bundle related methods

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Match ItemStack with Item methods

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
This commit is contained in:
Emily Rose Alexandra 2020-11-06 16:51:37 -06:00 committed by GitHub
parent e308a8a7f5
commit ee05e2b403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 0 deletions

View File

@ -1 +1,9 @@
CLASS net/minecraft/class_5537 net/minecraft/item/BundleItem CLASS net/minecraft/class_5537 net/minecraft/item/BundleItem
FIELD field_27016 ITEM_BAR_COLOR I
METHOD method_31557 emptyBundle (Lnet/minecraft/class_1799;Lnet/minecraft/class_1661;)V
METHOD method_31560 addToBundle (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)V
ARG 0 bundle
ARG 1 stack
METHOD method_31561 getAmountFilled (Lnet/minecraft/class_1799;)F
METHOD method_31562 getItemOccupancy (Lnet/minecraft/class_1799;)I
METHOD method_31563 getBundleOccupancy (Lnet/minecraft/class_1799;)I

View File

@ -21,6 +21,12 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
METHOD method_24357 damage (Lnet/minecraft/class_1282;)Z METHOD method_24357 damage (Lnet/minecraft/class_1282;)Z
ARG 1 source ARG 1 source
METHOD method_24358 isFireproof ()Z METHOD method_24358 isFireproof ()Z
METHOD method_31565 onStackClicked (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_5536;Lnet/minecraft/class_1661;)Z
METHOD method_31566 onClicked (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_5536;Lnet/minecraft/class_1661;)Z
METHOD method_31567 isItemBarVisible (Lnet/minecraft/class_1799;)Z
METHOD method_31568 hasStoredInventory ()Z
METHOD method_31569 getItemBarStep (Lnet/minecraft/class_1799;)I
METHOD method_31571 getItemBarColor (Lnet/minecraft/class_1799;)I
METHOD method_7836 use (Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271; METHOD method_7836 use (Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271;
COMMENT Called when an item is used by a player. COMMENT Called when an item is used by a player.
COMMENT The use action, by default, is bound to the right mouse button. COMMENT The use action, by default, is bound to the right mouse button.

View File

@ -38,6 +38,11 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
METHOD method_30267 isSectionHidden (ILnet/minecraft/class_1799$class_5422;)Z METHOD method_30267 isSectionHidden (ILnet/minecraft/class_1799$class_5422;)Z
ARG 0 flags ARG 0 flags
METHOD method_30268 addHideFlag (Lnet/minecraft/class_1799$class_5422;)V METHOD method_30268 addHideFlag (Lnet/minecraft/class_1799$class_5422;)V
METHOD method_31575 onStackClicked (Lnet/minecraft/class_1799;Lnet/minecraft/class_5536;Lnet/minecraft/class_1661;)Z
METHOD method_31576 onClicked (Lnet/minecraft/class_1799;Lnet/minecraft/class_5536;Lnet/minecraft/class_1661;)Z
METHOD method_31578 isItemBarVisible ()Z
METHOD method_31579 getItemBarStep ()I
METHOD method_31580 getItemBarColor ()I
METHOD method_31573 isIn (Lnet/minecraft/class_3494;)Z METHOD method_31573 isIn (Lnet/minecraft/class_3494;)Z
ARG 1 tag ARG 1 tag
METHOD method_31574 itemMatches (Lnet/minecraft/class_1792;)Z METHOD method_31574 itemMatches (Lnet/minecraft/class_1792;)Z

View File

@ -33,6 +33,8 @@ CLASS net/minecraft/class_1703 net/minecraft/screen/ScreenHandler
ARG 0 context ARG 0 context
ARG 1 player ARG 1 player
ARG 2 block ARG 2 block
METHOD method_30010 (IILnet/minecraft/class_1713;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1799;
ARG 2 clickData
METHOD method_7590 setPlayerRestriction (Lnet/minecraft/class_1657;Z)V METHOD method_7590 setPlayerRestriction (Lnet/minecraft/class_1657;Z)V
ARG 1 player ARG 1 player
ARG 2 unrestricted ARG 2 unrestricted
@ -46,6 +48,7 @@ CLASS net/minecraft/class_1703 net/minecraft/screen/ScreenHandler
METHOD method_7593 onSlotClick (IILnet/minecraft/class_1713;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1799; 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 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 COMMENT @return The stack that was clicked on before anything changed, used mostly for verifying that the client and server are in sync
ARG 2 clickData
ARG 3 actionType ARG 3 actionType
COMMENT The type of slot click. Check the docs for each SlotActionType value for details COMMENT The type of slot click. Check the docs for each SlotActionType value for details
METHOD method_7594 unpackQuickCraftStage (I)I METHOD method_7594 unpackQuickCraftStage (I)I

View File

@ -0,0 +1,3 @@
CLASS net/minecraft/class_5536 net/minecraft/util/ClickType
FIELD field_27013 LEFT Lnet/minecraft/class_5536;
FIELD field_27014 RIGHT Lnet/minecraft/class_5536;