@@ -92,6 +92,7 @@ public class MapSettingsManager implements ISettingsManager {
9292 public boolean waypointCompassShowCoords = true ;
9393 public boolean waypointCompassTextOutline = true ;
9494 public int waypointCompassIconRange = -1 ;
95+ public int waypointCompassMaxWaypoints = 8 ;
9596 public int waypointCompassX = 50 ;
9697 public int waypointCompassY = 3 ;
9798 public int waypointCompassTextOpacity = 100 ;
@@ -222,6 +223,7 @@ public void loadAll() {
222223 case "Waypoint Compass Show Coords" -> waypointCompassShowCoords = Boolean .parseBoolean (curLine [1 ]);
223224 case "Waypoint Compass Text Outline" -> waypointCompassTextOutline = Boolean .parseBoolean (curLine [1 ]);
224225 case "Waypoint Compass Icon Range" -> waypointCompassIconRange = Mth .clamp (Integer .parseInt (curLine [1 ]), -1 , 10000 );
226+ case "Waypoint Compass Max Waypoints" -> waypointCompassMaxWaypoints = Mth .clamp (Integer .parseInt (curLine [1 ]), 1 , 64 );
225227 case "Waypoint Compass X" -> waypointCompassX = Mth .clamp (Integer .parseInt (curLine [1 ]), 0 , 100 );
226228 case "Waypoint Compass Y" -> waypointCompassY = Mth .clamp (Integer .parseInt (curLine [1 ]), 0 , 40 );
227229 case "Waypoint Compass Text Opacity" -> waypointCompassTextOpacity = Mth .clamp (Integer .parseInt (curLine [1 ]), 0 , 100 );
@@ -332,6 +334,7 @@ public void saveAll() {
332334 out .println ("Waypoint Compass Show Coords:" + waypointCompassShowCoords );
333335 out .println ("Waypoint Compass Text Outline:" + waypointCompassTextOutline );
334336 out .println ("Waypoint Compass Icon Range:" + waypointCompassIconRange );
337+ out .println ("Waypoint Compass Max Waypoints:" + waypointCompassMaxWaypoints );
335338 out .println ("Waypoint Compass X:" + waypointCompassX );
336339 out .println ("Waypoint Compass Y:" + waypointCompassY );
337340 out .println ("Waypoint Compass Text Opacity:" + waypointCompassTextOpacity );
@@ -402,6 +405,7 @@ public String getKeyText(EnumOptionsMinimap option) {
402405 case WAYPOINT_DISTANCE -> s + (value < 0.0F ? I18n .get ("options.minimap.waypoints.infinite" ) : (int ) value );
403406 case WAYPOINT_SIGN_SCALE -> s + String .format ("%.2fx" , value );
404407 case WAYPOINT_COMPASS_ICON_RANGE -> s + (value < 0.0F ? I18n .get ("options.minimap.waypoints.infinite" ) : (int ) value );
408+ case WAYPOINT_COMPASS_MAX_WAYPOINTS -> s + (int ) value ;
405409 case WAYPOINT_COMPASS_X , WAYPOINT_COMPASS_Y , WAYPOINT_COMPASS_TEXT_OPACITY , WAYPOINT_COMPASS_OUTLINE_OPACITY , WAYPOINT_COMPASS_BACKGROUND_OPACITY -> s + (int ) value ;
406410
407411 default -> s + (value <= 0.0F ? I18n .get ("options.off" ) : (int ) value + "%" );
@@ -650,6 +654,7 @@ public float getFloatValue(EnumOptionsMinimap option) {
650654 case WAYPOINT_DISTANCE -> maxWaypointDisplayDistance ;
651655 case WAYPOINT_SIGN_SCALE -> waypointSignScale ;
652656 case WAYPOINT_COMPASS_ICON_RANGE -> waypointCompassIconRange ;
657+ case WAYPOINT_COMPASS_MAX_WAYPOINTS -> waypointCompassMaxWaypoints ;
653658 case WAYPOINT_COMPASS_X -> waypointCompassX ;
654659 case WAYPOINT_COMPASS_Y -> waypointCompassY ;
655660 case WAYPOINT_COMPASS_TEXT_OPACITY -> waypointCompassTextOpacity ;
@@ -684,6 +689,7 @@ public void setFloatValue(EnumOptionsMinimap option, float value) {
684689 float distance = Mth .lerp (value , 100.0F , 10001.0F );
685690 waypointCompassIconRange = distance > 10000.0F ? -1 : (int ) distance ;
686691 }
692+ case WAYPOINT_COMPASS_MAX_WAYPOINTS -> waypointCompassMaxWaypoints = Mth .clamp (Math .round (Mth .lerp (value , 1.0F , 64.0F )), 1 , 64 );
687693 case WAYPOINT_COMPASS_X -> waypointCompassX = Mth .clamp (Math .round (value * 100.0F ), 0 , 100 );
688694 case WAYPOINT_COMPASS_Y -> waypointCompassY = Mth .clamp (Math .round (value * 40.0F ), 0 , 40 );
689695 case WAYPOINT_COMPASS_TEXT_OPACITY -> waypointCompassTextOpacity = Mth .clamp (Math .round (value * 100.0F ), 0 , 100 );
0 commit comments