Add ServerEntitySendDirtyEntityDataEvent
This event is added because there is a need to publish reliable entity data synchronization packets over the network by listening to the sendDirtyEntityData method of the ServerEntity.
- [ ] Publish PR to GitHub Packages
Can you fill out the description here with why this event is needed and problem it solves for what use case?
How is this different from an
EntityTickEvent.Postlistener checking for dirty data and sending the custom packet?
With different frequencies, behavior is closer to the vanilla.
Is this for modded entities or for attaching to vanilla entities and entities from other mods?
If it's the former, a callback to a method in IEntityExtension would be cheaper than posting an event. For the latter, yes, an event is the right thing.
Is this for modded entities or for attaching to vanilla entities and entities from other mods?
If it's the former, a callback to a method in IEntityExtension would be cheaper than posting an event. For the latter, yes, an event is the right thing.
for all entities
With different frequencies, behavior is closer to the vanilla.
I'm not totally sure what you mean by this, but the timing difference between the event you are adding and the existing tick event is irrelevant for network sync, the packets are handled completely separately on the client anyway. Can you give a more detailed explanation why you need it to fire specifically from this place instead of a generic entity tick event handler?
I do not believe this event provides any functionality that cannot be accomplished via the EntityTickEvent.