Skip to content
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

Add server tick events for BlockEntity, Chunk, and Entity #4113

Open
wants to merge 1 commit into
base: 1.21.1
Choose a base branch
from

Conversation

forgetmenot13579
Copy link
Contributor

Also adds tests for the new (and existing) chunk events.

@modmuss50
Copy link
Member

Is this something we really want? In the past we have said no as they are a very common cause of peformance issues.

@forgetmenot13579
Copy link
Contributor Author

The people who need this functionality are going to mixin anyway. By adding these events, we will have load, tick, and unload events for all four AttachmentTarget types and can look at implementing some kind of component system on top as previously discussed in the Discord server.

@modmuss50
Copy link
Member

A mixin is likely a better solution here, as it allows you to inject into the specific entity at the specific time that suits a modders need. One idea I had for these kinds of events would be registering them to the target when its loaded however this has its own issues.

On a large servers there are going to vast numbers of BE's, chunks and entities loaded at once, its going to be way too easy for someone to bring the server to a crawl.

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