Jump to content

Recommended Posts

Posted

I was trying to create a custom container. Although there was a NullPointerException, I was still able to play the game and have access to the container and containerScreen, no crashes.

Specifically, IDE is pointing to the PacketBuffer data in the ContainerRegistry where it says IForgeContainerType.create(((windowId, inv, data) -> { ... data.readBlockPos();  // Error: data is null??

Anyone know what is the cause of this and how can I fix this?

Forge Version: forge:1.16.5-36.2.20

 

Here is the Error:

  Reveal hidden contents

 

ModContainerRegistry:

  Reveal hidden contents

 

The use method in ModBlock that opens the gui:

  Reveal hidden contents

 

The Container itself:

  Reveal hidden contents

 

Posted

TileEntityStorageChest:

  Reveal hidden contents
Posted

Yes, that fixed the problem. Thank you so much.

 

Here are the changes incase anyone curious:

  Reveal hidden contents

 

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.