lukflug / PanelStudio

An extensible and customizable GUI API/library to create ClickGUIs, HUDEditors and TabGUIs designed for use in Minecraft utility mods.
https://lukflug.github.io/panelstudio.html
MIT License
309 stars 23 forks source link

crash game example code #29

Closed MHProDev closed 2 years ago

MHProDev commented 2 years ago

---- Minecraft Crash Report ----

WARNING: coremods are present: TLSkinCapeHookLoader (tlskincape_1.8.9-1.4.jar) Contact their authors BEFORE contacting forge

// You should try our sister game, Minceraft!

Time: 3/9/22 2:29 PM Description: Unexpected error

java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMinecraft()Lnet/minecraft/client/Minecraft; at com.lukflug.panelstudio.mc8forge.MinecraftGUI.enterGUI(MinecraftGUI.java:40) at com.lukflug.panelstudio.mc8forge.MinecraftHUDGUI.enterGUI(MinecraftHUDGUI.java:22) at net.dumbteam.clients.InstanceClient.onKeyInput(InstanceClient.java:70) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_InstanceClient_onKeyInput_KeyInputEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140) at net.minecraftforge.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:547) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1954) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1024) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) at net.minecraft.client.main.Main.main(SourceFile:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head -- Stacktrace: at com.lukflug.panelstudio.mc8forge.MinecraftGUI.enterGUI(MinecraftGUI.java:40) at com.lukflug.panelstudio.mc8forge.MinecraftHUDGUI.enterGUI(MinecraftHUDGUI.java:22) at net.dumbteam.clients.InstanceClient.onKeyInput(InstanceClient.java:70) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_7_InstanceClient_onKeyInput_KeyInputEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140) at net.minecraftforge.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:547)

