aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/main
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-05-27 18:47:02 +0800
committershedaniel <daniel@shedaniel.me>2022-05-27 18:47:02 +0800
commit0d9d34ae4646056e50d82dce34b3b387b88f7f53 (patch)
treeecf523514411a9cff52ca6d90d5fb66e67d06e89 /runtime/src/main
parentab0daccf200c923379a2156838af2b5e6611bed5 (diff)
downloadRoughlyEnoughItems-0d9d34ae4646056e50d82dce34b3b387b88f7f53.tar.gz
RoughlyEnoughItems-0d9d34ae4646056e50d82dce34b3b387b88f7f53.tar.bz2
RoughlyEnoughItems-0d9d34ae4646056e50d82dce34b3b387b88f7f53.zip
Fix #866
Diffstat (limited to 'runtime/src/main')
-rw-r--r--runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/DisplayedEntryWidget.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/DisplayedEntryWidget.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/DisplayedEntryWidget.java
index d0643c592..58f46abaf 100644
--- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/DisplayedEntryWidget.java
+++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/DisplayedEntryWidget.java
@@ -68,8 +68,15 @@ public abstract class DisplayedEntryWidget extends EntryWidget {
EntryStack<ItemStack> cheatsAs = entry.cheatsAs();
entry = cheatsAs.isEmpty() ? entry : cheatsAs;
}
- if (entry.getValueType() == ItemStack.class)
- entry.<ItemStack>castValue().setCount(button != 1 && !Screen.hasShiftDown() == (ConfigObject.getInstance().getItemCheatingMode() == ItemCheatingMode.REI_LIKE) ? 1 : entry.<ItemStack>castValue().getMaxStackSize());
+ if (entry.getValueType() == ItemStack.class) {
+ boolean all;
+ if (ConfigObject.getInstance().getItemCheatingMode() == ItemCheatingMode.REI_LIKE) {
+ all = button == 1 || Screen.hasShiftDown();
+ } else {
+ all = button != 1 || Screen.hasShiftDown();
+ }
+ entry.<ItemStack>castValue().setCount(!all ? 1 : entry.<ItemStack>castValue().getMaxStackSize());
+ }
return ClientHelper.getInstance().tryCheatingEntry(entry);
}
}