test protocol

This commit is contained in:
creeper123123321 2019-02-08 18:47:32 -02:00
parent d2ce6f141b
commit 8d18fa53de
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -39,6 +39,8 @@ import net.fabricmc.fabric.events.ServerEvent;
import net.fabricmc.loader.FabricLoader;
import us.myles.ViaVersion.ViaManager;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.protocol.Protocol;
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
import us.myles.ViaVersion.api.protocol.ProtocolVersion;
@ -55,6 +57,17 @@ public class VRViaVersionInitializer {
Via.getManager().init();
ProtocolRegistry.registerProtocol(new Protocol1_7_6_10to1_7_1_5(), Collections.singletonList(ProtocolVersion.v1_7_6.getId()), ProtocolVersion.v1_7_1.getId());
ProtocolRegistry.registerProtocol(new Protocol1_8TO1_7_6_10(), Collections.singletonList(ProtocolVersion.v1_8.getId()), ProtocolVersion.v1_7_6.getId());
ProtocolRegistry.registerProtocol(new Protocol() {
@Override
protected void registerPackets() {
}
@Override
public void init(UserConnection userConnection) {
}
}, Collections.singletonList(459), 458); // todo remove test
});