Skip to content

Commit

Permalink
Add setter to slotwidget to disable rendering stack size (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Oct 11, 2024
1 parent 47388e0 commit dc2534f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class SlotWidget extends Widget implements IVanillaSlot, Interactable, IS
protected boolean handlePhantomActionClient = false;

protected boolean controlsAmount = false;
protected boolean renderStackSize = true;
private Function<List<String>, List<String>> overwriteItemStackTooltip;

protected Consumer<Widget> onDragAndDropComplete;
Expand Down Expand Up @@ -286,6 +287,11 @@ public SlotWidget setControlsAmount(boolean controlsAmount) {
return this;
}

public SlotWidget setRenderStackSize(boolean renderStackSize) {
this.renderStackSize = renderStackSize;
return this;
}

public SlotWidget setOverwriteItemStackTooltip(Function<List<String>, List<String>> overwriteItemStackTooltip) {
this.overwriteItemStackTooltip = overwriteItemStackTooltip;
return this;
Expand Down Expand Up @@ -462,7 +468,7 @@ private ModularGui getScreen() {

@SideOnly(Side.CLIENT)
protected void drawSlot(Slot slotIn) {
drawSlot(slotIn, true);
drawSlot(slotIn, renderStackSize);
}

@SideOnly(Side.CLIENT)
Expand Down

0 comments on commit dc2534f

Please sign in to comment.