Skip to content

Commit

Permalink
Move TC node layer to an appropriate mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfts committed Jul 19, 2024
1 parent db3f245 commit 57d0975
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 1,016 deletions.
4 changes: 1 addition & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
dependencies {
shadowImplementation('com.github.GTNewHorizons:Enklume:2.1.0:dev')

api('com.github.GTNewHorizons:Navigator:1.0.5:dev')
api('com.github.GTNewHorizons:Navigator:1.0.6:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.78:dev')

devOnlyNonPublishable('com.github.GTNewHorizons:TCNodeTracker:1.3.0:dev')

// For debugging
runtimeOnlyNonPublishable('com.github.GTNewHorizons:DetravScannerMod:1.8.1:dev')
runtimeOnlyNonPublishable(rfg.deobf('maven.modrinth:journeymap:5.2.5'))
Expand Down
29 changes: 0 additions & 29 deletions src/main/java/com/sinthoras/visualprospecting/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@
import net.minecraft.client.Minecraft;
import net.minecraft.launchwrapper.Launch;

import org.lwjgl.opengl.GL11;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sinthoras.visualprospecting.hooks.HooksClient;

import cpw.mods.fml.common.Loader;
import gregtech.common.GT_Worldgenerator;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.client.lib.UtilsFX;

public class Utils {

Expand All @@ -45,10 +41,6 @@ public static boolean isNEIInstalled() {
return Loader.isModLoaded("NotEnoughItems");
}

public static boolean isTCNodeTrackerInstalled() {
return Loader.isModLoaded("tcnodetracker");
}

public static boolean isJourneyMapInstalled() {
return Loader.isModLoaded("journeymap");
}
Expand Down Expand Up @@ -221,25 +213,4 @@ public static Map<Integer, ByteBuffer> getDIMFiles(File directory) {
return new HashMap<>();
}
}

public static void drawAspect(double centerPixelX, double centerPixelY, double pixelSize, Aspect aspect,
int amount) {
final int textureSize = 16;

GL11.glPushMatrix();
final double scale = pixelSize / textureSize;
GL11.glScaled(scale, scale, scale);
UtilsFX.drawTag(
(centerPixelX - pixelSize / 2) / scale,
(centerPixelY - pixelSize / 2) / scale,
aspect,
amount,
0,
0,
GL11.GL_ONE_MINUS_SRC_ALPHA,
1.0F,
false);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.sinthoras.visualprospecting.Utils;
import com.sinthoras.visualprospecting.database.ResetClientCacheCommand;
import com.sinthoras.visualprospecting.integration.model.layers.OreVeinLayerManager;
import com.sinthoras.visualprospecting.integration.model.layers.ThaumcraftNodeLayerManager;
import com.sinthoras.visualprospecting.integration.model.layers.UndergroundFluidChunkLayerManager;
import com.sinthoras.visualprospecting.integration.model.layers.UndergroundFluidLayerManager;
import com.sinthoras.visualprospecting.integration.voxelmap.VoxelMapEventHandler;
Expand Down Expand Up @@ -79,10 +78,6 @@ public void registerMapLayers() {
NavigatorApi.registerLayerManager(UndergroundFluidLayerManager.instance);
NavigatorApi.registerLayerManager(UndergroundFluidChunkLayerManager.instance);

if (Utils.isTCNodeTrackerInstalled()) {
NavigatorApi.registerLayerManager(ThaumcraftNodeLayerManager.instance);
}

if (Util.isVoxelMapInstalled()) {
MinecraftForge.EVENT_BUS.register(new VoxelMapEventHandler());
}
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/com/sinthoras/visualprospecting/hooks/HooksKey.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package com.sinthoras.visualprospecting.hooks;

import static com.sinthoras.visualprospecting.Utils.isTCNodeTrackerInstalled;

import net.minecraft.client.settings.KeyBinding;

import org.lwjgl.input.Keyboard;

import com.sinthoras.visualprospecting.integration.model.buttons.OreVeinButtonManager;
import com.sinthoras.visualprospecting.integration.model.buttons.ThaumcraftNodeButtonManager;
import com.sinthoras.visualprospecting.integration.model.buttons.UndergroundFluidButtonManager;

import cpw.mods.fml.client.registry.ClientRegistry;
Expand All @@ -26,17 +23,10 @@ public class HooksKey {
"visualprospecting.key.togglefluid.name",
Keyboard.KEY_NONE,
"visualprospecting.key.action.category");
private final KeyBinding keyToggleNodes = new KeyBinding(
"visualprospecting.key.togglenode.name",
Keyboard.KEY_NONE,
"visualprospecting.key.action.category");

public HooksKey() {
ClientRegistry.registerKeyBinding(keyToggleOres);
ClientRegistry.registerKeyBinding(keyToggleFluids);
if (isTCNodeTrackerInstalled()) {
ClientRegistry.registerKeyBinding(keyToggleNodes);
}
}

@SideOnly(Side.CLIENT)
Expand All @@ -52,8 +42,5 @@ private void checkAndToggleOverlays() {
if (keyToggleFluids.isPressed()) {
UndergroundFluidButtonManager.instance.toggle();
}
if (keyToggleNodes.isPressed() && isTCNodeTrackerInstalled()) {
ThaumcraftNodeButtonManager.instance.toggle();
}
}
}

This file was deleted.

Loading

0 comments on commit 57d0975

Please sign in to comment.