Skip to content

[1.21.1-Neoforge] EventBusSubscriber Annotation doesn't work on Java class #110

Description

@alegian

I want to integrate KFF into a large codebase incrementally. I was happy to see that the @Mod annotation works for my main Java mod class, even when using KFF loader.

I expected the @EventBusSubscriber annotation to do the same on my events class (uses static methods), but it doesn't. It doesn't even complain, Neo just crashes because of unregistered stuff. Switching my event class to Kotlin object immediately solved it.

I don't know how KFF works, so I dont know if this is feasible, but it should definitely be documented somewhere. I spent hours debugging it, since there is no visible KFF error. The skeleton projects have no dedicated event file example.

To be clear, the issue is: Following the steps in README for an existing mod, the resulting setup may sometimes crash, due to events not being loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    5.xAffects KFF 5.x

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions