From 9405d3f9fab05b5b27da38a443684bd8dd6a2fb7 Mon Sep 17 00:00:00 2001 From: Raoul Van den Berge Date: Sun, 4 Dec 2016 03:15:45 +0100 Subject: [PATCH] Bump to 1.3.2 + Fixed being able to exceed max stack size while shift clicking --- CHANGELOG.md | 3 +++ build.gradle | 2 +- src/main/java/com/raoulvdberge/refinedstorage/RS.java | 2 +- .../refinedstorage/container/ContainerBase.java | 9 +++++---- src/main/resources/mcmod.info | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 790e7969d..981bbed8e 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Refined Storage Changelog +### 1.3.2 +- Fixed being able to exceed max stack size while shift clicking (raoulvdberge) + ### 1.3.1 - Updated Forge to 2180 (raoulvdberge) - Made Upgrades stackable (raoulvdberge) diff --git a/build.gradle b/build.gradle index 0e5508316..2dbad9ab8 100755 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ apply plugin: 'maven' apply plugin: 'maven-publish' apply plugin: 'net.minecraftforge.gradle.forge' -version = "1.3.1" +version = "1.3.2" group = "refinedstorage" archivesBaseName = "refinedstorage" diff --git a/src/main/java/com/raoulvdberge/refinedstorage/RS.java b/src/main/java/com/raoulvdberge/refinedstorage/RS.java index e1a44730f..6b8e4d58d 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/RS.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/RS.java @@ -21,7 +21,7 @@ public final class RS { } public static final String ID = "refinedstorage"; - public static final String VERSION = "1.3.1"; + public static final String VERSION = "1.3.2"; public static final String GUI_FACTORY = "com.raoulvdberge.refinedstorage.gui.config.ModGuiFactory"; @SidedProxy(clientSide = "com.raoulvdberge.refinedstorage.proxy.ProxyClient", serverSide = "com.raoulvdberge.refinedstorage.proxy.ProxyCommon") diff --git a/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerBase.java b/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerBase.java index 2058ad4ea..094949e39 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerBase.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/container/ContainerBase.java @@ -55,15 +55,16 @@ public abstract class ContainerBase extends Container { if (!itemstack.isEmpty() && itemstack.getItem() == stack.getItem() && (!stack.getHasSubtypes() || stack.getMetadata() == itemstack.getMetadata()) && ItemStack.areItemStackTagsEqual(stack, itemstack)) { int j = itemstack.getCount() + stack.getCount(); + int max = Math.min(slot.getSlotStackLimit(), stack.getMaxStackSize()); - if (j <= slot.getSlotStackLimit()) { + if (j <= max) { stack.setCount(0); itemstack.setCount(j); slot.onSlotChanged(); flag = true; - } else if (itemstack.getCount() < slot.getSlotStackLimit()) { - stack.shrink(slot.getSlotStackLimit() - itemstack.getCount()); - itemstack.setCount(slot.getSlotStackLimit()); + } else if (itemstack.getCount() < max) { + stack.shrink(max - itemstack.getCount()); + itemstack.setCount(max); slot.onSlotChanged(); flag = true; } diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 38bc92f4d..72b418585 100755 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "refinedstorage", "name": "Refined Storage", "description": "An elegant solution to your hoarding problem", - "version": "1.3.1", + "version": "1.3.2", "mcversion": "1.11", "url": "", "updateUrl": "",