Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Don't cache non-locale assets in the LocaleUtils asset cache
Previously Geyser was storing a reference of every single asset hash provided by the server, including things like sound files. We never used this files, and their existence caused the amount of Asset classes present in Geyser to be over 3000. With this change, we only cache the 118 language files.
Dieser Commit ist enthalten in:
Ursprung
e73b7f5941
Commit
46cd26ffae
@ -98,6 +98,11 @@ public class LocaleUtils {
|
||||
Iterator<Map.Entry<String, JsonNode>> assetIterator = assets.fields();
|
||||
while (assetIterator.hasNext()) {
|
||||
Map.Entry<String, JsonNode> entry = assetIterator.next();
|
||||
if (!entry.getKey().startsWith("minecraft/lang/")) {
|
||||
// No need to cache non-language assets as we don't use them
|
||||
continue;
|
||||
}
|
||||
|
||||
Asset asset = GeyserConnector.JSON_MAPPER.treeToValue(entry.getValue(), Asset.class);
|
||||
ASSET_MAP.put(entry.getKey(), asset);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren