@@ -62,7 +62,6 @@ private enum PageMode {
6262 private EditBox exitField ;
6363 private EditBox waypointYField ;
6464 private EditBox waypointSpeedField ;
65- private EditBox waypointHoldField ;
6665
6766 private Button targetModeButton ;
6867 private Button tabBaseButton ;
@@ -267,14 +266,10 @@ protected void init() {
267266 waypointYField .setValue ("0" );
268267 addRouteWidget (waypointYField );
269268
270- waypointSpeedField = new EditBox (font , x + leftX , waypointBaseY + 22 , leftListWidth , 16 , Component .translatable ("screen.immersive_autopilot.waypoint_speed" ));
269+ waypointSpeedField = new EditBox (font , x + leftX , waypointBaseY + 44 , leftListWidth , 16 , Component .translatable ("screen.immersive_autopilot.waypoint_speed" ));
271270 waypointSpeedField .setValue ("1.0" );
272271 addRouteWidget (waypointSpeedField );
273272
274- waypointHoldField = new EditBox (font , x + leftX , waypointBaseY + 44 , leftListWidth , 16 , Component .translatable ("screen.immersive_autopilot.waypoint_hold" ));
275- waypointHoldField .setValue ("0" );
276- addRouteWidget (waypointHoldField );
277-
278273 applyWaypointButton = Button .builder (Component .translatable ("screen.immersive_autopilot.apply_waypoint" ),
279274 button -> applyWaypointEdit ())
280275 .bounds (x + leftX , waypointBaseY + 66 , leftListWidth , 18 ).build ();
@@ -480,7 +475,6 @@ private void updateWaypointControls() {
480475 deleteWaypointButton .active = active ;
481476 waypointYField .active = active ;
482477 waypointSpeedField .active = active && allowSpeedConfig ;
483- waypointHoldField .active = active ;
484478 waypointSpeedField .visible = allowSpeedConfig ;
485479 if (active ) {
486480 RouteWaypoint wp = activeRoute .getWaypoints ().get (selectedPointIndex );
@@ -490,9 +484,6 @@ private void updateWaypointControls() {
490484 if (allowSpeedConfig && (!waypointSpeedField .isFocused () || selectedPointIndex != lastSelectedPointIndex )) {
491485 waypointSpeedField .setValue (String .format (java .util .Locale .ROOT , "%.2f" , wp .getSpeed ()));
492486 }
493- if (!waypointHoldField .isFocused () || selectedPointIndex != lastSelectedPointIndex ) {
494- waypointHoldField .setValue (Integer .toString (wp .getHoldSeconds ()));
495- }
496487 }
497488 lastSelectedPointIndex = selectedPointIndex ;
498489 }
@@ -507,7 +498,7 @@ private void applyWaypointEdit() {
507498 if (allowSpeedConfig ) {
508499 speed = clampFloat (waypointSpeedField .getValue (), current .getSpeed (), 0.0f , 1.0f );
509500 }
510- int hold = parseInt ( waypointHoldField . getValue (), current .getHoldSeconds () );
501+ int hold = current .getHoldSeconds ();
511502 List <RouteWaypoint > newPoints = new ArrayList <>(activeRoute .getWaypoints ());
512503 newPoints .set (selectedPointIndex , new RouteWaypoint (
513504 new net .minecraft .core .BlockPos (current .getPos ().getX (), y , current .getPos ().getZ ()),
@@ -734,7 +725,6 @@ public void render(GuiGraphics graphics, int mouseX, int mouseY, float partialTi
734725 if (allowSpeedConfig ) {
735726 drawFieldLabel (graphics , Component .translatable ("screen.immersive_autopilot.waypoint_speed" ), waypointSpeedField );
736727 }
737- drawFieldLabel (graphics , Component .translatable ("screen.immersive_autopilot.waypoint_hold" ), waypointHoldField );
738728 }
739729
740730 if (pageMode == PageMode .ROUTE ) {
0 commit comments