Skip to content

Commit

Permalink
Fixed InventoryTweaks crash (MeteorDevelopment#3928)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikinger8 authored Aug 10, 2023
1 parent 65509bb commit f66f53e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ public void onClickArmorSlot(int syncId, int slotId, int button, SlotActionType
clickSlot(syncId, 17, armorSlot, SlotActionType.SWAP, player); //armor slot <-> inv slot
ci.cancel();
} else if (actionType == SlotActionType.SWAP) {
clickSlot(syncId, 36 + button, armorSlot, SlotActionType.SWAP, player); //invert swap
ci.cancel();
if (button >= 10) {
clickSlot(syncId, 45, armorSlot, SlotActionType.SWAP, player);
ci.cancel();
} else {
clickSlot(syncId, 36 + button, armorSlot, SlotActionType.SWAP, player); //invert swap
ci.cancel();
}
}
}
}
Expand Down

0 comments on commit f66f53e

Please sign in to comment.