From 3191b4b9a7fdb2ddb591533391ef1e53becd9cbd Mon Sep 17 00:00:00 2001 From: enbrain <69905075+enbrain@users.noreply.github.com> Date: Mon, 24 Aug 2020 06:02:35 +0900 Subject: [PATCH] Add mappings for inventory-related (#1704) * Add mappings for inventory-related * itemStack -> stack Co-authored-by: liach <7806504+liach@users.noreply.github.com> * clear -> remove * Add Javadoc * Update Javadoc Co-authored-by: liach <7806504+liach@users.noreply.github.com> * Update Javadoc Co-authored-by: liach <7806504+liach@users.noreply.github.com> * Update Javadoc Co-authored-by: liach <7806504+liach@users.noreply.github.com> * Update Javadoc Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> --- .../entity/player/PlayerInventory.mapping | 4 ++++ .../net/minecraft/inventory/Inventories.mapping | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/mappings/net/minecraft/entity/player/PlayerInventory.mapping b/mappings/net/minecraft/entity/player/PlayerInventory.mapping index 86242adfa7..548c13c605 100644 --- a/mappings/net/minecraft/entity/player/PlayerInventory.mapping +++ b/mappings/net/minecraft/entity/player/PlayerInventory.mapping @@ -9,6 +9,10 @@ CLASS net/minecraft/class_1661 net/minecraft/entity/player/PlayerInventory FIELD field_7549 cursorStack Lnet/minecraft/class_1799; METHOD (Lnet/minecraft/class_1657;)V ARG 1 player + METHOD method_29280 remove (Ljava/util/function/Predicate;ILnet/minecraft/class_1263;)I + ARG 1 shouldRemove + ARG 2 maxCount + ARG 3 craftingInventory METHOD method_7364 getChangeCount ()I METHOD method_7365 swapSlotWithHotbar (I)V ARG 1 hotbarSlot diff --git a/mappings/net/minecraft/inventory/Inventories.mapping b/mappings/net/minecraft/inventory/Inventories.mapping index f5a93f8e67..77713a4fa3 100644 --- a/mappings/net/minecraft/inventory/Inventories.mapping +++ b/mappings/net/minecraft/inventory/Inventories.mapping @@ -1,4 +1,20 @@ CLASS net/minecraft/class_1262 net/minecraft/inventory/Inventories + METHOD method_29234 remove (Lnet/minecraft/class_1263;Ljava/util/function/Predicate;IZ)I + COMMENT Removes a number, not exceeding {@code maxCount}, of items from an inventory based on a predicate and returns that number. + COMMENT @return the number of items removed + ARG 0 inventory + ARG 1 shouldRemove + ARG 2 maxCount + ARG 3 dryRun + COMMENT whether to return the number of items which would have been removed without actually removing them + METHOD method_29235 remove (Lnet/minecraft/class_1799;Ljava/util/function/Predicate;IZ)I + COMMENT Removes a number, not exceeding {@code maxCount}, of items from an item stack based on a predicate and returns that number. + COMMENT @return the number of items removed + ARG 0 stack + ARG 1 shouldRemove + ARG 2 maxCount + ARG 3 dryRun + COMMENT whether to return the number of items which would have been removed without actually removing them METHOD method_5426 toTag (Lnet/minecraft/class_2487;Lnet/minecraft/class_2371;)Lnet/minecraft/class_2487; ARG 0 tag ARG 1 stacks