EntityCulling
EntityCulling copied to clipboard
Optimize 1.7.10 TE whitelist
The call to Block.getUnlocalizedName() was generating a new String for every TE every time the CullTask ran, generating significant amounts of garbage at high framerates, changed from a Set<String> to Set<Block> for more efficient comparison.
Quality Gate failed
Failed conditions
C Maintainability Rating on New Code (required ≥ A)
See analysis details on SonarQube Cloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarQube for IDE
PR Summary
-
Ungraded Project Configuration
- Revised project configuration files, with the specific aim of boosting compatibility, efficiency, and updating plugins version used. This has been done through modifications in
gradle.propertiesandgradle-wrapper.propertiesto make sure the project uses the most recent Gradle version and map URLs correctly. The module identity has also been changed and various publishing configurations have been adjusted to suit our needs.
- Revised project configuration files, with the specific aim of boosting compatibility, efficiency, and updating plugins version used. This has been done through modifications in
-
Updated Plugin Version
- Modified
settings.gradleto update our plugin (gtnhsettingsconvention) to its latest version. Updating this plugin could give us access to additional features, better optimizations, and bug fixes.
- Modified
-
Improved Block Entity Management
- Changes in
Config.javaandCullTask.javaresult in better handling of block entities. The block entity whitelist now recognizes more accurate identifiers, and the move from aSet<String>to aSet<Block>forunCullableenhances the system’s capability to handle 'uncullable' block entities.
- Changes in
-
Enhanced Entity Culling Mechanism
- Modifications in
EntityCullingMod.javaandEntityCullingModBase.javalead to better management of the culling process. These updates will help in executing a more efficient culling process upon the game's post-initialization stage, which could potentially improve response time and overall game performance.
- Modifications in
Hm that pr also replaces the gradle script with a later iteration if I gathered it correctly. Will have to check that a bit since the 1.7.10 port wasn't made by me
generating significant amounts of garbage at high framerates
the culling is fully framerate-independent, so it has no impact that way. The one allocated string is not optimal, but shouldn't be a concern.