
[1.8+] Fused Quartz Glass implementation is very RAM/loading time unfriendly
asiekierka opened this issue ยท 4 comments
Issue Description:
The Fused Quartz glass model implementation relies on a massive amount of block states and baked models (last I checked, 14000 in total, or over four vanillas), causing both slowdowns during preInit (having to initialize all the state lookup tables) and init/postInit (very slow model loading).
What happens:
Everyone gets more RAM usage and loading time out of it.
What you expected to happen:
A dynamic, cache-based model generator (similar to ones employed in Charset and Forestry), which, based on a set of IRetexturableModels loaded from JSONs, automatically apply the correct textures to a given model (potentially based on a custom JSON definition, like Charset gates used to) and store it in a cache (for instance, Guava's cache), seeing as a given world is unlikely to render even 25% of a given glass type's variants over its lifetime.
CharsetGates source code is a good example of what I mean, in my opinion.
Steps to reproduce:
- Open up Minecraft with Ender IO.
- Count the amount of models carefully.
- Cry.
Affected Versions (Do not use "latest"):
- EnderIO: Any version since the introduction of 1.8+-adapted fused quartz glass
- EnderCore: Hey, I didn't use "latest"!
- Minecraft: Tested on 1.10.2
- Forge: 12.18.3.2185, but also appeared on earlier ones
Your most recent log file where the issue was present:
I'm so sorry, I don't have one! Please don't be angry.
This is caused by vanilla insisting on having different models for different meta values. The rendering actually only uses 23 models for each block that has connecting models.
I'd honestly be happy with a config to disable the fancy models entirely and just have a vanilla-like glass texture.
Not really possible, the blockstates are json resources now, not code.
However, I think I got something that may trick the game into reusing blockstates. Someone may want to check in the next build if it really does, or if the game multiplies them up in memory again.