quilt-standard-libraries
quilt-standard-libraries copied to clipboard
Entity Events module
This PR adds:
- A new library,
entity
(as described in RFC #9) - A new module,
entity_events
- A set of events in that module.
- A test mod for that module.
The events included are:
-
EntityKilledCallback
, with similar purpose to Fabric'sAfterKilledOtherEntity
. -
TryReviveCallback
- theAllowDeathEvent
I wrote for FAPI was merged in a state I was unhappy with. This is closer to how I imagined it. -
EntityWorldChangedEvents
- unchanged from FAPI'sServerEntityWorldChangedEvents
, other than name. -
EntityLoadEvents
, two events for when entities are loaded and unloaded on the server. -
ClientEntityLoadEvents
, ditto but for the client. -
ServerPlayerEntityCopyCallback
, for copying data after player respawn.
There is certainly space for more events.
marking as ready for review just for hacktoberfest, sorry :(
Could you add events for copying player data on respawn and travel from end?
Going to rebase onto 1.18 and force push.
Not sure why checks are failing, they're passing locally
@BasiqueEvangelist added ServerPlayerEntityCopyCallback (name subject to change because that's quite long) - does this fit what you'd need?
@BasiqueEvangelist added ServerPlayerEntityCopyCallback (name subject to change because that's quite long) - does this fit what you'd need?
This seems to fit all common use cases, so yes.
is this API still WIP?
is this API still WIP?
There are a couple more events to be added, but I think I'd be happy to merge these existing ones as-is. (with the caveat that I'd like someone to have a look at the the tryrevive events and see if they can be done with the event phase system, which I'm having trouble wrapping my head around)
rebasing onto 1.19
unrebasing back onto 1.18, i wasn't thinking straight
Should this be rebased onto 1.19?
Should this be rebased onto 1.19?
I might be a bit biased on that, but yeah, considering that Registry Sync is pretty much almost done, with it hopefully getting on the road of a possible FCP, I think we can begin bumping the remaining PRs to 1.19
rebased onto 1.19. not yet tested on 1.19.
not sure why it auto-requested review from worldgen gui and data teams...
This has now been tested on 1.19.
We're almost there! With the Checkstyle clean-ups, I could spot few potential problems
All addressed I think - maybe this'll get merged before its birthday! :P