EngineHub / WorldEdit

🗺️ Minecraft map editor and mod
https://enginehub.org/worldedit/
Other
3.05k stars 826 forks source link

Lazily compute BlockState#getAsString #2566

Closed me4502 closed 2 days ago

me4502 commented 5 days ago

This PR adds lazy computation of the BlockState#getAsString (and therefore toString) method, allowing this to be computed once rather than calculated every time it's called.

This also partially benefits BaseBlock#toString, as it delegates to this method for the BlockState portion of the string, with NBT data appended to the end.