Skip to content

Conversation

@samrussell
Copy link

Change #3859 forces all arrows to despawn after 10 seconds to fix MC-125757, but this was marks as works-as-intended. This change allows admins to configure this value (or disable with -1) while keeping the existing behaviour

Change PaperMC#3859 forces all arrows to despawn after 10 seconds to fix
MC-125757, but this was marks as works-as-intended. This change
allows admins to configure this value (or disable with -1) while
keeping the existing behaviour
@Toffikk
Copy link

Toffikk commented Dec 20, 2025

maybe this could use IntOr.Disabled so the config set to disabled (by default) would mean the arrows follow vanilla’s way of despawning and if someone specifies an int, then it follows that. I don’t see why we would keep the 10 seconds by default given it changes vanilla behaviour.

@samrussell
Copy link
Author

Any chance I could get a quick review on this? Doesn't need to be merged urgently, but I would like to know if there's more you need for me to do before it's acceptable

@lynxplay
Copy link
Contributor

lynxplay commented Dec 23, 2025

Logic looks all correct to me, now to the most annoying part about this config option and the reason I hoped we could avoid this.

The name 😓 This isn't an override on the despawn rate, what it does is it removes the immunity of arrows that have not landed in ground yet from despawning after 200 ticks. But after that is gone, the ticking starts.
Conveying that in a single config name is going to be terribly annoying.
Obviously you want this merged fast and I dont want this config option to be around for too long before I get to replace it with the tag support in time-to-live, so I think neither of us really cares too much about the perfect name, sadly I don't really have much of an idea.

I shall throw this at paper-contrib and get some opinions.

@samrussell
Copy link
Author

It'll get merged when it gets merged :) I'm just trying to signal that I'm active and happy to implement any feedback and do any other testing that's required.

@samrussell
Copy link
Author

Doc PR ready, waiting on final name for config item PaperMC/docs#701

@electronicboy
Copy link
Member

I think that the hope was generally to turn this more into a standard entity TTL rather than being specific arrow subtypes, I forget the class inheritance tree but there are other entities in which this type of think would be applicable for (mainly, other projectile types)

@lynxplay
Copy link
Contributor

Yes the hope was to move this to the TTL option but for any remote usability of it for all arrows, we need to figure out how to make that thing support tags. Given none of the team had the time, I am inclined to pull this patch even as a temporary measure.

@samrussell
Copy link
Author

IMO to do this for all entities I'd use a different method as the AbstractArrow.tickDespawn() method is arrow-specific based on the arrow being in the ground, and in any case players can abuse the fact that AbstractArrow.startFalling() resets the life field and use an up-facing piston on a timer to prevent arrows from despawning indefinitely.

I'd be inclined to measure Entity.tickCount if this is to be something we can impose a maximum on for any projectile as this is isn't going to be reset (apart from going between worlds maybe?) unlike the various age and life fields that get used for despawning a range of entities and can also be reset to 0 for various reasons.

@lynxplay
Copy link
Contributor

TTL is already implemented and uses a custom counted added by paper that tracks general entity tick age.
You could already set TTL on arrows to achieve a similar effect as this option (e.g. take normal arrow despawn time + 200).
The problem with the configuration is that administrators cannot nicely apply a TTL to all arrow entity types, the config takes single entity type references.

So once new arrows are added in the future or w/e really, server owners would need to update their config option to prevent people from just spamming the new type.

The original goal was to allow tag resolution in there, e.g.

entities:
  spawning:
    despawnTime:
      "#arrows": 1400

but as said above, that requires a good amount of work to fit in nicely with configurate and I simply do not have the time rn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

4 participants