Skip to content

EventCharacteristic interface should be moved to internal #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jonathing opened this issue Apr 23, 2025 · 1 comment · Fixed by #81
Closed

EventCharacteristic interface should be moved to internal #75

Jonathing opened this issue Apr 23, 2025 · 1 comment · Fixed by #81
Assignees

Comments

@Jonathing
Copy link
Member

Currently, net.minecraftforge.eventbus.api.event.characteristic.EventCharacteristic is a sealed interface and only supports 4 types. These types are intentionally hard coded in the internals as they are used to determine how to handle the event bus when it is created with the relevant type. In a sense, it serves the same purpose as the Event interface, which itself is already in the net.minecraftforge.eventbus.internal package. Keeping the event characteristic base interface in the public API is confusing and could lead to unwanted assumptions about how characteristics are dealt with.

We're still in beta for EventBus 7, so I simply suggest that this interface be moved into the internal package so consumers cannot interact with it.

@PaintNinja
Copy link
Contributor

Good catch, I made it publicly accessible for visibility of the JavaDoc on it, but it can be moved to internal and the JavaDoc instead on the package-info, with references to it from each of the characteristics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants