From 30df3e578cef533cacedf737449bbd35d4ea5d11 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Fri, 15 Apr 2022 18:20:30 +0900 Subject: fix shadow and add nanovg support --- .../oneconfig/command/OneConfigCommand.java | 29 ++++++---------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'src/main/java/io/polyfrost/oneconfig/command') diff --git a/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java b/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java index df727a0..c2e6447 100644 --- a/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java +++ b/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java @@ -2,20 +2,19 @@ package io.polyfrost.oneconfig.command; import io.polyfrost.oneconfig.gui.Window; import io.polyfrost.oneconfig.hud.gui.HudGui; +import io.polyfrost.oneconfig.test.TestNanoVGGui; import io.polyfrost.oneconfig.themes.Themes; import io.polyfrost.oneconfig.utils.TickDelay; import net.minecraft.client.Minecraft; -import net.minecraft.command.ICommand; +import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import org.jetbrains.annotations.NotNull; import java.io.File; import java.util.ArrayList; import java.util.List; -public class OneConfigCommand implements ICommand { +public class OneConfigCommand extends CommandBase { private static final Minecraft mc = Minecraft.getMinecraft(); @@ -49,27 +48,15 @@ public class OneConfigCommand implements ICommand { mc.thePlayer.addChatMessage(new ChatComponentText("reloading theme!")); Themes.openTheme(new File("OneConfig/themes/one.zip").getAbsoluteFile()); break; + case "lwjgl": + new TickDelay(() -> mc.displayGuiScreen(new TestNanoVGGui()), 1); + break; } } } @Override - public boolean canCommandSenderUseCommand(ICommandSender sender) { - return true; - } - - @Override - public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { - return null; - } - - @Override - public boolean isUsernameIndex(String[] args, int index) { - return false; - } - - @Override - public int compareTo(@NotNull ICommand o) { - return 0; + public int getRequiredPermissionLevel() { + return -1; } } -- cgit From cf164be0c8f43c3d1387c9c9f7ae73c2cf1b3a02 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sat, 16 Apr 2022 14:51:58 +0900 Subject: merge rendering files + remove themes --- .../java/io/polyfrost/oneconfig/command/OneConfigCommand.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/main/java/io/polyfrost/oneconfig/command') diff --git a/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java b/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java index c2e6447..b210146 100644 --- a/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java +++ b/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java @@ -1,16 +1,12 @@ package io.polyfrost.oneconfig.command; -import io.polyfrost.oneconfig.gui.Window; import io.polyfrost.oneconfig.hud.gui.HudGui; import io.polyfrost.oneconfig.test.TestNanoVGGui; -import io.polyfrost.oneconfig.themes.Themes; import io.polyfrost.oneconfig.utils.TickDelay; import net.minecraft.client.Minecraft; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; -import net.minecraft.util.ChatComponentText; -import java.io.File; import java.util.ArrayList; import java.util.List; @@ -38,16 +34,12 @@ public class OneConfigCommand extends CommandBase { @Override public void processCommand(ICommandSender sender, String[] args) { - if (args.length == 0) new TickDelay(() -> mc.displayGuiScreen(new Window()), 1); + if (args.length == 0) ; //new TickDelay(() -> mc.displayGuiScreen(new Window()), 1); else { switch (args[0]) { case "hud": new TickDelay(() -> mc.displayGuiScreen(new HudGui()), 1); break; - case "theme": - mc.thePlayer.addChatMessage(new ChatComponentText("reloading theme!")); - Themes.openTheme(new File("OneConfig/themes/one.zip").getAbsoluteFile()); - break; case "lwjgl": new TickDelay(() -> mc.displayGuiScreen(new TestNanoVGGui()), 1); break; -- cgit