use of com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.ChatPackets1_12 in project ViaBackwards by ViaVersion.
the class Protocol1_11_1To1_12 method registerPackets.
@Override
protected void registerPackets() {
blockItemPackets.register();
entityPackets.register();
new SoundPackets1_12(this).register();
new ChatPackets1_12(this).register();
registerClientbound(ClientboundPackets1_12.TITLE, new PacketRemapper() {
@Override
public void registerMap() {
handler(wrapper -> {
int action = wrapper.passthrough(Type.VAR_INT);
if (action >= 0 && action <= 2) {
JsonElement component = wrapper.read(Type.COMPONENT);
wrapper.write(Type.COMPONENT, Protocol1_9To1_8.fixJson(component.toString()));
}
});
}
});
cancelClientbound(ClientboundPackets1_12.ADVANCEMENTS);
cancelClientbound(ClientboundPackets1_12.UNLOCK_RECIPES);
cancelClientbound(ClientboundPackets1_12.SELECT_ADVANCEMENTS_TAB);
}
Aggregations