mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-25 19:45:21 +01:00
Only rewrite pages in written book
This commit is contained in:
parent
0d788b0d7a
commit
87d444a017
@ -142,7 +142,7 @@ public final class BlockItemPacketRewriter1_20_3 extends ItemRewriter<Clientboun
|
|||||||
}
|
}
|
||||||
|
|
||||||
final CompoundTag tag = item.tag();
|
final CompoundTag tag = item.tag();
|
||||||
if (tag != null) {
|
if (tag != null && item.identifier() == 1047) { // Written book
|
||||||
updatePages(tag, "pages");
|
updatePages(tag, "pages");
|
||||||
updatePages(tag, "filtered_pages");
|
updatePages(tag, "filtered_pages");
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ public final class ComponentUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable JsonElement convertJson(@Nullable final String json, final SerializerVersion from, final SerializerVersion to) {
|
public static @Nullable JsonElement convertJson(@Nullable final String json, final SerializerVersion from, final SerializerVersion to) {
|
||||||
return json != null ? convert(from, to, from.jsonSerializer.deserialize(json)) : null;
|
return json != null ? convert(from, to, from.jsonSerializer.deserializeReader(json)) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JsonElement convert(final SerializerVersion from, final SerializerVersion to, final ATextComponent component) {
|
private static JsonElement convert(final SerializerVersion from, final SerializerVersion to, final ATextComponent component) {
|
||||||
|
Loading…
Reference in New Issue
Block a user