diff --git a/CHANGELOG.md b/CHANGELOG.md index 306c649be..0ccddfcfe 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ NOTE: Worlds that used Refined Storage 1.5.x are fully compatible with Refined S - 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) +- Fixed crash when moving a wireless item with the number keys (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/ContainerBase.java b/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerBase.java index 0ecf22a9c..37a14a792 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerBase.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerBase.java @@ -49,7 +49,7 @@ public abstract class ContainerBase extends Container { int x = xInventory + i * 18; int y = yInventory + 4 + (3 * 18); - if (i == player.inventory.currentItem && isHeldItemDisabled()) { + if (isHeldItemDisabled() && i == player.inventory.currentItem) { addSlotToContainer(new SlotDisabled(player.inventory, id, x, y)); } else { addSlotToContainer(new Slot(player.inventory, id, x, y)); @@ -71,6 +71,12 @@ public abstract class ContainerBase extends Container { public ItemStack slotClick(int id, int dragType, ClickType clickType, EntityPlayer player) { Slot slot = id >= 0 ? getSlot(id) : null; + // Prevent swapping disabled held item with the number keys + // (dragType is the slot we're swapping with) + if (isHeldItemDisabled() && clickType == ClickType.SWAP && dragType == player.inventory.currentItem) { + return ItemStack.EMPTY; + } + if (slot instanceof SlotFilter) { if (slot.getStack().getItem() == RSItems.FILTER) { return super.slotClick(id, dragType, clickType, player);