diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-05-27 18:47:02 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2023-05-29 20:32:43 +0800 |
| commit | 4450f1ed8941537d43858bdd771f20f1149ee38f (patch) | |
| tree | 1be8b4b620595fb934af6ead8bf73fa21b6e6d51 /runtime/src/main/java | |
| parent | 00c275e2fee7ea2551dc1cacb2a6df4be2f9d718 (diff) | |
| download | RoughlyEnoughItems-4450f1ed8941537d43858bdd771f20f1149ee38f.tar.gz RoughlyEnoughItems-4450f1ed8941537d43858bdd771f20f1149ee38f.tar.bz2 RoughlyEnoughItems-4450f1ed8941537d43858bdd771f20f1149ee38f.zip | |
Fix #866
Diffstat (limited to 'runtime/src/main/java')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/DisplayedEntryWidget.java | 11 |
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 f94cc433c..06890b481 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); } } |
