Add Compact Machines tweak to properly control mob spawn checks #540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checks for natural mob spawns can be rather expensive in the Compact Machines (CM) dimension as there is no place for them to spawn. This can have a noticeable impact on server TPS, scaling further based on the number of players loading chunks in the dimension (example Spark report). CM actually has config settings that are seemingly related,
allowHostileSpawns
andallowPeacefulSpawns
, but they only control forced spawns that occur through the machine's actual tile entity updates.This PR registers the necessary properties for the CM dimension to properly respect its config values to disable both types of mob spawns, potentially improving server performance. I would like to emphasize that this tweak only enhances existing config values in the CM config, so the aforementioned config values also must be disabled for any perceivable change in performance. Disabling both results in the best performance, but that is up to the user to configure.
Also added BedPatch to the obsolete mods, with some comments on the relevant Forge PRs.