1515import gregtech .client .renderer .texture .Textures ;
1616import gregtech .client .renderer .texture .cube .SimpleSidedCubeRenderer ;
1717import gregtech .common .covers .filter .ItemFilterContainer ;
18+ import gregtech .common .mui .widget .GTTextFieldWidget ;
1819import gregtech .common .pipelike .itempipe .tile .TileEntityItemPipe ;
1920
2021import net .minecraft .client .renderer .texture .TextureAtlasSprite ;
5354import com .cleanroommc .modularui .value .sync .EnumSyncValue ;
5455import com .cleanroommc .modularui .value .sync .IntSyncValue ;
5556import com .cleanroommc .modularui .value .sync .PanelSyncManager ;
56- import com .cleanroommc .modularui .value .sync .StringSyncValue ;
57- import com .cleanroommc .modularui .widget .ParentWidget ;
5857import com .cleanroommc .modularui .widgets .ButtonWidget ;
5958import com .cleanroommc .modularui .widgets .layout .Flow ;
60- import com .cleanroommc .modularui .widgets .textfield .TextFieldWidget ;
6159import it .unimi .dsi .fastutil .ints .Int2ObjectOpenHashMap ;
6260import it .unimi .dsi .fastutil .ints .IntArrayList ;
6361import it .unimi .dsi .fastutil .ints .IntList ;
@@ -498,11 +496,6 @@ public <T> T getCapability(Capability<T> capability, T defaultValue) {
498496 return defaultValue ;
499497 }
500498
501- @ Override
502- public boolean usesMui2 () {
503- return true ;
504- }
505-
506499 @ Override
507500 public ModularPanel buildUI (SidedPosGuiData guiData , PanelSyncManager guiSyncManager , UISettings settings ) {
508501 var panel = GTGuis .createPanel (this , 176 , 192 + 18 );
@@ -514,7 +507,7 @@ public ModularPanel buildUI(SidedPosGuiData guiData, PanelSyncManager guiSyncMan
514507 .bindPlayerInventory ();
515508 }
516509
517- protected ParentWidget < Flow > createUI (GuiData data , PanelSyncManager guiSyncManager ) {
510+ protected Flow createUI (GuiData data , PanelSyncManager guiSyncManager ) {
518511 var column = Flow .column ().top (24 ).margin (7 , 0 )
519512 .widthRel (1f ).coverChildrenHeight ();
520513
@@ -526,16 +519,12 @@ protected ParentWidget<Flow> createUI(GuiData data, PanelSyncManager guiSyncMana
526519
527520 IntSyncValue throughput = new IntSyncValue (this ::getTransferRate , this ::setTransferRate );
528521
529- StringSyncValue formattedThroughput = new StringSyncValue (throughput ::getStringValue ,
530- throughput ::setStringValue );
531-
532522 EnumSyncValue <DistributionMode > distributionMode = new EnumSyncValue <>(DistributionMode .class ,
533523 this ::getDistributionMode , this ::setDistributionMode );
534524
535525 guiSyncManager .syncValue ("manual_io" , manualIOmode );
536526 guiSyncManager .syncValue ("conveyor_mode" , conveyorMode );
537527 guiSyncManager .syncValue ("distribution_mode" , distributionMode );
538- guiSyncManager .syncValue ("throughput" , throughput );
539528
540529 if (createThroughputRow ())
541530 column .child (Flow .row ().coverChildrenHeight ()
@@ -548,11 +537,12 @@ protected ParentWidget<Flow> createUI(GuiData data, PanelSyncManager guiSyncMana
548537 return true ;
549538 })
550539 .onUpdateListener (w -> w .overlay (createAdjustOverlay (false ))))
551- .child (new TextFieldWidget ()
540+ .child (new GTTextFieldWidget ()
552541 .left (18 ).right (18 )
542+ .setPostFix (" items/s" )
553543 .setTextColor (Color .WHITE .darker (1 ))
554544 .setNumbers (1 , maxItemTransferRate )
555- .value (formattedThroughput )
545+ .value (throughput )
556546 .background (GTGuiTextures .DISPLAY ))
557547 .child (new ButtonWidget <>()
558548 .right (0 ).width (18 )
0 commit comments