The ARMOR_TEXTURE_CACHE only caches the creation of the Identifier object, which only takes a few nanoseconds and is less computationally expensive than the HashMap hashing function.
Moreover, the ARMOR_TEXTURE_CACHE persistently holds multiple Identifier and String objects, resulting in a maximum memory usage of 1264 bytes in vanilla, possibly more with mods involved.
The changes present in this pull request are also applicable to the forge versions.
Changes:
ARMOR_TEXTURE_CACHE
The
ARMOR_TEXTURE_CACHE
only caches the creation of theIdentifier
object, which only takes a few nanoseconds and is less computationally expensive than theHashMap
hashing function.Moreover, the
ARMOR_TEXTURE_CACHE
persistently holds multipleIdentifier
andString
objects, resulting in a maximum memory usage of1264
bytes in vanilla, possibly more with mods involved.The changes present in this pull request are also applicable to the forge versions.