Skip to content

Commit

Permalink
remove ones
Browse files Browse the repository at this point in the history
  • Loading branch information
notTamion committed Jan 4, 2025
1 parent 809f896 commit def89f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ public enum InventoryAction {
* Some of the items on the clicked slot are moved into the bundle on the cursor.
*/
PICKUP_SOME_INTO_BUNDLE,
/**
* One of the items on the clicked slot is moved into the bundle on the cursor.
*/
PICKUP_ONE_INTO_BUNDLE,
/**
* The first stack of items is moved to the clicked slot.
*/
Expand All @@ -121,9 +117,5 @@ public enum InventoryAction {
* Some of the items on the cursor are moved into the bundle in the clicked slot.
*/
PLACE_SOME_INTO_BUNDLE,
/**
* One of the items on the cursor is moved into the bundle in the clicked slot.
*/
PLACE_ONE_INTO_BUNDLE,
;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,7 @@
this.player.containerMenu.sendAllDataToRemote();
} else if (!this.player.containerMenu.stillValid(this.player)) {
LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
@@ -1713,7 +_,352 @@
@@ -1713,7 +_,348 @@
} else {
boolean flag = packet.getStateId() != this.player.containerMenu.getStateId();
this.player.containerMenu.suppressRemoteUpdates();
Expand Down Expand Up @@ -2093,8 +2093,6 @@
+ int toPickup = new net.minecraft.world.item.component.BundleContents.Mutable(cursor.get(DataComponents.BUNDLE_CONTENTS)).getMaxAmountToAdd(slot.getItem());
+ if (toPickup >= slot.getItem().getCount()) {
+ action = InventoryAction.PICKUP_ALL_INTO_BUNDLE;
+ } else if (toPickup == 1) {
+ action = InventoryAction.PICKUP_ONE_INTO_BUNDLE;
+ } else if (toPickup == 0) {
+ action = InventoryAction.NOTHING;
+ } else {
Expand All @@ -2104,8 +2102,6 @@
+ int toPickup = new net.minecraft.world.item.component.BundleContents.Mutable(slot.getItem().get(DataComponents.BUNDLE_CONTENTS)).getMaxAmountToAdd(cursor);
+ if (toPickup >= cursor.getCount()) {
+ action = InventoryAction.PLACE_ALL_INTO_BUNDLE;
+ } else if (toPickup == 1) {
+ action = InventoryAction.PLACE_ONE_INTO_BUNDLE;
+ } else if (toPickup == 0) {
+ action = InventoryAction.NOTHING;
+ } else {
Expand Down

0 comments on commit def89f3

Please sign in to comment.