Jump to content

Recommended Posts

Posted

So i'm having an issue, i've been updating my mod to 1.13 from 1.12, and the custom crafting table that i've created now crashes the game whenever it's opened.

I've updated the code to match the code from the vanilla GuiCrafting class.

 

Here's the crash log:

Spoiler

[06Mar2019 08:43:01.137] [Client thread/FATAL] [net.minecraft.client.Minecraft/]: Reported exception thrown!
net.minecraft.crash.ReportedException: Rendering screen
    at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:667) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:793) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:358) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at net.minecraft.client.main.Main.main(SourceFile:144) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:19) [modlauncher-0.12.0.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:32) [modlauncher-0.12.0.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:50) [modlauncher-0.12.0.jar:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:56) [modlauncher-0.12.0.jar:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:42) [modlauncher-0.12.0.jar:?]
    at net.minecraftforge.userdev.UserdevLauncher.main(UserdevLauncher.java:81) [forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
Caused by: java.lang.NullPointerException
    at net.minecraft.client.gui.recipebook.GuiButtonRecipe.render(SourceFile:79) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at net.minecraft.client.gui.recipebook.RecipeBookPage.render(SourceFile:111) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at net.minecraft.client.gui.recipebook.GuiRecipeBook.render(GuiRecipeBook.java:244) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at com.nmg.me.client.gui.GuiCarpentersTable.render(GuiCarpentersTable.java:87) ~[classes/:?]
    at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:348) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:654) ~[forge-1.13.2-25.0.70_mapped_snapshot_20180921-1.13-recomp.jar:?]
    ... 14 more

 

Apparently something in GuiButtonRecipe.render is null, but i can't figure out what it is, i've initialized everything in my GuiCarpentersTable class (I think).

Here's the for GuiCarpentersTable

And here's the code for the BlockCarpentersTable

 

I have no idea what's wrong, and i've tried to step through the debugger in Intellij, but i don't find anything wrong.

Posted
25 minutes ago, LTNightshade said:

You need to register your Gui: 

 


ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.GUIFACTORY,
                () -> (OpenContainer oc) -> { 
});

 

Yeah i've already done that, here's the code

The registerExtensionPoint points to the handleGuiRequests method

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.