Jump to content

Recommended Posts

Posted

I don't understand this error can anyone explain it to me? I get it when i press the key that should in theory, open up a gui.

[17:31:04] [Client thread/FATAL]: Unreported exception thrown!

java.lang.NullPointerException

at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source) ~[CrashReportCategory.class:?]

at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source) ~[CrashReport.class:?]

at net.minecraft.crash.CrashReport.makeCategory(Unknown Source) ~[CrashReport.class:?]

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(Unknown Source) ~[EntityRenderer.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Unknown Source) ~[Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Unknown Source) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Unknown Source) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]

at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]

at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

[17:31:04] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:-1]: ---- Minecraft Crash Report ----

// Don't do that.

 

Time: 16/09/15 17:31

Description: Unexpected error

 

java.lang.NullPointerException: Unexpected error

at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source)

at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source)

at net.minecraft.crash.CrashReport.makeCategory(Unknown Source)

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(Unknown Source)

at net.minecraft.client.Minecraft.runGameLoop(Unknown Source)

at net.minecraft.client.Minecraft.run(Unknown Source)

at net.minecraft.client.main.Main.main(Unknown Source)

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)

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.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

 

 

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

---------------------------------------------------------------------------------------

 

Posted

Show your code.

 

package com.zombiesurvival.client.utils;

import org.lwjgl.input.Keyboard;

import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.fml.client.registry.ClientRegistry;

public class KeyBindings {
    public static KeyBinding openGUI;
    public static KeyBinding shoot;
    public static KeyBinding aim;
    public static KeyBinding chat;
    public static KeyBinding reload;
    public static void init() {
    openGUI = new KeyBinding("key.openGUI", Keyboard.KEY_Z, "key.test.zombiesurvival");
    ClientRegistry.registerKeyBinding(openGUI);
    
    }
}

package com.zombiesurvival.client.utils;


import com.zombiesurvival.Main;

import com.zombiesurvival.client.gui.inventory.GuiZS_PlayerInventory;
import com.zombiesurvival.common.handlers.ModGuiHandler;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
public class KeyInputHandler {
@SubscribeEvent
public void onKeyInput(InputEvent.KeyInputEvent event) 
{
  if(KeyBindings.openGUI.isPressed())
  {
  EntityPlayerSP player = Minecraft.getMinecraft().thePlayer;
  World world = Minecraft.getMinecraft().theWorld;
  Object MainLol = Main.instance;
  int x = (int)player.posX;
  int y = (int)player.posY;
  int z = (int)player.posZ;
  player.openGui(MainLol, ModGuiHandler.PLAYERIVENTORY, world, x, y, z);
  }
}
}

package com.zombiesurvival.common.handlers;

import com.zombiesurvival.client.gui.inventory.GuiZS_PlayerInventory;

import com.zombiesurvival.client.gui.inventory.ContainerZS_PlayerInventory;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;

public class ModGuiHandler implements IGuiHandler
{
public static final int PLAYERIVENTORY = 0;
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
{
        switch(ID)
        {
        case 0: return new ContainerZS_PlayerInventory(player);
        }
	return null;
}

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
	  switch(ID)
        {
        case 0: return new GuiZS_PlayerInventory(player);
        }
	return null;
}

}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • https://mclo.gs/bjf9fqs The link is the logs from modrinth  
    • "I want to understand how complex mods with ASM transformation and coremods work, such as Xray or AntiXray. Why do they break when you simply rename packages? What features of their architecture make refactoring difficult? And what techniques are used to protect these mods? I am interested in technical aspects in order to better understand the bytecode and Forge loader system."
    • I can't figure out if you're looking for help trying to steal someone elses work, or cheat at the game....
    • Title: Why Is It So Hard to Rename and Restructure Mods Like Xray or AntiXray? 🤔 Post text: Hey everyone! I’ve been digging into Minecraft modding for a while and have one big question that I can’t figure out on my own. Maybe someone with more experience could help or give me some advice. Here’s the issue: When I take a “normal” Minecraft mod — for example, one that just adds some blocks or new items — I can easily change its structure, package names, or even rebrand it entirely. It’s straightforward. But as soon as I try this with cheat-type mods like XrayMod or AntiXray, everything falls apart. Even if I just rename the classes, refactor the packages, or hide its identity somehow, the mod either breaks or stops working properly. XrayMod in particular is proving to be a nightmare to modify without losing its core function. So my question is — why is this so much harder with cheat mods like Xray? Is there something fundamentally different about how they’re coded, loaded, or protected that prevents simple renaming or restructuring? And if so, how can I actually learn to understand someone else’s cheat mod enough to safely refactor it without breaking the core features? I’ve already been spending over two months trying to figure this out and haven’t gotten anywhere. It feels like there must be some trick or knowledge I’m missing. Would really appreciate any thoughts, tips, or references — maybe there are guides or techniques for understanding cheat-mod internals? Or if you’ve successfully “disguised” a cheat mod like Xray before, I’d love to hear how you did it. Thanks in advance for any help or discussion. ✌️
    • just started making cinamatic contect check it out on my channel or check out my facebook page    Humbug City Minecraft Youtube https://www.youtube.com/watch?v=v2N6OveKwno https://www.facebook.com/profile.php?id=61575866982337  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.