-- Affected level -- Details: Level name: MpServer All players: 6 total; [EntityOtherPlayerMP['NPC #1'/8906, l='MpServer', x=1.47, y=4.00, z=-278.41], EntityOtherPlayerMP['NPC #3'/13, l='MpServer', x=-9.50, y=4.00, z=-281.50], EntityOtherPlayerMP['NPC #4'/16, l='MpServer', x=-15.59, y=4.00, z=-281.56], EntityOtherPlayerMP['NPC #5'/19, l='MpServer', x=-15.50, y=4.00, z=-275.50], EntityOtherPlayerMP['NPC #2'/9028, l='MpServer', x=-9.50, y=4.00, z=-275.50], EntityPlayerSP['mmad'/10412, l='MpServer', x=26.07, y=4.00, z=-289.50]] Chunk stats: MultiplayerChunkCache: 169, 169 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: 8.00,64.00,8.00 - World: (8,64,8), Chunk: (at 8,4,8 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 28332 game time, 1000 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false Forced entities: 30 total; [EntityPlayerSP['mmad'/10412, l='MpServer', x=26.50, y=4.00, z=-289.50], EntityVillager['Villager'/10368, l='MpServer', x=16.38, y=1.00, z=-276.34], EntityOtherPlayerMP['NPC #1'/8906, l='MpServer', x=1.47, y=4.00, z=-278.41], EntityVillager['Villager'/10370, l='MpServer', x=13.44, y=1.00, z=-276.75], EntityVillager['Villager'/10371, l='MpServer', x=19.75, y=1.00, z=-273.44], EntityOtherPlayerMP['NPC #2'/9028, l='MpServer', x=-9.50, y=4.00, z=-275.50], EntityVillager['Villager'/10375, l='MpServer', x=20.41, y=1.00, z=-283.25], EntityVillager['Villager'/10377, l='MpServer', x=15.19, y=1.06, z=-280.19], EntityOtherPlayerMP['NPC #1'/8906, l='MpServer', x=1.47, y=4.00, z=-278.41], EntityOtherPlayerMP['NPC #3'/13, l='MpServer', x=-9.50, y=4.00, z=-281.50], EntityOtherPlayerMP['NPC #4'/16, l='MpServer', x=-15.59, y=4.00, z=-281.56], EntityOtherPlayerMP['NPC #5'/19, l='MpServer', x=-15.50, y=4.00, z=-275.50], EntityVillager['Villager'/10329, l='MpServer', x=14.38, y=1.00, z=-276.16], EntityVillager['Villager'/10393, l='MpServer', x=10.28, y=1.00, z=-282.70], EntityVillager['Villager'/10337, l='MpServer', x=20.69, y=1.00, z=-278.28], EntityVillager['Villager'/10338, l='MpServer', x=12.06, y=1.00, z=-283.34], EntityVillager['Villager'/10339, l='MpServer', x=15.41, y=1.00, z=-283.44], EntityVillager['Villager'/10404, l='MpServer', x=10.63, y=1.00, z=-281.81], EntityVillager['Villager'/10405, l='MpServer', x=20.69, y=1.00, z=-274.41], EntityVillager['Villager'/10408, l='MpServer', x=11.16, y=1.00, z=-283.59], EntityOtherPlayerMP['NPC #3'/13, l='MpServer', x=-9.50, y=4.00, z=-281.50], EntityOtherPlayerMP['NPC #4'/16, l='MpServer', x=-15.59, y=4.00, z=-281.56], EntityOtherPlayerMP['NPC #5'/19, l='MpServer', x=-15.50, y=4.00, z=-275.50], EntityOtherPlayerMP['NPC #2'/9028, l='MpServer', x=-9.50, y=4.00, z=-275.50], EntityPlayerSP['mmad'/10412, l='MpServer', x=26.07, y=4.00, z=-289.50], EntityVillager['Villager'/10357, l='MpServer', x=19.09, y=1.00, z=-283.72], EntityVillager['Villager'/10358, l='MpServer', x=11.16, y=1.00, z=-273.91], EntityVillager['Villager'/10363, l='MpServer', x=15.22, y=1.00, z=-282.41], EntityVillager['Villager'/10365, l='MpServer', x=11.60, y=1.00, z=-274.79], EntityVillager['Villager'/10367, l='MpServer', x=10.28, y=1.00, z=-283.59]] Retry entities: 0 total; [] Server brand: NachoSpigot Server type: Non-integrated multiplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:402) at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2536) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378) at net.minecraft.client.main.Main.main(SourceFile:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details -- Details: Minecraft Version: 1.8.9 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 193147664 bytes (184 MB) / 434499584 bytes (414 MB) up to 3207856128 bytes (3059 MB) JVM Flags: 3 total; -Xmn128M -Xmx3071M -XX:+UseConcMarkSweepGC IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.19 Powered by Forge 11.15.1.1764 Optifine OptiFine_1.8.9_HD_U_M5 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJA FML{8.0.99.99} [Forge Mod Loader] (forge-1.8.9-11.15.1.1764.jar) UCHIJA Forge{11.15.1.1764} [Minecraft Forge] (forge-1.8.9-11.15.1.1764.jar) UCHIJA instanceclient{1.0-SNAPSHOT} [Instance Client] (InstanceClient.jar) UCHIJA tlauncher_custom_cape_skin{1.4} [TLSkinCape] (tlskincape_1.8.9-1.4.jar) Loaded coremods (and transformers): TLSkinCapeHookLoader (tlskincape_1.8.9-1.4.jar) gloomyfolken.hooklib.minecraft.PrimaryClassTransformer GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'GeForce 210/PCIe/SSE2' Launched Version: ForgeOptiFine 1.8.9 LWJGL: 2.9.4 OpenGL: GeForce 210/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.

Using VBOs: No
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 2x Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
OptiFine Version: OptiFine_1.8.9_HD_U_M5
OptiFine Build: 20210124-163719
Render Distance Chunks: 8
Mipmaps: 4
Anisotropic Filtering: 1
Antialiasing: 0
Multitexture: false
Shaders: null
OpenGlVersion: 3.3.0
OpenGlRenderer: GeForce 210/PCIe/SSE2
OpenGlVendor: NVIDIA Corporation
CpuCount: 2
MHProDev commented 2 years ago

build.gradle


buildscript {
    repositories {
        mavenLocal()
        maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://jitpack.io" }
        maven { url = "https://maven.minecraftforge.net/" }
        maven { url = "https://lukflug.github.io/maven/" }
    }
    dependencies {
        classpath "com.github.asbyth:ForgeGradle:6f53277"
    }
}

repositories {
    mavenLocal()
    maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://jitpack.io" }
    maven { url = "https://maven.minecraftforge.net/" }
    maven { url = "https://lukflug.github.io/maven/" }
}

version = "1.0"
group = "net.dumbteam.clients"

apply plugin: 'scala'
apply plugin: 'net.minecraftforge.gradle.forge'

minecraft {
    version = '1.8.9-11.15.1.2318-1.8.9'
    runDir = 'debug'
    mappings = 'stable_22'
}

processResources {
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
        expand 'version': project.version, 'mcversion': project.minecraft.version
    }

    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}

