mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-22 16:57:40 +01:00
Ignore errors in book conversion
This commit is contained in:
parent
1f3555df4a
commit
8759f059b7
@ -20,6 +20,7 @@ package com.viaversion.viabackwards.protocol.protocol1_20_2to1_20_3.rewriter;
|
|||||||
import com.viaversion.viabackwards.ViaBackwards;
|
import com.viaversion.viabackwards.ViaBackwards;
|
||||||
import com.viaversion.viabackwards.api.rewriters.ItemRewriter;
|
import com.viaversion.viabackwards.api.rewriters.ItemRewriter;
|
||||||
import com.viaversion.viabackwards.protocol.protocol1_20_2to1_20_3.Protocol1_20_2To1_20_3;
|
import com.viaversion.viabackwards.protocol.protocol1_20_2to1_20_3.Protocol1_20_2To1_20_3;
|
||||||
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.ParticleMappings;
|
import com.viaversion.viaversion.api.data.ParticleMappings;
|
||||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||||
@ -188,8 +189,14 @@ public final class BlockItemPacketRewriter1_20_3 extends ItemRewriter<Clientboun
|
|||||||
}
|
}
|
||||||
|
|
||||||
final StringTag stringTag = (StringTag) pageTag;
|
final StringTag stringTag = (StringTag) pageTag;
|
||||||
final JsonElement updatedComponent = ComponentUtil.convertJson(stringTag.getValue(), ComponentUtil.SerializerVersion.V1_20_3, ComponentUtil.SerializerVersion.V1_19_4);
|
try {
|
||||||
stringTag.setValue(updatedComponent.toString());
|
final JsonElement updatedComponent = ComponentUtil.convertJson(stringTag.getValue(), ComponentUtil.SerializerVersion.V1_20_3, ComponentUtil.SerializerVersion.V1_19_4);
|
||||||
|
stringTag.setValue(updatedComponent.toString());
|
||||||
|
} catch (final Exception e) {
|
||||||
|
if (Via.getManager().isDebug()) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user