Skip to content

Conversation

@gabizou
Copy link
Member

@gabizou gabizou commented Jan 19, 2025

This reduces yet another @Overwrite and re-enables cross platform events for Items being tossed. We still will have our game transactions performing in the background, but for the immediate events, we'll be able to have mod compatibility on this front.

Since we can assert the event is the same one being generated, we can
implicitly cast via the compiler. Just like DataProcessors do, we have
some liberty to do this with events.
Using an event bridge, we can better manage when we throw the events
on Sponge as a bridge. This has been verified through internal testing
when using both a Sponge plugin and a mod event listener.
Enchantments can only reference a ServerLevel, so we keep the injection
points in Player, but will override their injection points on
ServerPlayer. This will still enable the event being thrown on the
client, but only add the DamageModifiers on the server (where they
belong).
@gabizou gabizou merged commit 680b7f5 into api-12 Jan 19, 2025
10 checks passed
@gabizou gabizou deleted the feat/unify-item-toss-events-on-modded branch January 19, 2025 06:57
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 this pull request may close these issues.

2 participants