aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/lorenz
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-14 11:26:34 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-14 11:26:34 +0200
commitc65416e03ce0791c4a99e9bdfc18c0fa0863028a (patch)
tree653e7e8bbfce0cb2f25592fd48b531f863c3575e /src/main/java/at/lorenz
parentb2108f37f551fba5cb43f4919d69e5db7bb1e44c (diff)
downloadskyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.tar.gz
skyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.tar.bz2
skyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.zip
remove old sbh/skyblockhud code
Diffstat (limited to 'src/main/java/at/lorenz')
-rw-r--r--src/main/java/at/lorenz/mod/LorenzMod.java103
-rw-r--r--src/main/java/at/lorenz/mod/config/Features.java18
-rw-r--r--src/main/java/at/lorenz/mod/misc/ButtonOnPause.kt10
-rw-r--r--src/main/java/at/lorenz/mod/utils/GuiRender.kt2
4 files changed, 18 insertions, 115 deletions
diff --git a/src/main/java/at/lorenz/mod/LorenzMod.java b/src/main/java/at/lorenz/mod/LorenzMod.java
index 20bf05fb8..c9a8486db 100644
--- a/src/main/java/at/lorenz/mod/LorenzMod.java
+++ b/src/main/java/at/lorenz/mod/LorenzMod.java
@@ -15,7 +15,7 @@ import at.lorenz.mod.misc.*;
import at.lorenz.mod.test.LorenzTest;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.thatgravyboat.skyblockhud_2.commands.Commands;
+import com.thatgravyboat.amod.commands.Commands;
import java.io.*;
import java.nio.charset.StandardCharsets;
import net.minecraft.client.Minecraft;
@@ -33,13 +33,9 @@ public class LorenzMod {
public static final String MODID = "lorenzmod";
public static final String VERSION = "0.6";
- // public static SBHConfig config; //TODO delete
-
public static Features feature;
private File configFile;
- // private static final Set<String> SKYBLOCK_IN_ALL_LANGUAGES = Sets.newHashSet("SKYBLOCK", "\u7A7A\u5C9B\u751F\u5B58");
-
private final Gson gson = new GsonBuilder().setPrettyPrinting().excludeFieldsWithoutExposeAnnotation().create();
public static File configDirectory;
@@ -74,35 +70,6 @@ public class LorenzMod {
MinecraftForge.EVENT_BUS.register(new LorenzTest());
MinecraftForge.EVENT_BUS.register(new ButtonOnPause());
- // MinecraftForge.EVENT_BUS.register(new LeaderboardGetter());
- // MinecraftForge.EVENT_BUS.register(new SeasonDateHandler());
- // MinecraftForge.EVENT_BUS.register(new LocationHandler());
- // MinecraftForge.EVENT_BUS.register(new IslandHandler());
- // MinecraftForge.EVENT_BUS.register(new TimeHandler());
- // MinecraftForge.EVENT_BUS.register(new CurrencyHandler());
- // MinecraftForge.EVENT_BUS.register(new SlayerHandler());
- // MinecraftForge.EVENT_BUS.register(new DungeonHandler());
- // MinecraftForge.EVENT_BUS.register(new MinesHandler());
- // MinecraftForge.EVENT_BUS.register(new FarmingIslandHandler());
- //
- // MinecraftForge.EVENT_BUS.register(new TrackerHandler());
- // MinecraftForge.EVENT_BUS.register(new KillTracking());
- //
- // MinecraftForge.EVENT_BUS.register(new HeldItemHandler());
- //
- // ClientRegistry.registerKeyBinding(KeyBindings.map);
- //
- // MinecraftForge.EVENT_BUS.register(new ComponentHandler());
- // MinecraftForge.EVENT_BUS.register(new ActionBarParsing());
- // MinecraftForge.EVENT_BUS.register(new CrystalWaypoints());
- // MinecraftForge.EVENT_BUS.register(new FarmHouseHandler());
- // MinecraftForge.EVENT_BUS.register(new WarpHandler());
- // MinecraftForge.EVENT_BUS.register(new CooldownHandler());
-
- //
- // ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new NpcDialogue());
- // ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new Textures());
- //
configDirectory = new File("mods/LorenzMod/config");
try {
//noinspection ResultOfMethodCallIgnored
@@ -135,74 +102,6 @@ public class LorenzMod {
} catch (IOException ignored) {}
}
- // @EventHandler
- // public void postInit(FMLPostInitializationEvent event) {
- // MinecraftForge.EVENT_BUS.register(new OverlayHud());
- // MinecraftForge.EVENT_BUS.register(new RPGHud());
- // MinecraftForge.EVENT_BUS.register(new DungeonOverlay());
- // MinecraftForge.EVENT_BUS.register(new BossbarHandler());
- // MinecraftForge.EVENT_BUS.register(new MapHandler());
- // MinecraftForge.EVENT_BUS.register(new MiningHud());
- // MinecraftForge.EVENT_BUS.register(new NpcDialogue());
- // }
-
- // @EventHandler
- // public void loadComplete(FMLLoadCompleteEvent event) {
- // TrackerFileLoader.loadTrackersFile();
- //
- // if (TrackerFileLoader.loadTrackerStatsFile()) {
- // TrackerFileLoader.saveTrackerStatsFile();
- // }
- // }
-
- // @SubscribeEvent
- // public void onLeaveServer(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
- // TrackerFileLoader.saveTrackerStatsFile();
- // }
-
- public static boolean hasSkyblockScoreboard() {
- // Minecraft mc = Minecraft.getMinecraft();
- //
- // if (mc != null && mc.theWorld != null) {
- // Scoreboard scoreboard = mc.theWorld.getScoreboard();
- // ScoreObjective sidebarObjective = scoreboard.getObjectiveInDisplaySlot(1);
- // if (sidebarObjective != null) {
- // String objectiveName = sidebarObjective.getDisplayName().replaceAll("(?i)\\u00A7.", "");
- // for (String skyblock : SKYBLOCK_IN_ALL_LANGUAGES) {
- // if (objectiveName.startsWith(skyblock)) {
- // return true;
- // }
- // }
- // }
- // }
-
- return false;
- }
-
- // @SubscribeEvent
- // public void onTooltip(ItemTooltipEvent event) {
- // if (event.itemStack != null && Keyboard.isKeyDown(Keyboard.KEY_BACKSLASH)) {
- // try {
- // StringSelection clipboard = new StringSelection(event.itemStack.serializeNBT().toString());
- // Toolkit.getDefaultToolkit().getSystemClipboard().setContents(clipboard, clipboard);
- // } catch (Exception ignored) {}
- // }
- // }
-
- // @SubscribeEvent(priority = EventPriority.HIGHEST)
- // public void onStatusBar(ClientChatReceivedEvent event) {
- // String message = Utils.removeColor(event.message.getUnformattedText()).toLowerCase().trim();
- //
- // if (message.startsWith("your profile was changed to:")) {
- // String stripped = message.replace("your profile was changed to:", "").replace("(co-op)", "").trim();
- // MinecraftForge.EVENT_BUS.post(new ProfileSwitchedEvent(stripped));
- // }
- // if (message.startsWith("you are playing on profile:")) {
- // String stripped = message.replace("you are playing on profile:", "").replace("(co-op)", "").trim();
- // MinecraftForge.EVENT_BUS.post(new ProfileJoinedEvent(stripped));
- // }
- // }
-
public static GuiScreen screenToOpen = null;
private static int screenTicks = 0;
diff --git a/src/main/java/at/lorenz/mod/config/Features.java b/src/main/java/at/lorenz/mod/config/Features.java
index 917ab3483..9cb5d9450 100644
--- a/src/main/java/at/lorenz/mod/config/Features.java
+++ b/src/main/java/at/lorenz/mod/config/Features.java
@@ -2,18 +2,18 @@ package at.lorenz.mod.config;
import at.lorenz.mod.LorenzMod;
import com.google.gson.annotations.Expose;
-import com.thatgravyboat.skyblockhud_2.config.SBHConfigEditor;
-import com.thatgravyboat.skyblockhud_2.core.GuiElement;
-import com.thatgravyboat.skyblockhud_2.core.GuiScreenElementWrapper;
-import com.thatgravyboat.skyblockhud_2.core.config.Position;
-import com.thatgravyboat.skyblockhud_2.core.config.annotations.*;
-import com.thatgravyboat.skyblockhud_2.core.config.gui.GuiPositionEditor;
+import com.thatgravyboat.amod.config.ConfigEditor;
+import com.thatgravyboat.amod.core.GuiElement;
+import com.thatgravyboat.amod.core.GuiScreenElementWrapper;
+import com.thatgravyboat.amod.core.config.Position;
+import com.thatgravyboat.amod.core.config.annotations.*;
+import com.thatgravyboat.amod.core.config.gui.GuiPositionEditor;
import net.minecraft.client.Minecraft;
public class Features {
private void editOverlay(String activeConfig, int width, int height, Position position) {
- Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {}, () -> {}, () -> LorenzMod.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(LorenzMod.feature, activeConfig))));
+ Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {}, () -> {}, () -> LorenzMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(LorenzMod.feature, activeConfig))));
}
public void executeRunnable(String runnableId) {
@@ -21,8 +21,8 @@ public class Features {
if (Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper) {
GuiScreenElementWrapper wrapper = (GuiScreenElementWrapper) Minecraft.getMinecraft().currentScreen;
GuiElement element = wrapper.element;
- if (element instanceof SBHConfigEditor) {
- activeConfigCategory = ((SBHConfigEditor) element).getSelectedCategoryName();
+ if (element instanceof ConfigEditor) {
+ activeConfigCategory = ((ConfigEditor) element).getSelectedCategoryName();
}
}
diff --git a/src/main/java/at/lorenz/mod/misc/ButtonOnPause.kt b/src/main/java/at/lorenz/mod/misc/ButtonOnPause.kt
index c15ce4a44..735f1db99 100644
--- a/src/main/java/at/lorenz/mod/misc/ButtonOnPause.kt
+++ b/src/main/java/at/lorenz/mod/misc/ButtonOnPause.kt
@@ -2,8 +2,8 @@ package at.lorenz.mod.misc
import at.lorenz.mod.LorenzMod
import at.lorenz.mod.utils.LorenzUtils
-import com.thatgravyboat.skyblockhud_2.config.SBHConfigEditor
-import com.thatgravyboat.skyblockhud_2.core.GuiScreenElementWrapper
+import com.thatgravyboat.amod.config.ConfigEditor
+import com.thatgravyboat.amod.core.GuiScreenElementWrapper
import net.minecraft.client.gui.GuiButton
import net.minecraft.client.gui.GuiIngameMenu
import net.minecraftforge.client.event.GuiScreenEvent
@@ -17,7 +17,11 @@ class ButtonOnPause {
if (!LorenzUtils.isOnHypixel) return
if (LorenzMod.feature.misc.configButtonOnPause && event.gui is GuiIngameMenu && event.button.id == buttonId) {
- LorenzMod.screenToOpen = GuiScreenElementWrapper(SBHConfigEditor(LorenzMod.feature))
+ LorenzMod.screenToOpen = GuiScreenElementWrapper(
+ ConfigEditor(
+ LorenzMod.feature
+ )
+ )
}
}
diff --git a/src/main/java/at/lorenz/mod/utils/GuiRender.kt b/src/main/java/at/lorenz/mod/utils/GuiRender.kt
index f32b9bdf2..c16cab56f 100644
--- a/src/main/java/at/lorenz/mod/utils/GuiRender.kt
+++ b/src/main/java/at/lorenz/mod/utils/GuiRender.kt
@@ -1,7 +1,7 @@
package at.lorenz.mod.utils
import at.lorenz.mod.utils.LorenzUtils.removeColorCodes
-import com.thatgravyboat.skyblockhud_2.core.config.Position
+import com.thatgravyboat.amod.core.config.Position
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.ScaledResolution
import net.minecraft.client.renderer.GlStateManager