Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Aug 1, 2024
2 parents 87a817c + 5a7b437 commit ed77e24
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@ public interface FTBChunksClientAPI {
*/
void registerMinimapComponent(MinimapInfoComponent component);

//Todo

/**
* @param component the component to check if it is enabled
* @return is the component enabled and will render under the minimap
*/
boolean isMinimapComponentEnabled(MinimapInfoComponent component);

//Todo
/**
* Enable or disable a specific minimap component for rendering under the minimap
* @param component the component to enable or disable to that shoul
* @param enabled the state to set the component to
*/
void setMinimapComponentEnabled(MinimapInfoComponent component, boolean enabled);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ public void renderHud(GuiGraphics graphics, DeltaTracker tickDelta) {
currentPlayerChunkZ = cz;
}

if (mc.getDebugOverlay().showDebugScreen() || !FTBChunksClientConfig.MINIMAP_ENABLED.get() || FTBChunksClientConfig.MINIMAP_VISIBILITY.get() == 0 || !FTBChunksWorldConfig.shouldShowMinimap(mc.player)) {
if (mc.options.hideGui || mc.getDebugOverlay().showDebugScreen() || !FTBChunksClientConfig.MINIMAP_ENABLED.get() || FTBChunksClientConfig.MINIMAP_VISIBILITY.get() == 0 || !FTBChunksWorldConfig.shouldShowMinimap(mc.player)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import net.minecraft.resources.ResourceLocation;

import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;

import static dev.ftb.mods.ftblibrary.snbt.config.ConfigUtil.LOCAL_DIR;
Expand Down Expand Up @@ -81,7 +82,7 @@ public interface FTBChunksClientConfig {
BooleanValue SQUARE_MINIMAP = MINIMAP.addBoolean("square", false).comment("Draw a square minimap instead of a circular one");
BooleanValue MINIMAP_PROPORTIONAL = MINIMAP.addBoolean("proportional", true).comment("Size minimap proportional to screen width (and scale)");
StringListValue MINIMAP_INFO_ORDER = MINIMAP.addStringList("info_order", Stream.of(PlayerPosInfoComponent.ID, BiomeComponent.ID, ZoneInfoComponent.ID, FPSComponent.ID, GameTimeComponent.ID, RealTimeComponent.ID, DebugComponent.ID).map(ResourceLocation::toString).toList()).comment("Info displayed under minimap");
StringListValue MINIMAP_INFO_HIDDEN = MINIMAP.addStringList("info_hidden", Collections.emptyList()).comment("Info hidden under minimap");
StringListValue MINIMAP_INFO_HIDDEN = MINIMAP.addStringList("info_hidden", List.of(DebugComponent.ID.toString())).comment("Info hidden under minimap");
StringMapValue MINIMAP_SETTINGS = MINIMAP.add(new StringMapValue(MINIMAP, "info_settings", Collections.emptyMap())).comment("Settings for minimap info components");

SNBTConfig ADVANCED = CONFIG.addGroup("advanced", 3);
Expand Down

0 comments on commit ed77e24

Please sign in to comment.