Remap inventories :D (#1154)

* Remap inventories :D

* @see -> see @link

* getMaxStackAmount -> getMaxCountPerStack

Co-Authored-By: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Rename InventoryChangedListener.mapping to InventoryChangeCallback.mapping

* putStack -> setStack

* JD fixes

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>

* Fix filename

* isAccessible -> canStayOpen

* isAccessible -> canStayOpen

* Update javadoc

* jd for getMaxCountPerStack

Return value jd taken from #1053 (with fixes)

* Update mappings/net/minecraft/inventory/SidedInventory.mapping

Co-Authored-By: Yanis48 <doublecraft.official@gmail.com>

* canStayOpen -> canPlayerUse

* canStayOpen -> canPlayerUse

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Yanis48 <doublecraft.official@gmail.com>
This commit is contained in:
­Sollace 2020-03-27 20:04:46 +02:00 committed by GitHub
parent 80aa993105
commit 99ba24aaaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 54 additions and 24 deletions

View File

@ -1,12 +1,15 @@
CLASS net/minecraft/class_1277 net/minecraft/inventory/BasicInventory
FIELD field_5828 stackList Lnet/minecraft/class_2371;
FIELD field_5828 stacks Lnet/minecraft/class_2371;
FIELD field_5829 listeners Ljava/util/List;
FIELD field_5831 size I
METHOD <init> (I)V
ARG 1 size
METHOD <init> ([Lnet/minecraft/class_1799;)V
ARG 1 items
METHOD method_20631 poll (Lnet/minecraft/class_1792;I)Lnet/minecraft/class_1799;
METHOD method_20631 removeItem (Lnet/minecraft/class_1792;I)Lnet/minecraft/class_1799;
COMMENT Searches this inventory for the specified item and removes the given amount from this inventory.
COMMENT
COMMENT @return the stack of removed items
ARG 1 item
ARG 2 count
METHOD method_20632 transfer (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)V
@ -18,11 +21,15 @@ CLASS net/minecraft/class_1277 net/minecraft/inventory/BasicInventory
ARG 1 stack
METHOD method_24514 clearToList ()Ljava/util/List;
COMMENT Clears this inventory and return all the non-empty stacks in a list.
METHOD method_24825 canCombine (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
ARG 1 one
ARG 2 two
METHOD method_5488 removeListener (Lnet/minecraft/class_1265;)V
ARG 1 listener
METHOD method_5489 addListener (Lnet/minecraft/class_1265;)V
ARG 1 listener
METHOD method_5491 add (Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;
METHOD method_5491 addStack (Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;
ARG 1 stack
METHOD method_7659 readTags (Lnet/minecraft/class_2499;)V
ARG 1 tags
METHOD method_7660 getTags ()Lnet/minecraft/class_2499;

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_1731 net/minecraft/inventory/CraftingResultInventory
FIELD field_7865 lastRecipe Lnet/minecraft/class_1860;
FIELD field_7866 stack Lnet/minecraft/class_2371;
FIELD field_7866 stacks Lnet/minecraft/class_2371;

View File

@ -1,3 +1,4 @@
CLASS net/minecraft/class_1730 net/minecraft/inventory/EnderChestInventory
FIELD field_7864 currentBlockEntity Lnet/minecraft/class_2611;
METHOD method_7661 setCurrentBlockEntity (Lnet/minecraft/class_2611;)V
FIELD field_7864 activeBlockEntity Lnet/minecraft/class_2611;
METHOD method_7661 setActiveBlockEntity (Lnet/minecraft/class_2611;)V
ARG 1 blockEntity

View File

@ -1,28 +1,44 @@
CLASS net/minecraft/class_1263 net/minecraft/inventory/Inventory
METHOD method_18861 countInInv (Lnet/minecraft/class_1792;)I
METHOD method_18861 count (Lnet/minecraft/class_1792;)I
COMMENT Returns the number of times the specified item occurs in this inventory across all stored stacks.
ARG 1 item
METHOD method_18862 containsAnyInInv (Ljava/util/Set;)Z
METHOD method_18862 containsAny (Ljava/util/Set;)Z
COMMENT Determines whether this inventory contains any of the given candidate items.
ARG 1 items
METHOD method_5431 markDirty ()V
METHOD method_5432 onInvClose (Lnet/minecraft/class_1657;)V
METHOD method_5432 onClose (Lnet/minecraft/class_1657;)V
ARG 1 player
METHOD method_5434 takeInvStack (II)Lnet/minecraft/class_1799;
METHOD method_5434 removeStack (II)Lnet/minecraft/class_1799;
COMMENT Removes a specific number of items from the given slot.
COMMENT
COMMENT @return the removed items as a stack
ARG 1 slot
ARG 2 amount
METHOD method_5435 onInvOpen (Lnet/minecraft/class_1657;)V
METHOD method_5435 onOpen (Lnet/minecraft/class_1657;)V
ARG 1 player
METHOD method_5437 isValidInvStack (ILnet/minecraft/class_1799;)Z
METHOD method_5437 isValid (ILnet/minecraft/class_1799;)Z
COMMENT Returns whether the given stack is a valid for the indicated slot position.
ARG 1 slot
ARG 2 stack
METHOD method_5438 getInvStack (I)Lnet/minecraft/class_1799;
METHOD method_5438 getStack (I)Lnet/minecraft/class_1799;
COMMENT Fetches the stack currently stored at the given slot. If the slot is empty,
COMMENT or is outside the bounds of this inventory, returns see {@link ItemStack.EMPTY}.
ARG 1 slot
METHOD method_5439 getInvSize ()I
METHOD method_5441 removeInvStack (I)Lnet/minecraft/class_1799;
METHOD method_5439 size ()I
METHOD method_5441 removeStack (I)Lnet/minecraft/class_1799;
COMMENT Removes the stack currently stored at the indicated slot.
COMMENT
COMMENT @return the stack previously stored at the indicated slot.
ARG 1 slot
METHOD method_5442 isInvEmpty ()Z
METHOD method_5443 canPlayerUseInv (Lnet/minecraft/class_1657;)Z
METHOD method_5442 isEmpty ()Z
METHOD method_5443 canPlayerUse (Lnet/minecraft/class_1657;)Z
ARG 1 player
METHOD method_5444 getInvMaxStackAmount ()I
METHOD method_5447 setInvStack (ILnet/minecraft/class_1799;)V
METHOD method_5444 getMaxCountPerStack ()I
COMMENT Returns the maximum number of items a stack can contain when placed inside this inventory.
COMMENT No slots may have more than this number of items. It is effectively the
COMMENT stacking limit for this inventory's slots.
COMMENT
COMMENT @return the max {@link net.minecraft.item.ItemStack#getCount() count} of item stacks in this inventory
METHOD method_5447 setStack (ILnet/minecraft/class_1799;)V
ARG 1 slot
ARG 2 stack

View File

@ -0,0 +1,3 @@
CLASS net/minecraft/class_1265 net/minecraft/inventory/InventoryChangedListener
METHOD method_5453 onInventoryChanged (Lnet/minecraft/class_1263;)V
ARG 1 sender

View File

@ -1,2 +0,0 @@
CLASS net/minecraft/class_1265 net/minecraft/inventory/InventoryListener
METHOD method_5453 onInvChange (Lnet/minecraft/class_1263;)V

View File

@ -1,11 +1,15 @@
CLASS net/minecraft/class_1278 net/minecraft/inventory/SidedInventory
METHOD method_5492 canInsertInvStack (ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
COMMENT A special inventory interface for inventories that expose different slots for different sides, such as hoppers.
METHOD method_5492 canInsert (ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
COMMENT Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.
ARG 1 slot
ARG 2 stack
ARG 3 dir
METHOD method_5493 canExtractInvStack (ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
METHOD method_5493 canExtract (ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
COMMENT Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.
ARG 1 slot
ARG 2 stack
ARG 3 dir
METHOD method_5494 getInvAvailableSlots (Lnet/minecraft/class_2350;)[I
METHOD method_5494 getAvailableSlots (Lnet/minecraft/class_2350;)[I
COMMENT Gets the available slot positions that are reachable from a given side.
ARG 1 side

View File

@ -1,4 +1,5 @@
CLASS net/minecraft/class_3829 net/minecraft/util/Clearable
COMMENT Represents an object which can be cleared.
METHOD method_16825 clear (Ljava/lang/Object;)V
ARG 0 o
METHOD method_5448 clear ()V