From d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sat, 2 Jul 2022 06:12:23 +0700 Subject: Separate Minecraft dependant and non-dependant code --- .../java/cc/polyfrost/oneconfig/test/TestConfig_Test.java | 6 +++--- .../java/cc/polyfrost/oneconfig/test/TestMod_Test.java | 14 -------------- .../cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java | 3 --- .../cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java | 1 - 4 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java (limited to 'src/main/java/cc/polyfrost/oneconfig/test') diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java index a7ad2ac..772bba7 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java @@ -7,8 +7,8 @@ import cc.polyfrost.oneconfig.config.data.*; import cc.polyfrost.oneconfig.config.Config; import cc.polyfrost.oneconfig.config.data.ModType; import cc.polyfrost.oneconfig.config.migration.VigilanceMigrator; +import cc.polyfrost.oneconfig.libs.universal.UChat; import cc.polyfrost.oneconfig.libs.universal.UKeyboard; -import net.minecraftforge.fml.common.FMLCommonHandler; public class TestConfig_Test extends Config { @@ -59,9 +59,9 @@ public class TestConfig_Test extends Config { @Button( name = "Test Button", - text = "Crash game" + text = "Say hi" ) - Runnable runnable = () -> FMLCommonHandler.instance().exitJava(69, false); + Runnable runnable = () -> UChat.chat("HI!!!!"); @Slider( name = "Test Slider", diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java deleted file mode 100644 index 98537f7..0000000 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestMod_Test.java +++ /dev/null @@ -1,14 +0,0 @@ -package cc.polyfrost.oneconfig.test; - -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; - -@net.minecraftforge.fml.common.Mod(modid = "oneconfig-test-mod", name = "Test Mod", version = "0") -public class TestMod_Test { - TestConfig_Test config; - - @Mod.EventHandler - public void init(FMLInitializationEvent event) { - config = new TestConfig_Test(); - } -} diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java index 9055862..1665062 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestMultilineHud_Test.java @@ -1,7 +1,6 @@ package cc.polyfrost.oneconfig.test; import cc.polyfrost.oneconfig.hud.TextHud; -import net.minecraft.client.Minecraft; import java.util.List; @@ -12,8 +11,6 @@ public class TestMultilineHud_Test extends TextHud { @Override protected void getLines(List lines) { - lines.clear(); lines.add(String.valueOf(System.currentTimeMillis())); - lines.add(String.valueOf(Minecraft.getSystemTime())); } } diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java index 12a8735..e8b6b91 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java @@ -13,7 +13,6 @@ public class TestNanoVGGui_Test extends UScreen { @Override public void onDrawScreen(@NotNull UMatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { super.onDrawScreen(matrixStack, mouseX, mouseY, partialTicks); - drawRect(0, 0, width, height, Color.BLACK.getRGB()); long startTime = System.nanoTime(); RenderManager.setupAndDraw((vg) -> { RenderManager.drawRect(vg, 0, 0, 100, 100, Color.BLUE.getRGB()); -- cgit