diff --git a/src/main/java/de/ellpeck/prettypipes/pipe/modules/stacksize/StackSizeModuleGui.java b/src/main/java/de/ellpeck/prettypipes/pipe/modules/stacksize/StackSizeModuleGui.java index 9699001..b90b77a 100644 --- a/src/main/java/de/ellpeck/prettypipes/pipe/modules/stacksize/StackSizeModuleGui.java +++ b/src/main/java/de/ellpeck/prettypipes/pipe/modules/stacksize/StackSizeModuleGui.java @@ -35,8 +35,8 @@ public class StackSizeModuleGui extends AbstractPipeGui data = () -> this.menu.moduleStack.getOrDefault(StackSizeModuleItem.Data.TYPE, StackSizeModuleItem.Data.DEFAULT); + textField.setValue(String.valueOf(data.get().maxStackSize())); textField.setMaxLength(4); textField.setResponder(s -> { if (s.isEmpty()) @@ -44,7 +44,7 @@ public class StackSizeModuleGui extends AbstractPipeGui buttonText = () -> Component.translatable("info." + PrettyPipes.ID + ".limit_to_max_" + (data.limitToMaxStackSize() ? "on" : "off")); + Supplier buttonText = () -> Component.translatable("info." + PrettyPipes.ID + ".limit_to_max_" + (data.get().limitToMaxStackSize() ? "on" : "off")); this.addRenderableWidget(Button.builder(buttonText.get(), b -> { PacketButton.sendAndExecute(this.menu.tile.getBlockPos(), ButtonResult.STACK_SIZE_MODULE_BUTTON, List.of()); b.setMessage(buttonText.get());