Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Don't run entity collision code if isCollidable() is false

Open Bahm opened this issue 3 years ago • 1 comments

Is your feature request related to a problem?

The biggest hindrance to building large mob farms is currently the getEntities call in LivingEntity::pushEntities.

I'm currently using the FarmControl plugin to disable entity collisions through setCollidable(false), but pushEntities is called even when isCollidable() is false.

A week ago, you added a patch that returns early if entity cramming and entity collisions are completely disabled. That, however, is not a viable solution for my server and I think the same is true for many others.

Describe the solution you'd like.

Same as the last patch, but returning early if this.isCollidable() is false.

If that breaks anything, a config option to toggle it on/off would work just as well for me.

Describe alternatives you've considered.

I considered overwriting all animals with custom entities that return early in pushEntities, but that's very hacky, inflexible and, I imagine, prone to breaking.

Other

No response

Bahm avatar Jan 30 '22 14:01 Bahm

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 01 '22 04:04 stale[bot]