Theta-Dev / ConstructionWand

Minecraft Mod - Construction Wands make building easier!
https://www.curseforge.com/minecraft/mc-mods/construction-wand
MIT License
11 stars 12 forks source link

NPE caused by capability provider in Forge #39

Closed ItsWavyy closed 2 years ago

ItsWavyy commented 2 years ago

I dont really know what happened, but i was using a diamond wand to fill in some dirt, and it just stopped working. Now when i try to use it, nothing happens, and all the doors in my world get glitched after trying to place with it. Any advice?

Theta-Dev commented 2 years ago

Could you give me some more information about the issue (MC version, other mods installed)?

Theta-Dev commented 2 years ago

Also: what do you have in your inventory, are you in survival or creative mode and what do you mean with "glitched doors"? I cant reproduce the issue with only so few information.

ItsWavyy commented 2 years ago

Also: what do you have in your inventory, are you in survival or creative mode and what do you mean with "glitched doors"? I cant reproduce the issue with only so few information.

Im playing survival on a server i run with my friends, currently we have biomesoplenty, croptopia, mrcrayfish's furniture, ironchest, just enough items, mcw windows, travelers backpack, xaeros minimap, and xp tome.

ill include screenshots below of the doors, and my console log when i tried using the wand

image_2021-09-27_155743

image

image_2021-09-27_160556

Theta-Dev commented 2 years ago

That section of the server console does not give me much information. It looks like it shows the stack trace of an error, but I can only see the last 3 lines. Could you upload the entire error log to Pastebin?

Also, what Minecraft version are you playing on?

ItsWavyy commented 2 years ago

Im playing minecraft 1.17.1, ill include pictures of a whole console log below with the errors

Screenshot (4) Screenshot (5) Screenshot (6) Screenshot (7)

Theta-Dev commented 2 years ago

I have looked into the issue and it seems like a bug in Forge. Are you using Forge version 37.0.66? If yes, they reworked the capability provider in that version but created a bug that can cause a NPE when querying an item's capabilities. So when ConstructionWand asks Forge if an item has the ItemHandlerCapability (is a modded item container like a backpack), it may throw an error.

See this issue for details https://github.com/MinecraftForge/MinecraftForge/issues/8093

Updating Forge should fix the issue, in fact they released a hotfix just within 2 hours. Guess you had bad luck when installing forge ;-)

Theta-Dev commented 2 years ago

Update: I have seen in the logs that you are using Forge 37.0.68. They released another fix for this issue with Forge 37.0.70, though.

I have tried to reproduce the error myself in different Forge versions, but it did not happen to me.

So you should install the latest Forge version and see if that fixes your issue.