Skip to content

Commit dc2534f

Browse files
authored
Add setter to slotwidget to disable rendering stack size (#83)
1 parent 47388e0 commit dc2534f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/gtnewhorizons/modularui/common/widget/SlotWidget.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class SlotWidget extends Widget implements IVanillaSlot, Interactable, IS
6363
protected boolean handlePhantomActionClient = false;
6464

6565
protected boolean controlsAmount = false;
66+
protected boolean renderStackSize = true;
6667
private Function<List<String>, List<String>> overwriteItemStackTooltip;
6768

6869
protected Consumer<Widget> onDragAndDropComplete;
@@ -286,6 +287,11 @@ public SlotWidget setControlsAmount(boolean controlsAmount) {
286287
return this;
287288
}
288289

290+
public SlotWidget setRenderStackSize(boolean renderStackSize) {
291+
this.renderStackSize = renderStackSize;
292+
return this;
293+
}
294+
289295
public SlotWidget setOverwriteItemStackTooltip(Function<List<String>, List<String>> overwriteItemStackTooltip) {
290296
this.overwriteItemStackTooltip = overwriteItemStackTooltip;
291297
return this;
@@ -462,7 +468,7 @@ private ModularGui getScreen() {
462468

463469
@SideOnly(Side.CLIENT)
464470
protected void drawSlot(Slot slotIn) {
465-
drawSlot(slotIn, true);
471+
drawSlot(slotIn, renderStackSize);
466472
}
467473

468474
@SideOnly(Side.CLIENT)

0 commit comments

Comments
 (0)