Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FTB Chunks ore prospector compatibility #2642

Merged
merged 45 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
289a972
add ftb chunks to build config
omergunr100 Dec 19, 2024
e9ac4ba
temporary
omergunr100 Dec 20, 2024
d49451a
got the ore veins working
omergunr100 Dec 25, 2024
ece8cc3
lang
omergunr100 Dec 25, 2024
8bf0106
spotless
omergunr100 Dec 25, 2024
c89b97a
added ability to add waypoint when clicking on ore vein marker
omergunr100 Dec 25, 2024
61b7669
fluid overlay is working
omergunr100 Dec 26, 2024
c89fb4a
removed old icon for fluid chunks that didn't work
omergunr100 Dec 26, 2024
73be5fd
fixed color values
omergunr100 Dec 26, 2024
cd871a0
fluid info parameters were reversed
omergunr100 Dec 26, 2024
e6fbc11
removed caching of tooltip
omergunr100 Dec 26, 2024
943bb17
fixed colors and overlay display
omergunr100 Dec 26, 2024
52b7720
spotless
omergunr100 Dec 26, 2024
05dd930
replaced `XZ` with `ChunkPos`
omergunr100 Dec 26, 2024
dd31e62
better ore and color picking
omergunr100 Dec 26, 2024
d0a1640
removed unused var
omergunr100 Dec 26, 2024
a52e74d
depleted state changes vein title
omergunr100 Dec 26, 2024
d28229e
option to hide depleted veins
omergunr100 Dec 26, 2024
941299a
data gen
omergunr100 Dec 26, 2024
143ef6f
hide veins if depleted
omergunr100 Dec 26, 2024
5aadbbb
spotless
omergunr100 Dec 26, 2024
815485a
move plugin init to client setup event
omergunr100 Dec 26, 2024
e02c390
refresh the map after adding a waypoint
omergunr100 Dec 26, 2024
173d829
made some of the code less deranged
omergunr100 Dec 26, 2024
c50d18b
replaced current player dimension with event dimension
omergunr100 Dec 27, 2024
7c635b4
make sure options are initialized at most once
omergunr100 Dec 27, 2024
291b6bf
getting intellij to shut up about it
omergunr100 Dec 27, 2024
20e921e
initialize options right after the config is initialized
omergunr100 Dec 27, 2024
e3c1b42
Add LargeMapScreenMixin for toggle icons
jtuc Dec 26, 2024
48398e5
removing unnecessary type info
omergunr100 Dec 27, 2024
7b7a5a4
add context menu to ore veins
jtuc Dec 27, 2024
2c38d2f
spotless
omergunr100 Dec 27, 2024
49b0167
spotless
omergunr100 Dec 27, 2024
b98902a
settings are now saved properly
omergunr100 Dec 27, 2024
ab81ee4
refresh widgets instead of reopening the window
omergunr100 Dec 27, 2024
037908d
created our own snbt config for map properties and unified map lang v…
omergunr100 Dec 27, 2024
92f8aa4
button for hiding/showing depleted veins works again
omergunr100 Dec 28, 2024
1dd911f
ore vein icon size config works
omergunr100 Dec 28, 2024
8c90e5a
moved fluid veins display to icons to make them appear on minimap too
omergunr100 Dec 28, 2024
e3d958e
extracted the fluid icon creation to another method.
omergunr100 Dec 28, 2024
fd45b70
add option to turn off specific map mod integrations
omergunr100 Dec 29, 2024
f67ae91
the great unjankening (by adding more jank code)
omergunr100 Dec 29, 2024
2d60dd5
added icon caching and changed visibility predicate
omergunr100 Dec 30, 2024
e76ae57
overlay masks to the map shape.
omergunr100 Dec 30, 2024
a9c6bbf
renamed configs
omergunr100 Jan 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -1724,6 +1724,7 @@
"config.gtceu.option.bronzeBoilerMaxTemperature": "ǝɹnʇɐɹǝdɯǝ⟘xɐWɹǝןıoᗺǝzuoɹq",
"config.gtceu.option.buttonAnchor": "ɹoɥɔuⱯuoʇʇnq",
"config.gtceu.option.casingsPerCraft": "ʇɟɐɹƆɹǝԀsbuısɐɔ",
"config.gtceu.option.chunksIntegration": "uoıʇɐɹbǝʇuIsʞunɥɔ",
"config.gtceu.option.cleanMultiblocks": "sʞɔoןqıʇןnWuɐǝןɔ",
"config.gtceu.option.client": "ʇuǝıןɔ",
"config.gtceu.option.compat": "ʇɐdɯoɔ",
Expand Down Expand Up @@ -1786,6 +1787,7 @@
"config.gtceu.option.inWorldPreviewDuration": "uoıʇɐɹnᗡʍǝıʌǝɹԀpןɹoMuı",
"config.gtceu.option.increaseDungeonLoot": "ʇooꞀuoǝbunᗡǝsɐǝɹɔuı",
"config.gtceu.option.infiniteBedrockOresFluids": "spınןℲsǝɹOʞɔoɹpǝᗺǝʇıuıɟuı",
"config.gtceu.option.journeyMapIntegration": "uoıʇɐɹbǝʇuIdɐWʎǝuɹnoظ",
"config.gtceu.option.largeBoilers": "sɹǝןıoᗺǝbɹɐן",
"config.gtceu.option.ldFluidPipeMinDistance": "ǝɔuɐʇsıᗡuıWǝdıԀpınןℲpן",
"config.gtceu.option.ldItemPipeMinDistance": "ǝɔuɐʇsıᗡuıWǝdıԀɯǝʇIpן",
Expand Down Expand Up @@ -1845,6 +1847,7 @@
"config.gtceu.option.surfaceRockProspectRange": "ǝbuɐᴚʇɔǝdsoɹԀʞɔoᴚǝɔɐɟɹns",
"config.gtceu.option.titaniumBoilerHeatSpeed": "pǝǝdSʇɐǝHɹǝןıoᗺɯnıuɐʇıʇ",
"config.gtceu.option.titaniumBoilerMaxTemperature": "ǝɹnʇɐɹǝdɯǝ⟘xɐWɹǝןıoᗺɯnıuɐʇıʇ",
"config.gtceu.option.toggle": "ǝןbboʇ",
"config.gtceu.option.toolCraftingSounds": "spunoSbuıʇɟɐɹƆןooʇ",
"config.gtceu.option.toolUseSounds": "spunoSǝs∩ןooʇ",
"config.gtceu.option.tools": "sןooʇ",
Expand All @@ -1864,6 +1867,7 @@
"config.gtceu.option.worldAcceleratorBlacklist": "ʇsıןʞɔɐןᗺɹoʇɐɹǝןǝɔɔⱯpןɹoʍ",
"config.gtceu.option.worldgen": "uǝbpןɹoʍ",
"config.gtceu.option.xOffset": "ʇǝsɟɟOx",
"config.gtceu.option.xaeroxMapIntegration": "uoıʇɐɹbǝʇuIdɐWxoɹǝɐx",
"config.gtceu.option.yOffset": "ʇǝsɟɟOʎ",
"config.gtceu.option.zombieSpawnWithSabers": "sɹǝqɐSɥʇıMuʍɐdSǝıqɯoz",
"config.jade.plugin_gtceu.auto_output_info": "oɟuI ʇndʇnO oʇnⱯ ]nƎƆ⟘⅁[",
Expand Down
4 changes: 4 additions & 0 deletions src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1724,6 +1724,7 @@
"config.gtceu.option.bronzeBoilerMaxTemperature": "bronzeBoilerMaxTemperature",
"config.gtceu.option.buttonAnchor": "buttonAnchor",
"config.gtceu.option.casingsPerCraft": "casingsPerCraft",
"config.gtceu.option.chunksIntegration": "chunksIntegration",
"config.gtceu.option.cleanMultiblocks": "cleanMultiblocks",
"config.gtceu.option.client": "client",
"config.gtceu.option.compat": "compat",
Expand Down Expand Up @@ -1786,6 +1787,7 @@
"config.gtceu.option.inWorldPreviewDuration": "inWorldPreviewDuration",
"config.gtceu.option.increaseDungeonLoot": "increaseDungeonLoot",
"config.gtceu.option.infiniteBedrockOresFluids": "infiniteBedrockOresFluids",
"config.gtceu.option.journeyMapIntegration": "journeyMapIntegration",
"config.gtceu.option.largeBoilers": "largeBoilers",
"config.gtceu.option.ldFluidPipeMinDistance": "ldFluidPipeMinDistance",
"config.gtceu.option.ldItemPipeMinDistance": "ldItemPipeMinDistance",
Expand Down Expand Up @@ -1845,6 +1847,7 @@
"config.gtceu.option.surfaceRockProspectRange": "surfaceRockProspectRange",
"config.gtceu.option.titaniumBoilerHeatSpeed": "titaniumBoilerHeatSpeed",
"config.gtceu.option.titaniumBoilerMaxTemperature": "titaniumBoilerMaxTemperature",
"config.gtceu.option.toggle": "toggle",
"config.gtceu.option.toolCraftingSounds": "toolCraftingSounds",
"config.gtceu.option.toolUseSounds": "toolUseSounds",
"config.gtceu.option.tools": "tools",
Expand All @@ -1864,6 +1867,7 @@
"config.gtceu.option.worldAcceleratorBlacklist": "worldAcceleratorBlacklist",
"config.gtceu.option.worldgen": "worldgen",
"config.gtceu.option.xOffset": "xOffset",
"config.gtceu.option.xaeroxMapIntegration": "xaeroxMapIntegration",
"config.gtceu.option.yOffset": "yOffset",
"config.gtceu.option.zombieSpawnWithSabers": "zombieSpawnWithSabers",
"config.jade.plugin_gtceu.auto_output_info": "[GTCEu] Auto Output Info",
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/gregtechceu/gtceu/client/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.gregtechceu.gtceu.common.data.GTEntityTypes;
import com.gregtechceu.gtceu.common.data.GTParticleTypes;
import com.gregtechceu.gtceu.common.entity.GTBoat;
import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.ClientCacheManager;
import com.gregtechceu.gtceu.integration.map.cache.client.GTClientCache;
import com.gregtechceu.gtceu.integration.map.ftbchunks.FTBChunksPlugin;
Expand All @@ -20,7 +21,6 @@
import com.gregtechceu.gtceu.integration.map.layer.builtin.OreRenderLayer;
import com.gregtechceu.gtceu.utils.input.KeyBind;

