From ddbe8ef0fb5e954cd135ff452041d0650f87fb2f Mon Sep 17 00:00:00 2001 From: EnZaXD Date: Sun, 10 Nov 2024 21:44:10 +0100 Subject: [PATCH] Apply page network limit when converting book pages in 1.17->1.17.1 (#4256) --- .../protocols/v1_17to1_17_1/Protocol1_17To1_17_1.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_17to1_17_1/Protocol1_17To1_17_1.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_17to1_17_1/Protocol1_17To1_17_1.java index 6d0d6f128..2c49089b7 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_17to1_17_1/Protocol1_17To1_17_1.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_17to1_17_1/Protocol1_17To1_17_1.java @@ -92,7 +92,9 @@ public final class Protocol1_17To1_17_1 extends AbstractProtocol pagesTag = new ListTag<>(StringTag.class); for (int i = 0; i < pages; i++) { String page = wrapper.read(PAGE_STRING_TYPE); - pagesTag.add(new StringTag(page)); + if (i < 200) { // Apply network limit as per game code + pagesTag.add(new StringTag(page)); + } } // Legacy servers don't like an empty pages list