Skip to content

Commit bb1658c

Browse files
committed
use throughput directly as value
1 parent 4cbcf15 commit bb1658c

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/main/java/gregtech/common/covers/CoverConveyor.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,16 +520,12 @@ protected Flow createUI(GuiData data, PanelSyncManager guiSyncManager) {
520520

521521
IntSyncValue throughput = new IntSyncValue(this::getTransferRate, this::setTransferRate);
522522

523-
StringSyncValue formattedThroughput = new StringSyncValue(throughput::getStringValue,
524-
throughput::setStringValue);
525-
526523
EnumSyncValue<DistributionMode> distributionMode = new EnumSyncValue<>(DistributionMode.class,
527524
this::getDistributionMode, this::setDistributionMode);
528525

529526
guiSyncManager.syncValue("manual_io", manualIOmode);
530527
guiSyncManager.syncValue("conveyor_mode", conveyorMode);
531528
guiSyncManager.syncValue("distribution_mode", distributionMode);
532-
guiSyncManager.syncValue("throughput", throughput);
533529

534530
if (createThroughputRow())
535531
column.child(Flow.row().coverChildrenHeight()
@@ -547,7 +543,7 @@ protected Flow createUI(GuiData data, PanelSyncManager guiSyncManager) {
547543
.setPostFix(" items/s")
548544
.setTextColor(Color.WHITE.darker(1))
549545
.setNumbers(1, maxItemTransferRate)
550-
.value(formattedThroughput)
546+
.value(throughput)
551547
.background(GTGuiTextures.DISPLAY))
552548
.child(new ButtonWidget<>()
553549
.right(0).width(18)

src/main/java/gregtech/common/covers/CoverPump.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,10 @@ protected Flow createUI(GuiData data, PanelSyncManager syncManager) {
200200

201201
var throughput = new IntSyncValue(this::getTransferRate, this::setTransferRate);
202202

203-
var throughputString = new StringSyncValue(
204-
throughput::getStringValue, throughput::setStringValue);
205-
206203
var pumpMode = new EnumSyncValue<>(PumpMode.class, this::getPumpMode, this::setPumpMode);
207204

208205
syncManager.syncValue("manual_io", manualIOmode);
209206
syncManager.syncValue("pump_mode", pumpMode);
210-
syncManager.syncValue("throughput", throughput);
211207

212208
var column = Flow.column().top(24).margin(7, 0)
213209
.widthRel(1f).coverChildrenHeight();
@@ -228,7 +224,7 @@ protected Flow createUI(GuiData data, PanelSyncManager syncManager) {
228224
.setPostFix(" L/s")
229225
.setTextColor(Color.WHITE.darker(1))
230226
.setNumbers(1, maxFluidTransferRate)
231-
.value(throughputString)
227+
.value(throughput)
232228
.background(GTGuiTextures.DISPLAY))
233229
.child(new ButtonWidget<>()
234230
.right(0).width(18)

0 commit comments

Comments
 (0)