Closed Whop42 closed 3 years ago
What i notice is that when u open youf clickgui, you instantly toggle it after making it disable. For the crash, im still trying to figure out what is wrong with it
I think i know the reason why it is crashing. First, you need a colormodel mode setting that tells whether or not to use HSB or RGB. The fields in toggleable need to be filled with that setting. The toggle() method should be filled with the ColorModel setting incrementing. (think about it as a mode setting incrementing from one mode to another.) The isOn method should be filled with whether or not to use RGB or HSB, with the colorModel setting too. Hopefully this helped you, if not then idk what else to think of
Are you sure the PanelStudio classes are even loaded? Are you running this in a dev environment or in the launcher?
Are you sure the PanelStudio classes are even loaded? Are you running this in a dev environment or in the launcher?
I'm running it from IntelliJ, and it builds so I think the classes are loading
you need a colormodel mode setting that tells whether or not to use HSB or RGB
I'm doing that right now, but I'm not sure it will work
Nope, I'm still getting the same error.
You need to make your seettings and module system implement panelstudios. For your settings, there are 5 that panelstudio has. EnumSetting (mode) ColorSetting,KeybindSetting, Toggleable (boolean), and NumberSetting
make your settings implement that and also include the override methods that the interface requires. Next make your module file (not a modulemanager) implement Toggleable too and also include the override methods that it needs. Hoped this help you
Ok, it's almost certainly caused by DentClient.instance.gui
never being initialized.
Is this how it should be initialized?
public enum DentClient {
instance;
public static String name = "Dent Client";
public static String author = "Whop42";
public static String version = "0.2.42";
public static String game = "1.16.5";
private boolean ghostMode = false;
public EventManager eventManager;
public ModuleManager moduleManager;
public SettingManager settingManager;
public CommandManager commandManager;
public ConfigManager configManager;
public Guey gui;
public void run() {
eventManager = new EventManager();
moduleManager = new ModuleManager();
settingManager = new SettingManager();
commandManager = new CommandManager();
configManager = new ConfigManager();
gui = new Guey();
moduleManager.loadMods();
commandManager.loadCommands();
configManager.loadConfig();
}
public void stop() {
configManager.saveConfig();
}
public static String getVersion() {
return version;
}
public static String getName() {
return name;
}
public boolean isGhost() {
return ghostMode;
}
public void setGhostMode(boolean value) {
ghostMode = value;
}
}
Because if it is, it returns this slightly different error:
[12:58:37] [main/INFO] (Minecraft) [STDERR]: java.lang.reflect.InvocationTargetException
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at jdk.internal.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.dent.client.event.Event.lambda$call$0(Event.java:41)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.dent.client.event.Event.call(Event.java:39)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.Keyboard.handler$zhh000$onOnKey(Keyboard.java:517)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.Keyboard.onKey(Keyboard.java)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.Keyboard.method_22678(Keyboard.java:385)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.util.thread.ThreadExecutor.execute(ThreadExecutor.java:86)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.Keyboard.method_22676(Keyboard.java:385)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:37)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at org.lwjgl.system.JNI.invokeV(Native Method)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:89)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.util.Window.swapBuffers(Window.java:339)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1026)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:624)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.minecraft.client.main.Main.main(Main.java:187)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:139)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:27)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: Caused by: java.lang.NullPointerException
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at com.lukflug.panelstudio.mc16.MinecraftGUI.enterGUI(MinecraftGUI.java:46)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.dent.client.module.modules.render.GUI.onEnable(GUI.java:20)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.dent.client.module.Module.toggle(Module.java:91)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: at net.dent.client.module.ModuleManager.onKey(ModuleManager.java:61)
[12:58:37] [main/INFO] (Minecraft) [STDERR]: ... 27 more
You need to implement panelstudio setting interfaces within your settings, like what i said in the post above. Also implement the Toggleable interface in your module class.
Also yes that is how you instantiate the clickgui class
You may want to create seperate classes inside the setting instead of seperate constructors so you can implement them
This is a build.gradle
issue:
compile "com.lukflug:panelstudio:0.1.8"
modCompile "com.lukflug:panelstudio-mc16:0.1.8"
instead of
compile "com.lukflug:panelstudio:0.1.8"
compile "com.lukflug:panelstudio-mc16:0.1.8"
This is a build.gradle issue:
Still get an error for that
You need to implement panelstudio setting interfaces within your settings, like what i said in the post above. Also implement the Toggleable interface in your module class.
The Module class implements Toggleable, and I have converters/shells/whatever for the settings (I might just rewrite my setting base if i need to...)
yeah maybe u need to rewrite your settings to use panelstudio
I don't think the settingbase being different than panelstudio's would cause the gui to not even open
I saw an error in the events system, maybe u wanna check it out and see how it works?
It's just the keyboard event being called
Can u push the lastest changes to github so i can see or is it already updated
The settings don't have anything to do with the runtime issue.
This is a build.gradle issue:
Still get an error for that
You need to implement panelstudio setting interfaces within your settings, like what i said in the post above. Also implement the Toggleable interface in your module class.
The Module class implements Toggleable, and I have converters/shells/whatever for the settings (I might just rewrite my setting base if i need to...)
What do you mean with "Still get an error for that"? Is it the same error or a different one, have you tried a clean build?
Its the same one
Could you push your newest changes on GitHub and I will make a pull request trying to fix this for you soon?
The changes were pushed when ChompChompDead asked for it, I forgot to say something sry.
Use PanelStudio 0.1.8 and PanelStudio-MC16 0.1.9!
It also doesn't open the ClickGUI. The source is here. This is the error:
The game does not crash.
How do I fix this?