Skip to content

Commit

Permalink
nah its better this way
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoriusT committed Sep 29, 2023
1 parent 8c7ae05 commit 1cdcbc5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ public long onToolClick(String aTool, long aRemainingDurability, long aQuality,
}
}
if (aTool.equals(TOOL_pincers) && aPlayerInventory != null) {
long rCount = 0; for (int i = 0; i < invsize(); i++) if (slotHas(i)) {
long rCount = 0;
for (int i = 0; i < invsize(); i++) if (slotHas(i)) {
// Check for Achievements so those won't get skipped.
if (aPlayer instanceof EntityPlayer) UT.Inventories.checkAchievements((EntityPlayer)aPlayer, slot(i));
// Merge Stacks when applicable.
// Merge Stacks first when applicable.
for (int j = 0; j < aPlayerInventory.getSizeInventory(); j++) {
if (ST.equal(slot(i), aPlayerInventory.getStackInSlot(j))) {
rCount += ST.move(this, aPlayerInventory, i, j);
Expand All @@ -192,7 +193,7 @@ public long onToolClick(String aTool, long aRemainingDurability, long aQuality,
}
}
// Stackable NBT-less Items second.
if (rCount <= 0) for (int i = 0; i < invsize(); i++) if (slotHas(i) && ST.maxsize(slot(i)) > 1 && ST.nbt(slot(i)) == null) {
for (int i = 0; i < invsize(); i++) if (slotHas(i) && ST.maxsize(slot(i)) > 1 && ST.nbt(slot(i)) == null) {
for (int j = 9; j < aPlayerInventory.getSizeInventory(); j++) {
rCount += ST.move(this, aPlayerInventory, i, j);
if (!slotHas(i)) break;
Expand Down

0 comments on commit 1cdcbc5

Please sign in to comment.