Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
refactor: wasItemDeleted -> itemWasDeleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Giggitybyte committed Feb 8, 2021
1 parent 107c302 commit 3297fb9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ public TrashCanGuiDescription(int syncId, PlayerInventory playerInventory, Scree
@Override
public ItemStack onSlotClick(int slotIndex, int button, SlotActionType action, PlayerEntity player) {
Slot trashSlot = this.slots.get(0);
boolean wasItemDeleted = false;
boolean itemWasDeleted = false;

if ((slotIndex == 0) && ((action == SlotActionType.PICKUP) & (button == 0))) {
wasItemDeleted = tryCursorDelete(trashSlot, player);
itemWasDeleted = tryCursorDelete(trashSlot, player);
} else if ((action == SlotActionType.QUICK_MOVE) && (slotIndex != 0)) { // Shift-click.
wasItemDeleted = tryQuickDelete(trashSlot, this.slots.get(slotIndex));
itemWasDeleted = tryQuickDelete(trashSlot, this.slots.get(slotIndex));
}

if (wasItemDeleted) {
if (itemWasDeleted) {
trashSlot.markDirty();
player.inventory.markDirty();

Expand Down

0 comments on commit 3297fb9

Please sign in to comment.