Skip to content

Commit

Permalink
shift+click fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MEGATREX4 committed Aug 10, 2024
1 parent 736c62b commit b4c5cef
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,17 @@ public ItemStack quickMove(PlayerEntity playerIn, int index) {
ItemStack slotItemStack = slot.getStack();
itemStack = slotItemStack.copy();

// Prevent moving items into DRINKS_DISPLAY_SLOT and OUTPUT_SLOT
if (index == DRINKS_DISPLAY_SLOT || index == OUTPUT_SLOT) {
return ItemStack.EMPTY;
}

// Handle item transfer from OUTPUT_SLOT to player inventory
if (index == OUTPUT_SLOT) {
if (!this.insertItem(slotItemStack, 11, Math.min(47, this.slots.size()), true)) { // Ensure range is within bounds
return ItemStack.EMPTY;
}
slot.onQuickTransfer(slotItemStack, itemStack);
}
// Prevent moving items into DRINKS_DISPLAY_SLOT
else if (index == DRINKS_DISPLAY_SLOT) {
return ItemStack.EMPTY;
}
// Handle item transfer from player inventory slots
else if (index >= 11 && index < Math.min(47, this.slots.size())) { // Ensure range is within bounds
if (slotItemStack.getItem() == Items.WATER_BUCKET) {
Expand Down

0 comments on commit b4c5cef

Please sign in to comment.