EngineHub / CraftBook

🔧 Machines, ICs, PLCs, and more!
https://enginehub.org/craftbook/
GNU General Public License v3.0
304 stars 163 forks source link

Try not to enable legacy material compatibility layer #1316

Closed BillyGalbreath closed 1 year ago

BillyGalbreath commented 1 year ago

What this change does

This change tries to match a material without engaging spigot's legacy material compatibility layer. If a match is not found, then it tries with legacy support. Once legacy support has been tried once it is assumed all materials will be legacy so it will continue to use legacy support in order to prevent double checks on every single material. (i hope that makes sense)

Why this change is wanted

When spigot's legacy material compatibility layer engages, it adds all the legacy materials to the material enum which causes all material actions and lookups to be a little bit slower until the server is rebooted. (plus, we all like to see the smiley face on paper's bstats page)

me4502 commented 1 year ago

Thanks for this - has this always been the case? When 1.13 came out I confirmed that CraftBook did not trigger this, but I've noticed since 1.19 my test server has started to log that the legacy material layer has been enabled. Can confirm going back through 1.13 -> 1.18 logs this did not show up

BillyGalbreath commented 1 year ago

has this always been the case?

First time I noticed it was April 2020, so 1.15?