Jump to content

[Forge 1.11.2] Cannot open gui.


lethinh

Recommended Posts

I am having problems that when the I open the gui, tried to shift-clicking the item to the inventory, it showed the error:

 

Quote

java.lang.NullPointerException: Updating screen events
    at net.minecraft.inventory.Container.slotClick(Container.java:239)
    at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:551)
    at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:632)
    at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:391)
    at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:544)
    at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:512)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1695)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056)
    at net.minecraft.client.Minecraft.run(Minecraft.java:372)
    at net.minecraft.client.main.Main.main(SourceFile:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)

 

The transferStackInSlot method is in my github repo. Link: https://github.com/letruongthinh/MatterExpansion/blob/1.11.2/src/main/java/io/lethinh/matterexpansion/gui/GenericContainer.java

 

Here is my TileEntity code: https://github.com/letruongthinh/MatterExpansion/blob/1.11.2/src/main/java/io/lethinh/matterexpansion/tile/TileFreezer.java

My Container code: https://github.com/letruongthinh/MatterExpansion/blob/1.11.2/src/main/java/io/lethinh/matterexpansion/gui/ContainerFreezer.java

My GUI code: https://github.com/letruongthinh/MatterExpansion/blob/1.11.2/src/main/java/io/lethinh/matterexpansion/gui/GuiFreezer.java

My GUI Handler code: https://github.com/letruongthinh/MatterExpansion/blob/1.11.2/src/main/java/io/lethinh/matterexpansion/init/GuiHandler.java

My block code: https://github.com/letruongthinh/MatterExpansion/blob/1.11.2/src/main/java/io/lethinh/matterexpansion/block/BlockFreezer.java

 

If you need any code, please view it in my github repo.

 

And I have also registered the TileEntity.

 

Thanks in advance!

Edited by lethinh
Link to comment
Share on other sites

17 minutes ago, diesieben07 said:

I tried to clone your repository and debug this for myself, but your code is full of compilation errors, missing packages, etc. And you even have a broken dependency in your build.gradle.

I am very sory but this is the first time I used github.

Link to comment
Share on other sites

20 minutes ago, diesieben07 said:

One example:

0JS7hFD.png

 

Now I have synced the code in the github with my project. And I have fixed all the compliations error. Thank you for your patient!

Edited by lethinh
Link to comment
Share on other sites

2 minutes ago, diesieben07 said:

Your code still does not compile. Are you not checking your code before you push? Do you not use an IDE?

 I use eclipse and it is correctly. It can run. What do you mean it does not complie?

Edited by lethinh
Link to comment
Share on other sites

5 minutes ago, diesieben07 said:

I am starting to believe your IDE is broken:

  Hide contents

ZBqWIud.png

 

Oh, I am so stupid. When I upload the source to github, I forgot to delete the code that I didn't not use in the project. This is really dumb, right?

Link to comment
Share on other sites

  • 3 weeks later...

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



×
×
  • Create New...

Important Information

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