From 70b0fa1bd42c28c3d7db886a92e613709dc9e1e2 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Tue, 14 Mar 2023 07:48:11 -0400 Subject: [PATCH] Prepare for release protocol --- .../github/steveice10/mc/protocol/codec/MinecraftCodec.java | 4 ++-- .../scoreboard/ClientboundSetPlayerTeamPacket.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodec.java b/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodec.java index 00d2d279..cbe25e13 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodec.java +++ b/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodec.java @@ -199,9 +199,9 @@ public class MinecraftCodec { } public static final PacketCodec CODEC = PacketCodec.builder() - .protocolVersion((1 << 30) | 120) + .protocolVersion(762) .helper(() -> new MinecraftCodecHelper(LEVEL_EVENTS, SOUND_NAMES)) - .minecraftVersion("1.19.4 Pre-release 1") + .minecraftVersion("1.19.4") .state(ProtocolState.HANDSHAKE, PacketStateCodec.builder() .registerServerboundPacket(0x00, ClientIntentionPacket.class, ClientIntentionPacket::new) ) diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetPlayerTeamPacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetPlayerTeamPacket.java index d36b29a9..edd4b73e 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetPlayerTeamPacket.java +++ b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetPlayerTeamPacket.java @@ -2,7 +2,6 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.scoreboard; import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper; import com.github.steveice10.mc.protocol.codec.MinecraftPacket; -import com.github.steveice10.mc.protocol.data.DefaultComponentSerializer; import com.github.steveice10.mc.protocol.data.game.scoreboard.CollisionRule; import com.github.steveice10.mc.protocol.data.game.scoreboard.NameTagVisibility; import com.github.steveice10.mc.protocol.data.game.scoreboard.TeamAction; @@ -11,6 +10,7 @@ import io.netty.buffer.ByteBuf; import lombok.*; import net.kyori.adventure.text.Component; +import javax.annotation.Nullable; import java.io.IOException; import java.util.Arrays; @@ -26,8 +26,8 @@ public class ClientboundSetPlayerTeamPacket implements MinecraftPacket { private final Component suffix; private final boolean friendlyFire; private final boolean seeFriendlyInvisibles; - private final NameTagVisibility nameTagVisibility; - private final CollisionRule collisionRule; + private final @Nullable NameTagVisibility nameTagVisibility; + private final @Nullable CollisionRule collisionRule; private final TeamColor color; private final String[] players;