From c595a5082d8a8b241eb0b09e31d08586da98b499 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 26 Jun 2018 19:44:44 +0200 Subject: [PATCH] Fixed shift clicking a created pattern going into Grid inventory. Fixes #1653 --- CHANGELOG.md | 1 + .../refinedstorage/container/ContainerGrid.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f2927ee1..7ae50df55 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ NOTE: Worlds that used Refined Storage 1.5.x are fully compatible with Refined S - Fixed the Crafter crashing when opening it while connected to a Primal Tech Grill or Kiln (raoulvdberge) - Fixed bug where Crafting Upgrade on Interface kept too many items in stock (raoulvdberge) - Fixed bug where External Storage could only handle 1 fluid inventory per block (raoulvdberge) +- Fixed shift clicking a created pattern going into Grid inventory (raoulvdberge) - Prevent accidental Grid scrollbar click after clicking JEI recipe transfer button (raoulvdberge) - Added a missing config option for Crafter Manager energy usage (raoulvdberge) - Added support for Disk Drive / Storage Block storage and capacity to OC integration (zangai) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerGrid.java b/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerGrid.java index 5e8d6a9be..4d772b411 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerGrid.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerGrid.java @@ -209,6 +209,19 @@ public class ContainerGrid extends ContainerBase { if (slot.getHasStack()) { if (grid instanceof IPortableGrid && slot.slotNumber == 4) { // Prevent moving disk slot into portable grid itself + return ItemStack.EMPTY; + } else if (grid.getType() == GridType.PATTERN && slot.slotNumber == 5) { // From output slot to inventory + ItemStack stack = slot.getStack(); + + int startIndex = 5; + int endIndex = startIndex + (9 * 4); + + if (mergeItemStack(stack, startIndex, endIndex, false)) { + slot.onSlotChanged(); + + detectAndSendChanges(); + } + return ItemStack.EMPTY; } else if (slot == craftingResultSlot) { grid.onCraftedShift(player);