import com.lowdragmc.lowdraglib.LDLib;
import com.lowdragmc.lowdraglib.Platform;

import net.minecraft.client.model.BoatModel;
Expand Down Expand Up @@ -100,7 +100,8 @@ public void onRegisterParticleProviders(RegisterParticleProvidersEvent event) {

@SubscribeEvent
public void onClientSetup(FMLClientSetupEvent event) {
if (LDLib.isModLoaded(GTValues.MODID_FTB_CHUNKS)) {
if (ConfigHolder.INSTANCE.compat.minimap.toggle.chunksIntegration &&
Platform.isModLoaded(GTValues.MODID_FTB_CHUNKS)) {
FTBChunksPlugin.addEventListeners();
}
}
Expand Down
21 changes: 20 additions & 1 deletion src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,16 @@ public static class AE2CompatConfig {

public static class MinimapCompatConfig {

@Configurable
@Configurable.Comment({
"Toggle specific map mod integration on/off (need to restart for this to take effect)" })
public Toggle toggle = new Toggle();

@Configurable
@Configurable.Comment({ "The radius, in blocks, that picking up a surface rock will search for veins in.",
"-1 to disable.", "Default: 24" })
@Configurable.Range(min = 1)
public int surfaceRockProspectRange = 24;

@Configurable
@Configurable.Comment({ "The radius, in blocks, that clicking an ore block will search for veins in.",
"-1 to disable", "Default: 24" })
Expand Down Expand Up @@ -264,6 +268,21 @@ public static class MinimapCompatConfig {
"Default: true" })
public boolean rightToolbar = true;

public static class Toggle {

@Configurable
@Configurable.Comment({ "FTB Chunks integration enabled" })
public boolean chunksIntegration = false;
omergunr100 marked this conversation as resolved.
Show resolved Hide resolved

@Configurable
@Configurable.Comment({ "Journey Map integration enabled" })
public boolean journeyMapIntegration = true;

@Configurable
@Configurable.Comment({ "Xaerox's map integration enabled" })
public boolean xaeroxMapIntegration = true;
omergunr100 marked this conversation as resolved.
Show resolved Hide resolved
}

public enum Anchor {

TOP_LEFT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.core.mixins.ftbchunks;

import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.ButtonState;
import com.gregtechceu.gtceu.integration.map.ftbchunks.FTBChunksOptions;

Expand Down Expand Up @@ -30,6 +31,7 @@ public abstract class LargeMapScreenMixin extends BaseScreen {

@Inject(method = "addWidgets", at = @At(value = "TAIL"))
private void gtceu$injectAddWidgets(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.chunksIntegration) return;
gtceu$injectedWidgets.clear();
var prefix = "gtceu.button.";
for (var button : ButtonState.getAllButtons()) {
Expand Down Expand Up @@ -63,6 +65,7 @@ public void addMouseOverText(TooltipList list) {

@Inject(method = "alignWidgets", at = @At(value = "TAIL"))
private void gtceu$injectAlignWidgets(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.chunksIntegration) return;
var buttonCount = gtceu$injectedWidgets.size();
var startHeight = (height - buttonCount * 18) / 2;
for (int i = 0; i < buttonCount; i++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.core.mixins.ftbchunks;

import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.ftbchunks.FTBChunksOptions;
import com.gregtechceu.gtceu.integration.map.ftbchunks.FTBChunksRenderer;
import com.gregtechceu.gtceu.integration.map.ftbchunks.veins.fluid.FluidVeinIcon;
Expand Down Expand Up @@ -36,6 +37,7 @@ public RegionMapPanelMixin(Panel panel) {
@Inject(method = "addWidgets",
at = @At(value = "INVOKE", target = "Ldev/ftb/mods/ftbchunks/client/gui/RegionMapPanel;alignWidgets()V"))
private void gtceu$injectAddWidgets(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.chunksIntegration) return;
if (FTBChunksOptions.showLayer("bedrock_fluids")) {
FTBChunksRenderer.fluidElements.row(largeMap.currentDimension()).forEach((pos, icon) -> {
var widget = new FluidVeinWidget((RegionMapPanel) (Object) this, icon);
Expand All @@ -46,6 +48,7 @@ public RegionMapPanelMixin(Panel panel) {

@Inject(method = "alignWidgets", at = @At(value = "TAIL"))
private void gtceu$injectAlignWidgets(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.chunksIntegration) return;
var regionSize = largeMap.getRegionTileSize();
var chunkSize = largeMap.getRegionTileSize() / 32;
for (var widget : widgets) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public FullscreenMixin(String title) {
shift = At.Shift.AFTER),
remap = false)
private void gtceu$injectInitButtons(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.journeyMapIntegration) return;
final Theme theme = ThemeLoader.getCurrentTheme();
gtceu$buttons = new LinkedHashMap<>();

Expand Down Expand Up @@ -79,6 +80,7 @@ public FullscreenMixin(String title) {

@Inject(method = "layoutButtons", at = @At("TAIL"), remap = false)
private void gtceu$injectLayoutButtons(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.journeyMapIntegration) return;
for (String buttonName : gtceu$buttons.keySet()) {
gtceu$buttons.get(buttonName).setToggled(ButtonState.isEnabled(buttonName), false);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.core.mixins.xaerominimap;

import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.xaeros.minimap.fluid.FluidChunkHighlighter;

import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -19,6 +20,7 @@ public abstract class HighlighterRegistryMixin {

@Inject(method = "<init>", at = @At("TAIL"))
private void gtceu$registerHighlighters(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.xaeroxMapIntegration) return;
this.register(new FluidChunkHighlighter());
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.core.mixins.xaerominimap;

import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.xaeros.minimap.ore.OreVeinElementRenderer;

import net.minecraft.client.Minecraft;
Expand Down Expand Up @@ -37,6 +38,7 @@ public MinimapFBORendererMixin(IXaeroMinimap modMain, Minecraft mc, WaypointsGui
@Inject(method = "loadFrameBuffer",
at = @At(value = "INVOKE", target = "Lxaero/common/mods/SupportMods;worldmap()Z"))
private void gtceu$injectProspectionMarkers(MinimapProcessor minimapProcessor, CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.xaeroxMapIntegration) return;
this.gtceu$oreVeinElementRenderer = OreVeinElementRenderer.Builder.begin().build();
minimapElementMapRendererHandler.add(this.gtceu$oreVeinElementRenderer);
this.minimap.getOverMapRendererHandler().add(this.gtceu$oreVeinElementRenderer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ protected GuiMapMixin(Screen parent, Screen escape, MapProcessor mapProcessor, E

@Inject(method = "init", at = @At("TAIL"), remap = true)
private void gtceu$injectInitGui(CallbackInfo ci) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.xaeroxMapIntegration) return;
int startX, startY, xOffset, yOffset;

switch (ConfigHolder.INSTANCE.compat.minimap.direction) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.core.mixins.xaeroworldmap;

import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.xaeros.worldmap.ore.OreVeinElementRenderer;

import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -15,7 +16,9 @@ public class MapElementRenderHandlerBuilderMixin {

@ModifyVariable(method = "build", at = @At(value = "LOAD", ordinal = 3))
private List<MapElementRenderer<?, ?, ?>> gtceu$addOreRenderer(List<MapElementRenderer<?, ?, ?>> value) {
value.add(OreVeinElementRenderer.Builder.begin().build());
if (ConfigHolder.INSTANCE.compat.minimap.toggle.xaeroxMapIntegration) {
value.add(OreVeinElementRenderer.Builder.begin().build());
}
return value;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.core.mixins.xaeroworldmap;

import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.xaeros.worldmap.fluid.FluidChunkHighlighter;

import net.minecraft.client.multiplayer.ClientPacketListener;
Expand All @@ -23,6 +24,7 @@ public abstract class WorldMapSessionMixin {
locals = LocalCapture.CAPTURE_FAILSOFT)
private void cadmus$registerHighlighters(ClientPacketListener connection, long biomeZoomSeed, CallbackInfo ci,
@Local HighlighterRegistry highlightRegistry) {
if (!ConfigHolder.INSTANCE.compat.minimap.toggle.xaeroxMapIntegration) return;
highlightRegistry.register(new FluidChunkHighlighter());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.api.data.worldgen.ores.GeneratedVeinMetadata;
import com.gregtechceu.gtceu.api.gui.misc.ProspectorMode;
import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.ftbchunks.FTBChunksRenderer;
import com.gregtechceu.gtceu.integration.map.journeymap.JourneymapRenderer;
import com.gregtechceu.gtceu.integration.map.xaeros.XaerosRenderer;
Expand All @@ -28,13 +29,14 @@ public class GroupingMapRenderer extends GenericMapRenderer {

static {
Map<String, GenericMapRenderer> renderers = new HashMap<>();
if (Platform.isModLoaded(GTValues.MODID_JOURNEYMAP)) {
var toggle = ConfigHolder.INSTANCE.compat.minimap.toggle;
if (toggle.journeyMapIntegration && Platform.isModLoaded(GTValues.MODID_JOURNEYMAP)) {
renderers.put(GTValues.MODID_JOURNEYMAP, new JourneymapRenderer());
}
if (Platform.isModLoaded(GTValues.MODID_XAEROS_MINIMAP)) {
if (toggle.xaeroxMapIntegration && Platform.isModLoaded(GTValues.MODID_XAEROS_MINIMAP)) {
renderers.put(GTValues.MODID_XAEROS_MINIMAP, new XaerosRenderer());
}
if (Platform.isModLoaded(GTValues.MODID_FTB_CHUNKS)) {
if (toggle.chunksIntegration && Platform.isModLoaded(GTValues.MODID_FTB_CHUNKS)) {
renderers.put(GTValues.MODID_FTB_CHUNKS, new FTBChunksRenderer());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.gregtechceu.gtceu.integration.map;

import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.config.ConfigHolder;
import com.gregtechceu.gtceu.integration.map.ftbchunks.FTBChunksWaypointHandler;
import com.gregtechceu.gtceu.integration.map.journeymap.JourneymapWaypointHandler;
import com.gregtechceu.gtceu.integration.map.xaeros.XaeroWaypointHandler;
Expand Down Expand Up @@ -28,15 +29,16 @@ public class WaypointManager {
private static boolean active = false;

public static void init() {
if (Platform.isModLoaded(GTValues.MODID_XAEROS_MINIMAP)) {
var toggle = ConfigHolder.INSTANCE.compat.minimap.toggle;
if (toggle.xaeroxMapIntegration && Platform.isModLoaded(GTValues.MODID_XAEROS_MINIMAP)) {
WaypointManager.registerWaypointHandler(new XaeroWaypointHandler());
active = true;
}
if (Platform.isModLoaded(GTValues.MODID_JOURNEYMAP)) {
if (toggle.journeyMapIntegration && Platform.isModLoaded(GTValues.MODID_JOURNEYMAP)) {
WaypointManager.registerWaypointHandler(new JourneymapWaypointHandler());
active = true;
}
if (Platform.isModLoaded(GTValues.MODID_FTB_CHUNKS)) {
if (toggle.chunksIntegration && Platform.isModLoaded(GTValues.MODID_FTB_CHUNKS)) {
WaypointManager.registerWaypointHandler(new FTBChunksWaypointHandler());
active = true;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.gregtechceu.gtceu.integration.map.xaeros;

import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.config.ConfigHolder;

import com.lowdragmc.lowdraglib.Platform;

Expand Down Expand Up @@ -32,7 +33,8 @@ public static void toggleOption(String name, boolean active) {
dimHighlightHandler.requestRefresh();
}

if (Platform.isModLoaded(GTValues.MODID_XAEROS_WORLDMAP)) {
if (ConfigHolder.INSTANCE.compat.minimap.toggle.xaeroxMapIntegration &&
Platform.isModLoaded(GTValues.MODID_XAEROS_WORLDMAP)) {
WorldMapSession session = WorldMapSession.getCurrentSession();
MapWorld world = session.getMapProcessor().getMapWorld();
for (MapDimension mapDim : world.getDimensionsList()) {
Expand Down