Community listing page, reviews here may not be monitored by the author.
AgeingCheckCache
No reviews yet
Cache the iteration results of Ageing Spawner codes for better performance
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
AgeingCheckCache
This is an addon of Ageing Spawner that optimizes its code by cache.
How Does It Work
I've noticed a point about List#contains (checking if a list contains a specific element). Many mod authors open up blacklists or whitelists in config files to achieve higher configurability. However, if the list contains too many elements (whether they are default configurations or user-added ones), iterating through List#contains calls can become quite expensive, affecting the game's performance in specific situations (For example, Embeddium Extras significantly improved FPS after addressing this performance issue). The solution I've come up with is to transform it into checking the properties of the List#contains target, perform the check only once, and directly call the cached boolean value obtained from this initial check. This avoids repeatedly traversing the array. The initial check's location and method might vary depending on the properties of the check target. For example, if the check target is EntityType, you could create an ExtendedEntityType interface, implement it using a mixin with EntityType, and include a boolean value for "is included in the configuration file" within the mixin. Then, in certain places (such as FMLCommonSetupEvent), you can directly use the configuration file's array to check all EntityType instances using ForgeRegistries and mark whether they are included in the array. In practical applications, instead of using List#contains, you can use ((ExtendedEntityType)entityType).isInConfig() (check speed goes brrrrrrrrrr).
Why Don't You Send A Pull Request To Ageing Spawner?
1.I have created an issue for this (See here) but the author just did the basic caching in 1.20 version, while this mod is for 1.16.5
2.I'm lazy.
Btw you can do this by yourself as this mod is in public domain.
Will Ageing Spawner's Behavior Change After Using This Mod?
Yes.
Initially, Ageing Spawner will track all vanilla & modded spawners (like the Land Spawner in BrassAmber BattleTowers (In short, babt)). This mod has an additional patch that defaultly blacklists the modded spawners.
This improves compatibility with babt so your tower's advancement will not be completely blocked due to the spawners disappear :)
If you want a modded spawner block to be affected by Ageing Spawner, you can write the block's registry name down in config/ageingcheckcache-common.toml
Server Side Or Client Side?
Both.
Logo Credit
Thanks to reereeq!
Misc
Join Our discord: https://discord.gg/g8q3UHTpCP!

AgeingCheckCache
This is an addon of Ageing Spawner that optimizes its code by cache.
How Does It Work
I've noticed a point about List#contains (checking if a list contains a specific element).
Many mod authors open up blacklists or whitelists in config files to achieve higher configurability.
However, if the list contains too many elements (whether they are default configurations or user-added ones), iterating through List#contains calls can become quite expensive, affecting the game's performance in specific situations
(Embeddium Extras significantly improved FPS after addressing this performance issue). The solution I've come up with is to transform it into checking the properties of the List#contains target, perform the check only once, and directly call the cached boolean value obtained from this initial check.
This avoids repeatedly traversing the array.
The initial check's location and method might vary depending on the properties of the check target.
For example, if the check target is EntityType, you could create an ExtendedEntityType interface, implement it using a mixin with EntityType, and include a boolean value for "is included in the configuration file" within the mixin.
Then, in certain places (such as FMLCommonSetupEvent), you can directly use the configuration file's array to check all EntityType instances using ForgeRegistries and mark whether they are included in the array.
In practical applications, instead of using List#contains, you can use ((ExtendedEntityType)entityType).isInConfig() (check speed goes brrrrrrrrrr).
Why Don't You Send A Pull Request To Ageing Spawner?
1.I have created an issue for this (See here) but the author just did the basic caching in 1.20 version, while this mod is for 1.16.5
2.I'm lazy.
Btw you can do this by yourself as this mod is in public domain.
Will Ageing Spawner's Behavior Change After Using This Mod?
Yes.
Initially, Ageing Spawner will track all vanilla & modded spawners (like the Land Spawner in BrassAmber BattleTowers (In short, babt)). This mod has an additional patch that defaultly blacklists the modded spawners.
This improves compatibility with babt so your tower's advancement will not be completely blocked due to the spawners disappear :)
If you want a modded spawner block to be affected by Ageing Spawner, you can write the block's registry name down in config/ageingcheckcache-common.toml
Logo Credit
Thanks to reereeq!
Misc
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
