Search in sources :

Example 1 with SoundPackets1_12

use of com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.SoundPackets1_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);
}
Also used : Entity1_12Types(com.viaversion.viaversion.api.minecraft.entities.Entity1_12Types) ServerboundPackets1_9_3(com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ServerboundPackets1_9_3) ServerboundPackets1_12(com.viaversion.viaversion.protocols.protocol1_12to1_11_1.ServerboundPackets1_12) JsonElement(com.viaversion.viaversion.libs.gson.JsonElement) ClientboundPackets1_12(com.viaversion.viaversion.protocols.protocol1_12to1_11_1.ClientboundPackets1_12) ClientWorld(com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld) EntityPackets1_12(com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.EntityPackets1_12) BackwardsProtocol(com.viaversion.viabackwards.api.BackwardsProtocol) ChatPackets1_12(com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.ChatPackets1_12) BlockItemPackets1_12(com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.BlockItemPackets1_12) PacketRemapper(com.viaversion.viaversion.api.protocol.remapper.PacketRemapper) Type(com.viaversion.viaversion.api.type.Type) Protocol1_9To1_8(com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8) BackwardsMappings(com.viaversion.viabackwards.api.data.BackwardsMappings) SoundPackets1_12(com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.SoundPackets1_12) EntityTrackerBase(com.viaversion.viaversion.data.entity.EntityTrackerBase) UserConnection(com.viaversion.viaversion.api.connection.UserConnection) ClientboundPackets1_9_3(com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3) ShoulderTracker(com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.data.ShoulderTracker) JsonElement(com.viaversion.viaversion.libs.gson.JsonElement) PacketRemapper(com.viaversion.viaversion.api.protocol.remapper.PacketRemapper) SoundPackets1_12(com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.SoundPackets1_12) ChatPackets1_12(com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.ChatPackets1_12)

Aggregations

BackwardsProtocol (com.viaversion.viabackwards.api.BackwardsProtocol)1 BackwardsMappings (com.viaversion.viabackwards.api.data.BackwardsMappings)1 ShoulderTracker (com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.data.ShoulderTracker)1 BlockItemPackets1_12 (com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.BlockItemPackets1_12)1 ChatPackets1_12 (com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.ChatPackets1_12)1 EntityPackets1_12 (com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.EntityPackets1_12)1 SoundPackets1_12 (com.viaversion.viabackwards.protocol.protocol1_11_1to1_12.packets.SoundPackets1_12)1 UserConnection (com.viaversion.viaversion.api.connection.UserConnection)1 Entity1_12Types (com.viaversion.viaversion.api.minecraft.entities.Entity1_12Types)1 PacketRemapper (com.viaversion.viaversion.api.protocol.remapper.PacketRemapper)1 Type (com.viaversion.viaversion.api.type.Type)1 EntityTrackerBase (com.viaversion.viaversion.data.entity.EntityTrackerBase)1 JsonElement (com.viaversion.viaversion.libs.gson.JsonElement)1 ClientboundPackets1_12 (com.viaversion.viaversion.protocols.protocol1_12to1_11_1.ClientboundPackets1_12)1 ServerboundPackets1_12 (com.viaversion.viaversion.protocols.protocol1_12to1_11_1.ServerboundPackets1_12)1 ClientboundPackets1_9_3 (com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3)1 ServerboundPackets1_9_3 (com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ServerboundPackets1_9_3)1 ClientWorld (com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld)1 Protocol1_9To1_8 (com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8)1