@@ -80,6 +80,8 @@ public final class MapaHack extends Hack
8080 private final CheckboxSetting noMap = new CheckboxSetting ("No map" ,
8181 "Disables terrain rendering and cache writes while keeping ESP icons positioned inside the map box." ,
8282 false );
83+ private final CheckboxSetting espIconsEnabled =
84+ new CheckboxSetting ("Enable ESP icons" , true );
8385 private final SettingGroup mapEspGroup = new SettingGroup ("ESP icons" ,
8486 net .wurstclient .util .text .WText .literal (
8587 "Controls which enabled ESP hacks are mirrored onto the map." ),
@@ -178,6 +180,7 @@ public MapaHack()
178180 setCategory (Category .RENDER );
179181 addSetting (openWorldMapButton );
180182 addSetting (noMap );
183+ addSetting (espIconsEnabled );
181184 if (NiceWurstModule .isActive ())
182185 {
183186 mapEspGroup .addChildren (portalEspOnMap , playerEspOnMap ,
@@ -314,6 +317,9 @@ private void renderMinimapOverlay(GuiGraphicsExtractor context,
314317 private void renderMapEsp (GuiGraphicsExtractor context , float partialTicks ,
315318 XMapConfig cfg )
316319 {
320+ if (!espIconsEnabled .isChecked ())
321+ return ;
322+
317323 if (chestEspOnMap .isChecked () && WURST .getHax ().chestEspHack .isEnabled ())
318324 renderChestMarkers (context , cfg , partialTicks );
319325 if (workstationEspOnMap .isChecked ()
@@ -620,6 +626,7 @@ public void onMouseUpdate(MouseUpdateEvent event)
620626 public void resetToDefaults ()
621627 {
622628 noMap .setChecked (false );
629+ espIconsEnabled .setChecked (true );
623630 minimapSize .setValue (220 );
624631 minimapZoom .setValue (2.0 );
625632 minimapIconSize .setValue (8 );
@@ -869,6 +876,7 @@ private void updateMapSettingVisibility()
869876 {
870877 boolean mapVisible = !noMap .isChecked ();
871878 boolean niceWurst = NiceWurstModule .isActive ();
879+ boolean espVisible = mapVisible && espIconsEnabled .isChecked ();
872880 minimapSamples .setVisibleInGui (mapVisible );
873881 rotateWithPlayer .setVisibleInGui (mapVisible );
874882 undergroundMode .setVisibleInGui (mapVisible );
@@ -897,13 +905,14 @@ private void updateMapSettingVisibility()
897905 waterDetail .setVisibleInGui (mapVisible );
898906 waterOpacity .setVisibleInGui (mapVisible );
899907 chunkRefreshAggression .setVisibleInGui (mapVisible );
900- chestEspOnMap .setVisibleInGui (mapVisible && !niceWurst );
901- workstationEspOnMap .setVisibleInGui (mapVisible && !niceWurst );
902- signEspOnMap .setVisibleInGui (mapVisible && !niceWurst );
903- portalEspOnMap .setVisibleInGui (mapVisible );
904- playerEspOnMap .setVisibleInGui (mapVisible );
905- logoutSpotsOnMap .setVisibleInGui (mapVisible );
906- bedEspOnMap .setVisibleInGui (mapVisible && !niceWurst );
908+ mapEspGroup .setVisibleInGui (espVisible );
909+ chestEspOnMap .setVisibleInGui (espVisible && !niceWurst );
910+ workstationEspOnMap .setVisibleInGui (espVisible && !niceWurst );
911+ signEspOnMap .setVisibleInGui (espVisible && !niceWurst );
912+ portalEspOnMap .setVisibleInGui (espVisible );
913+ playerEspOnMap .setVisibleInGui (espVisible );
914+ logoutSpotsOnMap .setVisibleInGui (espVisible );
915+ bedEspOnMap .setVisibleInGui (espVisible && !niceWurst );
907916 }
908917
909918 private static boolean isEditorScreen (Screen screen )
@@ -937,6 +946,8 @@ public void renderFullscreenMapEsp(GuiGraphicsExtractor context, int mapX,
937946 {
938947 if (MC .player == null || MC .level == null )
939948 return ;
949+ if (!espIconsEnabled .isChecked ())
950+ return ;
940951
941952 context .enableScissor (mapX , mapY , mapX + drawWidth , mapY + drawHeight );
942953 try
0 commit comments