Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoriusT committed Sep 29, 2023
1 parent b8a370f commit 8c7ae05
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ 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)) {
// Check for Achievements so those wont get skipped.
// Check for Achievements so those won't get skipped.
if (aPlayer instanceof EntityPlayer) UT.Inventories.checkAchievements((EntityPlayer)aPlayer, slot(i));
// Merge Stacks when applicable.
for (int j = 0; j < aPlayerInventory.getSizeInventory(); j++) {
Expand Down Expand Up @@ -219,13 +219,12 @@ public long onToolClick(String aTool, long aRemainingDurability, long aQuality,
if (!slotHas(i)) break;
}
}
// Nothing was done.
if (rCount <= 0) return 1;
// Make Sound and update Player Inventory if Items got transferred.
if (rCount > 0) {
UT.Sounds.send(SFX.MC_COLLECT, this);
ST.update(aPlayer);
return rCount;
}
return 1;
UT.Sounds.send(SFX.MC_COLLECT, this);
ST.update(aPlayer);
return rCount;
}
return 0;
}
Expand Down

0 comments on commit 8c7ae05

Please sign in to comment.