Enforce network version

This commit is contained in:
Paul Fulham 2020-11-21 18:20:49 -08:00
parent b1aeba61c0
commit e1d1b062f8

View file

@ -93,8 +93,8 @@ public enum AllPackets {
public static void registerPackets() {
channel = NetworkRegistry.ChannelBuilder.named(CHANNEL_NAME)
.serverAcceptedVersions(s -> true)
.clientAcceptedVersions(s -> true)
.serverAcceptedVersions(NETWORK_VERSION::equals)
.clientAcceptedVersions(NETWORK_VERSION::equals)
.networkProtocolVersion(() -> NETWORK_VERSION)
.simpleChannel();
for (AllPackets packet : values())