ejektaflex / NaturalPledge

The successor to Botanical Addons.
1 stars 1 forks source link

crash with better with mods #6

Closed 0Navis0 closed 8 months ago

0Navis0 commented 5 years ago

I get this crash at the game loading with Better With Mods https://paste.dimdev.org/eyogukuzag.mccrash

primetoxinz commented 5 years ago

BWM dev here. This is something we've dealt with in the past. We are sending null to a parameter of isBeacon because it does not specify its nullity and the vanilla implementation doesn't use it. Kotlin then assumes it should be nonnull, thus causing a crash. I'm not sure what the best solution for this is, I don't believe my usage context has the information to send those parameters correctly (can't look right now)

ejektaflex commented 5 years ago

@primetoxinz I can change the said parameter to be nullable and do a Kotlin null safety check, that should be the fix for it. I'll update you if I need anything else.

The problem is that when creating a Kotlin override for a Java method, Mojang never specified said parameters as nonnull so as Kotlin developers we don't know whether to make the parameter nullable (In most cases we should assume it can be null but the code author figured incorrectly that the world param would always exist).

matyklug18 commented 4 years ago

i got the same crash.