3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Apply page network limit when converting book pages in 1.17->1.17.1 (#4256)

Dieser Commit ist enthalten in:
EnZaXD 2024-11-10 21:44:10 +01:00 committet von GitHub
Ursprung 8e4da81022
Commit ddbe8ef0fb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -92,8 +92,10 @@ public final class Protocol1_17To1_17_1 extends AbstractProtocol<ClientboundPack
ListTag<StringTag> pagesTag = new ListTag<>(StringTag.class); ListTag<StringTag> pagesTag = new ListTag<>(StringTag.class);
for (int i = 0; i < pages; i++) { for (int i = 0; i < pages; i++) {
String page = wrapper.read(PAGE_STRING_TYPE); String page = wrapper.read(PAGE_STRING_TYPE);
if (i < 200) { // Apply network limit as per game code
pagesTag.add(new StringTag(page)); pagesTag.add(new StringTag(page));
} }
}
// Legacy servers don't like an empty pages list // Legacy servers don't like an empty pages list
if (pagesTag.isEmpty()) { if (pagesTag.isEmpty()) {