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

Implement various vanilla performance tweaks, adapted from RLTweaker #434

Merged
merged 9 commits into from
Apr 12, 2024

Conversation

jchung01
Copy link
Contributor

@jchung01 jchung01 commented Apr 11, 2024

Based on various tweaks from RLTweaker with the same names:

  • [1] Pathfinding Chunk Cache: prevents mobs from loading new/unloaded chunks when pathfinding
  • [2a] Reduced Search Size: reduces search sizes for specified entities in AABB functions
    • With the default config, this helps with dropped item performance and various AI checks for the player
  • [2b] Less Collisions: reduces sizes of collision checks for most vanilla entities and specified entities

The config allows for adding new targets to either tweak labeled [2].
The tweaks labeled [2] only help with performance if you have a mod that changes World.MAX_ENTITY_RADIUS, which includes, but is not limited to, Lycanites Mobs, Advanced Rocketry, and Immersive Railroading.

RLTweaker(2) and AIReducer should still be compatible, as their modifications should be taking priority.

Also refactors class load checks to its own util class UTReflectionUtil.

Copy link

what-the-diff bot commented Apr 11, 2024

PR Summary

  • Introduction of 'Entity Radius Check' Tweak
    We've introduced a new setting called "Entity Radius Check" which helps speed up the system by reducing the area of certain operations. These are predominantly search and collision checks for various in-game entities.

  • OptiFine Config Compatibility Improvement
    The system now better supports OptiFine configurations; a popular tool for enhancing game visuals, allowing more seamless interaction with diverse setups.

  • Auto Save Interval Compatibility with OptiFine
    Our code now works well with the auto-save function presented by OptiFine, making sure our operations don't interfere with the schedule set by the user in OptiFine.

  • Reduction in Collision Checks
    We've added a tweak to lessen the collision checks for in-game entities, further enhancing performance.

  • Addition of New Entity-Related Utility Files
    We've added new utility files (UTEntityAABBUtil.java and UTReflectionUtil.java). These are meant to help with better calculations for entities and efficient validation of classes respectively.

  • Adjustments to 'UTObsoleteModsHandler.java'
    Changes have been made to the UTObsoleteModsHandler.java file to improve how the system handles outdated mods, primarily by substituting manual checks with utility method calls.

  • Inclusion of 'Entity Radius Check' in Configuration Settings
    A segment for 'Entity Radius Check' has been added to the configuration settings UI, making it easier for users to find and adjust this feature.

  • New Mixin Configuration Files
    Several new configuration files have been produced for our Mixins; a tool that allows us to modify the behavior of existing code blocks without altering their source code.

- Update README, lang
- Remove line used for testing
- Correct cfg and README comment
@ACGaming ACGaming merged commit 5d8e04c into ACGaming:main Apr 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants