Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
This variant of tag loading should be slightly more efficient
Dieser Commit ist enthalten in:
Ursprung
956a84a3fb
Commit
a42c979abb
@ -85,8 +85,8 @@ public final class TagCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private <T extends Ordered> void loadTags(String type, @Nullable Map<String, int[]> packetTags, Map<String, T> allTags, int[][] localValues) {
|
private <T extends Ordered> void loadTags(String type, @Nullable Map<String, int[]> packetTags, Map<String, T> allTags, int[][] localValues) {
|
||||||
Arrays.fill(localValues, IntArrays.EMPTY_ARRAY);
|
|
||||||
if (packetTags == null) {
|
if (packetTags == null) {
|
||||||
|
Arrays.fill(localValues, IntArrays.EMPTY_ARRAY);
|
||||||
GeyserImpl.getInstance().getLogger().debug("Not loading " + type + " tags; they do not exist here.");
|
GeyserImpl.getInstance().getLogger().debug("Not loading " + type + " tags; they do not exist here.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -95,8 +95,11 @@ public final class TagCache {
|
|||||||
if (values != null) {
|
if (values != null) {
|
||||||
if (values.length != 0) {
|
if (values.length != 0) {
|
||||||
localValues[tag.ordinal()] = values;
|
localValues[tag.ordinal()] = values;
|
||||||
|
} else {
|
||||||
|
localValues[tag.ordinal()] = IntArrays.EMPTY_ARRAY;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
localValues[tag.ordinal()] = IntArrays.EMPTY_ARRAY;
|
||||||
GeyserImpl.getInstance().getLogger().debug(type + " tag not found from server: " + location);
|
GeyserImpl.getInstance().getLogger().debug(type + " tag not found from server: " + location);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren