MineColonies

MineColonies

53M Downloads

Crash when intaracting with builder NPC and opening the requests tab

222alon opened this issue ยท 4 comments

commented

Prerequisites

  • I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
  • I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
  • I made sure that this issue is not a duplicate of any existing issue.

Context

  • Minecraft Version: 1.16.4
  • MineColonies Version:0.13.610-ALPHA
  • Structurize Version:0.13.113-ALPHA
  • Related Mods and their Versions:

Expected behavior

To be able to answer the requests of the NPC and give them items.

Actual behavior

I get to the requests tab and it operates as expected for a few seconds, and lets me give the NPC his items, however after a few second minecraft crashes ("saving world") and kicks me to the client

Steps to reproduce the issue

  1. Talk with builder NPC
  2. Open requests tab
  3. Try to use as normal
  4. Game crashes with a Ticking Screen error.

Logs

Notes

In a custom modpack, latest forge ver, seems to happen faster when I try to scroll to the bottom of the requests list.


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

I'm going to close this here. As I've explained on discord there is a mod that incorrectly implements the tooltype returning a null for non nullable fields. They will have to fix that on their side. Unfortunately the only way to find out which mod id responsible is by removing and checking if it still occurs.

commented

Personally I'd think being able to handle such a thing should be on the checklist it ain't my mod so if ya wanna let random mods break your own go for it

commented

@222alon you're returning null on Non-Nullable fields. that is absolutely against API specs and will break other mods. this is your problem.

*read "it ain't my mod" as "my mod isn't the one in the wrong". correct me if i'm wrong

commented
        set.addAll(stack.getItem().getToolTypes(stack).stream().map(net.minecraftforge.common.ToolType::getName).collect(Collectors.toList()));

this just should not crash, like ever. toolTypes should never be null. (It crashes at the getName)