dependencies {
    implementation "org.projectlombok:lombok:1.18.22"
    compile "com.google.code.gson:gson:2.8.5"
    compile "com.lukflug:panelstudio:0.2.1"
    compile "com.lukflug:panelstudio-mc8-forge:0.2.0"
}
lukflug commented 2 years ago

Could you tell me what you changed?

MHProDev commented 2 years ago

no changes

MHProDev commented 2 years ago

only i sort packages, (setting, module)

MHProDev commented 2 years ago

image

MHProDev commented 2 years ago

clients.zip

MHProDev commented 2 years ago
package net.dumbteam.clients;

import lombok.Getter;
import lombok.Setter;
import net.dumbteam.clients.module.Category;
import net.dumbteam.clients.module.modules.ClickGUIModule;
import net.dumbteam.clients.module.modules.TabGUIModule;
import net.dumbteam.clients.module.modules.WatermarkModule;
import net.dumbteam.clients.ui.game.ClickGUI;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import org.apache.logging.log4j.Logger;
import org.lwjgl.input.Keyboard;

@Getter
@Setter
@Mod(
        modid = InstanceClient.MODID,
        version = InstanceClient.VERSION,
        name = InstanceClient.NAME
)
public class InstanceClient {
    public static final String MODID = "instanceclient";
    public static final String NAME = "Instance Client";
    public static final String VERSION = "1.0-SNAPSHOT";
    private Logger logger;
    private ClickGUI gui;

    @EventHandler
    public void onEnable(FMLPreInitializationEvent event) {
        logger = event.getModLog();
    }

    @SubscribeEvent
    public void onChat(ServerChatEvent event) {
        System.out.println(event.getComponent().getFormattedText());
    }

    @EventHandler
    public void init(FMLInitializationEvent event) {
        Category.init();
        Category.OTHER.modules.add(new ClickGUIModule());
//        Category.OTHER.modules.add(new HUDEditorModule());
        Category.HUD.modules.add(new TabGUIModule());
        Category.HUD.modules.add(new WatermarkModule());
//        Category.HUD.modules.add(new LogoModule());
        MinecraftForge.EVENT_BUS.register(this);

        this.setGui(new ClickGUI());
    }

    @SubscribeEvent
    public void onRender(RenderGameOverlayEvent.Post event) {
//        try {
//            if (event.type == RenderGameOverlayEvent.ElementType.HOTBAR) gui.render();
//        } catch (Exception e) {
//            logger.error(e.getMessage());
//        }
    }

    @SubscribeEvent
    public void onKeyInput(InputEvent.KeyInputEvent event) {
        if (Keyboard.isKeyDown(ClickGUIModule.keybind.getKey())) gui.enterGUI();
//        if (Keyboard.isKeyDown(HUDEditorModule.keybind.getKey())) gui.enterHUDEditor();
        if (Keyboard.getEventKeyState()) gui.handleKeyEvent(Keyboard.getEventKey());
    }

}
lukflug commented 2 years ago

The build.gradle file you sent doesn't match up with the one in the example mod at all. The source of the issue is probably there. I just checked the example mod as it currently is in the GitHub repository and it works both in the IDE and in the Launcher environments.

lukflug commented 2 years ago

I see you're using a non-standard version of ForgeGradle. I'd suggest you use the version net.minecraftforge.gradle:ForgeGradle:2.1.3. Do a clean build of the project (gradlew --stop, gradlew clean, gradlew setupDecompWorkspace --refresh-dependencies, gradlew build). If the issue persists, send me the entire project folder (with build.gradle, without .gradle, build and other computer-generated folders, only the things that would typically be in a source repository and that are necessary to reproduce the issue).

MHProDev commented 2 years ago

i got errors image how i can fix that ? @lukflug

lukflug commented 2 years ago

There seems to be an issue with your Java https certificates. Are you using any particularly old version of Java (e.g. Java 6)?

This might be relevant: https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ

MHProDev commented 2 years ago

corretto-1.8.0_322