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

Use maxCommandForkCount gamerule for limiting execute #367

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

Conversation

amyavi
Copy link
Contributor

@amyavi amyavi commented Dec 18, 2024

This PR replaces the execute as/at limiter with the maxCommandForkCount gamerule (introduced in 1.20.3), which does the same thing the execute limiter intended to do.
The limit for the gamerule is the same as the config's maxEntitiesPerWorld, which is the
theoretical limit for the old limiter (/execute as @e ...).

Since the maxCommandForkCount gamerule also applies to nested execute commands, I removed the block for execute-in-execute aswell.
The code for the gamerule limiter was getting a bit messy, so I refactored that. The gamerule limits are now applied to all of the worlds on startup, because Minecraft's default for maxCommandForkCount is 65535, which is way above ours.

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

Successfully merging this pull request may close these issues.

1 participant