Create Favorites Widget; More hotkeys; More Tooltips;

This commit is contained in:
slprime committed 2025-03-26 08:15:00 +02:00
1 parent 64a747e4bd
commit 204c37fa36
60 files changed
+8365 -3938

No files matched your search

@@ -2,6 +2,10 @@ package codechicken.nei;
import static codechicken.nei.NEIClientUtils.translate;
import net.minecraft.item.ItemStack;
import codechicken.nei.recipe.StackInfo;
public class ItemQuantityField extends TextField {
public ItemQuantityField(String ident) {
@@ -22,6 +26,22 @@ public class ItemQuantityField extends TextField {
}
}
public static ItemStack prepareStackWithQuantity(ItemStack stack, long amount) {
if (stack == null) {
return null;
}
if (amount == 0) {
amount = NEIClientConfig.showItemQuantityWidget() ? NEIClientConfig.getItemQuantity() : 0;
if (amount == 0) {
amount = StackInfo.itemStackToNBT(stack).hasKey("gtFluidName") ? 144 : stack.getMaxStackSize();
}
}
return StackInfo.withAmount(stack, amount);
}
@Override
public void gainFocus() {
if (text().equals("0")) {