I'm in the final stages of migrating my 1.21.1 Fabric mod, Adorable Hamster Pets to an Architectury project and have hit a wall with data generation. When I run the runDatagen task, the game crashes during initialization with an AssertionError.
The crash seems to be caused by my @ExpectPlatform method for registering entity spawn restrictions, although I'm a newbie so if anyone wants to double-check my diagnosis I would hugely appreciate it.
I've followed the standard @ExpectPlatform pattern, with an implementation for Fabric and one for NeoForge. The crash happens when the common code calls the @ExpectPlatform method.
I've double-checked my build.gradle files and the file paths for the implementation classes, but I can't spot the issue.
Here is the Full Repo
The relevant files are:
common/.../world/ModSpawnPlacements.java(the@ExpectPlatformdeclaration)fabric/.../world/fabric/ModSpawnPlacementsImpl.java(the Fabric implementation)common/.../AdorableHamsterPets.java(where the method is called)
Any insight into why the AssertionError is being thrown would be greatly appreciated. Thank you!