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

Configurable Entity Despawn Time #11454

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Machine-Maker
Copy link
Member

@Machine-Maker Machine-Maker commented Sep 30, 2024

Despawn time limit configurable by each entity type. Overrides any other configurations for despawning, such as the arrow or item despawn rate configurations which give more granularity.

@Machine-Maker Machine-Maker requested a review from a team as a code owner September 30, 2024 16:59
public void tick() {
+ // Paper start - entity despawn time limit
+ if (this.despawnTime >= 0 && this.tickCount >= this.despawnTime) {
+ this.discard();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a despawn reason, I'd argue for org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN but it may be worth introducing a new cause for this instead too.

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

Successfully merging this pull request may close these issues.

2 participants