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

1.18 - Crash on preview #82

Closed Arkaeic closed 5 months ago

Arkaeic commented 5 months ago

I'm aware that another issue has a nigh identical title but my crash log looks quite different, so I believe this is either a different crash or the syntax has changed.

Here is the crash report: https://pastebin.com/mYRaXJJ2

It might be something on my end, because this appeared out of nowhere and didn't coincide with any forge/construction wand updates. I've also had an issue with Direwolf20's "Building Gadgets" mod recently too, and although that particular crash did not occur when loading a preview, it may be related given that it also generates a block preview before placement much like your mod does.

Unfortunately I'm not sure how you'd go about reproducing this... I can provide further information if necessary.

I thought I'd try posting here though because I can't figure out what to do, and would rather not play without this mod. Also because of the fact that LazyOptional is called when parsed with either nothing or a none-type, I'm not sure how that could be the result of anything other than a logic error, though I'm woefully uninformed on the matter so am fully aware that I'm probably wrong ^^

Arkaeic commented 5 months ago

OK so I figured it out. The preview works when I remove a dank null (from the mod "Dank Storage") which stores blocks and can be dispensed from. So turns out it was essentially the same issue as the other one. Weird though, because it was working when I was using a much bigger dank null, but when I made a second smaller one, that's the one that broke it (even when I put the bigger one away).

Anyway. Sorry for the duplicate issue. Crash log made me think it was something else :) Have a nice day, and thanks for your mod <3

EDIT: I figured out the exact cause of this issue. Apparently, newly crafted dank storages are given an ID of -1 until they're opened. I think this indicates that, while the storage exists within your inventory, it's not actually given a virtual storage, so when your mod tries to search it for blocks, it actually parses a none type to LazyOptional. I'm going to raise this issue on the mod's page. https://github.com/Tfarcenim/Dank-Storage/issues/230