FabricMC / fabric-example-mod

Example Fabric mod
Creative Commons Zero v1.0 Universal
1.67k stars 945 forks source link

Exception " java.lang.IllegalStateException: Some intrusive holders were not added to registry: [Reference{null=air}]" happens when running game on 1.18.2 #170

Closed adex720 closed 2 years ago

adex720 commented 2 years ago

The game crashes whenever I try to run it. The error is quite big so I made a pastebin for it: https://pastebin.com/ghWfKncV.

I've tried running it few times but it always gives this exception. Please tell if I need to send more information (:

OroArmor commented 2 years ago

If you create a block, you must add it to the registry.

adex720 commented 2 years ago

That code worked just fine before I updated it to 1.18.2

OroArmor commented 2 years ago

Yes, registries changed in 1.18.2.

Malvisk commented 2 years ago

I'm getting this message now, but from your exchange I'm unable to figure out how you resolved the issue.

MSnjStudios commented 2 years ago

I don't know how to solve it. to code?

apple502j commented 2 years ago

Register all objects, and do not instantiate anything unused.