Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-25 15:50:19 +01:00
1.19.4 (rc1) (#967)
Dieser Commit ist enthalten in:
Ursprung
5d03023679
Commit
43f6dd653b
@ -32,6 +32,7 @@ import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_18_2;
|
|||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19_1;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19_1;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19_3;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19_3;
|
||||||
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19_4;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_7_2;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_7_2;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9;
|
||||||
@ -135,7 +136,8 @@ public enum StateRegistry {
|
|||||||
map(0x06, MINECRAFT_1_14, false),
|
map(0x06, MINECRAFT_1_14, false),
|
||||||
map(0x08, MINECRAFT_1_19, false),
|
map(0x08, MINECRAFT_1_19, false),
|
||||||
map(0x09, MINECRAFT_1_19_1, false),
|
map(0x09, MINECRAFT_1_19_1, false),
|
||||||
map(0x08, MINECRAFT_1_19_3, false));
|
map(0x08, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x09, MINECRAFT_1_19_4, false));
|
||||||
serverbound.register(LegacyChat.class, LegacyChat::new,
|
serverbound.register(LegacyChat.class, LegacyChat::new,
|
||||||
map(0x01, MINECRAFT_1_7_2, false),
|
map(0x01, MINECRAFT_1_7_2, false),
|
||||||
map(0x02, MINECRAFT_1_9, false),
|
map(0x02, MINECRAFT_1_9, false),
|
||||||
@ -160,7 +162,8 @@ public enum StateRegistry {
|
|||||||
map(0x05, MINECRAFT_1_14, false),
|
map(0x05, MINECRAFT_1_14, false),
|
||||||
map(0x07, MINECRAFT_1_19, false),
|
map(0x07, MINECRAFT_1_19, false),
|
||||||
map(0x08, MINECRAFT_1_19_1, false),
|
map(0x08, MINECRAFT_1_19_1, false),
|
||||||
map(0x07, MINECRAFT_1_19_3, false));
|
map(0x07, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x08, MINECRAFT_1_19_4, false));
|
||||||
serverbound.register(PluginMessage.class, PluginMessage::new,
|
serverbound.register(PluginMessage.class, PluginMessage::new,
|
||||||
map(0x17, MINECRAFT_1_7_2, false),
|
map(0x17, MINECRAFT_1_7_2, false),
|
||||||
map(0x09, MINECRAFT_1_9, false),
|
map(0x09, MINECRAFT_1_9, false),
|
||||||
@ -171,7 +174,8 @@ public enum StateRegistry {
|
|||||||
map(0x0A, MINECRAFT_1_17, false),
|
map(0x0A, MINECRAFT_1_17, false),
|
||||||
map(0x0C, MINECRAFT_1_19, false),
|
map(0x0C, MINECRAFT_1_19, false),
|
||||||
map(0x0D, MINECRAFT_1_19_1, false),
|
map(0x0D, MINECRAFT_1_19_1, false),
|
||||||
map(0x0C, MINECRAFT_1_19_3, false));
|
map(0x0C, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x0D, MINECRAFT_1_19_4, false));
|
||||||
serverbound.register(KeepAlive.class, KeepAlive::new,
|
serverbound.register(KeepAlive.class, KeepAlive::new,
|
||||||
map(0x00, MINECRAFT_1_7_2, false),
|
map(0x00, MINECRAFT_1_7_2, false),
|
||||||
map(0x0B, MINECRAFT_1_9, false),
|
map(0x0B, MINECRAFT_1_9, false),
|
||||||
@ -183,7 +187,8 @@ public enum StateRegistry {
|
|||||||
map(0x0F, MINECRAFT_1_17, false),
|
map(0x0F, MINECRAFT_1_17, false),
|
||||||
map(0x11, MINECRAFT_1_19, false),
|
map(0x11, MINECRAFT_1_19, false),
|
||||||
map(0x12, MINECRAFT_1_19_1, false),
|
map(0x12, MINECRAFT_1_19_1, false),
|
||||||
map(0x11, MINECRAFT_1_19_3, false));
|
map(0x11, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x12, MINECRAFT_1_19_4, false));
|
||||||
serverbound.register(ResourcePackResponse.class, ResourcePackResponse::new,
|
serverbound.register(ResourcePackResponse.class, ResourcePackResponse::new,
|
||||||
map(0x19, MINECRAFT_1_8, false),
|
map(0x19, MINECRAFT_1_8, false),
|
||||||
map(0x16, MINECRAFT_1_9, false),
|
map(0x16, MINECRAFT_1_9, false),
|
||||||
@ -200,7 +205,8 @@ public enum StateRegistry {
|
|||||||
map(0x0D, MINECRAFT_1_15, false),
|
map(0x0D, MINECRAFT_1_15, false),
|
||||||
map(0x0C, MINECRAFT_1_16, false),
|
map(0x0C, MINECRAFT_1_16, false),
|
||||||
map(0x0D, MINECRAFT_1_17, false),
|
map(0x0D, MINECRAFT_1_17, false),
|
||||||
map(0x0A, MINECRAFT_1_19, false));
|
map(0x0A, MINECRAFT_1_19, false),
|
||||||
|
map(0x0B, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(LegacyChat.class, LegacyChat::new,
|
clientbound.register(LegacyChat.class, LegacyChat::new,
|
||||||
map(0x02, MINECRAFT_1_7_2, true),
|
map(0x02, MINECRAFT_1_7_2, true),
|
||||||
map(0x0F, MINECRAFT_1_9, true),
|
map(0x0F, MINECRAFT_1_9, true),
|
||||||
@ -217,7 +223,8 @@ public enum StateRegistry {
|
|||||||
map(0x0F, MINECRAFT_1_16_2, false),
|
map(0x0F, MINECRAFT_1_16_2, false),
|
||||||
map(0x11, MINECRAFT_1_17, false),
|
map(0x11, MINECRAFT_1_17, false),
|
||||||
map(0x0E, MINECRAFT_1_19, false),
|
map(0x0E, MINECRAFT_1_19, false),
|
||||||
map(0x0D, MINECRAFT_1_19_3, false));
|
map(0x0D, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x0F, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(AvailableCommands.class, AvailableCommands::new,
|
clientbound.register(AvailableCommands.class, AvailableCommands::new,
|
||||||
map(0x11, MINECRAFT_1_13, false),
|
map(0x11, MINECRAFT_1_13, false),
|
||||||
map(0x12, MINECRAFT_1_15, false),
|
map(0x12, MINECRAFT_1_15, false),
|
||||||
@ -225,7 +232,8 @@ public enum StateRegistry {
|
|||||||
map(0x10, MINECRAFT_1_16_2, false),
|
map(0x10, MINECRAFT_1_16_2, false),
|
||||||
map(0x12, MINECRAFT_1_17, false),
|
map(0x12, MINECRAFT_1_17, false),
|
||||||
map(0x0F, MINECRAFT_1_19, false),
|
map(0x0F, MINECRAFT_1_19, false),
|
||||||
map(0x0E, MINECRAFT_1_19_3, false));
|
map(0x0E, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x10, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(PluginMessage.class, PluginMessage::new,
|
clientbound.register(PluginMessage.class, PluginMessage::new,
|
||||||
map(0x3F, MINECRAFT_1_7_2, false),
|
map(0x3F, MINECRAFT_1_7_2, false),
|
||||||
map(0x18, MINECRAFT_1_9, false),
|
map(0x18, MINECRAFT_1_9, false),
|
||||||
@ -237,7 +245,8 @@ public enum StateRegistry {
|
|||||||
map(0x18, MINECRAFT_1_17, false),
|
map(0x18, MINECRAFT_1_17, false),
|
||||||
map(0x15, MINECRAFT_1_19, false),
|
map(0x15, MINECRAFT_1_19, false),
|
||||||
map(0x16, MINECRAFT_1_19_1, false),
|
map(0x16, MINECRAFT_1_19_1, false),
|
||||||
map(0x15, MINECRAFT_1_19_3, false));
|
map(0x15, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x17, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(Disconnect.class, Disconnect::new,
|
clientbound.register(Disconnect.class, Disconnect::new,
|
||||||
map(0x40, MINECRAFT_1_7_2, false),
|
map(0x40, MINECRAFT_1_7_2, false),
|
||||||
map(0x1A, MINECRAFT_1_9, false),
|
map(0x1A, MINECRAFT_1_9, false),
|
||||||
@ -249,7 +258,8 @@ public enum StateRegistry {
|
|||||||
map(0x1A, MINECRAFT_1_17, false),
|
map(0x1A, MINECRAFT_1_17, false),
|
||||||
map(0x17, MINECRAFT_1_19, false),
|
map(0x17, MINECRAFT_1_19, false),
|
||||||
map(0x19, MINECRAFT_1_19_1, false),
|
map(0x19, MINECRAFT_1_19_1, false),
|
||||||
map(0x17, MINECRAFT_1_19_3, false));
|
map(0x17, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x1A, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(KeepAlive.class, KeepAlive::new,
|
clientbound.register(KeepAlive.class, KeepAlive::new,
|
||||||
map(0x00, MINECRAFT_1_7_2, false),
|
map(0x00, MINECRAFT_1_7_2, false),
|
||||||
map(0x1F, MINECRAFT_1_9, false),
|
map(0x1F, MINECRAFT_1_9, false),
|
||||||
@ -261,7 +271,8 @@ public enum StateRegistry {
|
|||||||
map(0x21, MINECRAFT_1_17, false),
|
map(0x21, MINECRAFT_1_17, false),
|
||||||
map(0x1E, MINECRAFT_1_19, false),
|
map(0x1E, MINECRAFT_1_19, false),
|
||||||
map(0x20, MINECRAFT_1_19_1, false),
|
map(0x20, MINECRAFT_1_19_1, false),
|
||||||
map(0x1F, MINECRAFT_1_19_3, false));
|
map(0x1F, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x23, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(JoinGame.class, JoinGame::new,
|
clientbound.register(JoinGame.class, JoinGame::new,
|
||||||
map(0x01, MINECRAFT_1_7_2, false),
|
map(0x01, MINECRAFT_1_7_2, false),
|
||||||
map(0x23, MINECRAFT_1_9, false),
|
map(0x23, MINECRAFT_1_9, false),
|
||||||
@ -273,7 +284,8 @@ public enum StateRegistry {
|
|||||||
map(0x26, MINECRAFT_1_17, false),
|
map(0x26, MINECRAFT_1_17, false),
|
||||||
map(0x23, MINECRAFT_1_19, false),
|
map(0x23, MINECRAFT_1_19, false),
|
||||||
map(0x25, MINECRAFT_1_19_1, false),
|
map(0x25, MINECRAFT_1_19_1, false),
|
||||||
map(0x24, MINECRAFT_1_19_3, false));
|
map(0x24, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x28, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(Respawn.class, Respawn::new,
|
clientbound.register(Respawn.class, Respawn::new,
|
||||||
map(0x07, MINECRAFT_1_7_2, true),
|
map(0x07, MINECRAFT_1_7_2, true),
|
||||||
map(0x33, MINECRAFT_1_9, true),
|
map(0x33, MINECRAFT_1_9, true),
|
||||||
@ -287,7 +299,8 @@ public enum StateRegistry {
|
|||||||
map(0x3D, MINECRAFT_1_17, true),
|
map(0x3D, MINECRAFT_1_17, true),
|
||||||
map(0x3B, MINECRAFT_1_19, true),
|
map(0x3B, MINECRAFT_1_19, true),
|
||||||
map(0x3E, MINECRAFT_1_19_1, true),
|
map(0x3E, MINECRAFT_1_19_1, true),
|
||||||
map(0x3D, MINECRAFT_1_19_3, true));
|
map(0x3D, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x41, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(ResourcePackRequest.class, ResourcePackRequest::new,
|
clientbound.register(ResourcePackRequest.class, ResourcePackRequest::new,
|
||||||
map(0x48, MINECRAFT_1_8, false),
|
map(0x48, MINECRAFT_1_8, false),
|
||||||
map(0x32, MINECRAFT_1_9, false),
|
map(0x32, MINECRAFT_1_9, false),
|
||||||
@ -301,7 +314,8 @@ public enum StateRegistry {
|
|||||||
map(0x3C, MINECRAFT_1_17, false),
|
map(0x3C, MINECRAFT_1_17, false),
|
||||||
map(0x3A, MINECRAFT_1_19, false),
|
map(0x3A, MINECRAFT_1_19, false),
|
||||||
map(0x3D, MINECRAFT_1_19_1, false),
|
map(0x3D, MINECRAFT_1_19_1, false),
|
||||||
map(0x3C, MINECRAFT_1_19_3, false));
|
map(0x3C, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x40, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(HeaderAndFooter.class, HeaderAndFooter::new,
|
clientbound.register(HeaderAndFooter.class, HeaderAndFooter::new,
|
||||||
map(0x47, MINECRAFT_1_8, true),
|
map(0x47, MINECRAFT_1_8, true),
|
||||||
map(0x48, MINECRAFT_1_9, true),
|
map(0x48, MINECRAFT_1_9, true),
|
||||||
@ -316,7 +330,8 @@ public enum StateRegistry {
|
|||||||
map(0x5F, MINECRAFT_1_18, true),
|
map(0x5F, MINECRAFT_1_18, true),
|
||||||
map(0x60, MINECRAFT_1_19, true),
|
map(0x60, MINECRAFT_1_19, true),
|
||||||
map(0x63, MINECRAFT_1_19_1, true),
|
map(0x63, MINECRAFT_1_19_1, true),
|
||||||
map(0x61, MINECRAFT_1_19_3, true));
|
map(0x61, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x65, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(LegacyTitlePacket.class, LegacyTitlePacket::new,
|
clientbound.register(LegacyTitlePacket.class, LegacyTitlePacket::new,
|
||||||
map(0x45, MINECRAFT_1_8, true),
|
map(0x45, MINECRAFT_1_8, true),
|
||||||
map(0x45, MINECRAFT_1_9, true),
|
map(0x45, MINECRAFT_1_9, true),
|
||||||
@ -330,26 +345,31 @@ public enum StateRegistry {
|
|||||||
map(0x57, MINECRAFT_1_17, true),
|
map(0x57, MINECRAFT_1_17, true),
|
||||||
map(0x58, MINECRAFT_1_18, true),
|
map(0x58, MINECRAFT_1_18, true),
|
||||||
map(0x5B, MINECRAFT_1_19_1, true),
|
map(0x5B, MINECRAFT_1_19_1, true),
|
||||||
map(0x59, MINECRAFT_1_19_3, true));
|
map(0x59, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x5D, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(TitleTextPacket.class, TitleTextPacket::new,
|
clientbound.register(TitleTextPacket.class, TitleTextPacket::new,
|
||||||
map(0x59, MINECRAFT_1_17, true),
|
map(0x59, MINECRAFT_1_17, true),
|
||||||
map(0x5A, MINECRAFT_1_18, true),
|
map(0x5A, MINECRAFT_1_18, true),
|
||||||
map(0x5D, MINECRAFT_1_19_1, true),
|
map(0x5D, MINECRAFT_1_19_1, true),
|
||||||
map(0x5B, MINECRAFT_1_19_3, true));
|
map(0x5B, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x5F, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(TitleActionbarPacket.class, TitleActionbarPacket::new,
|
clientbound.register(TitleActionbarPacket.class, TitleActionbarPacket::new,
|
||||||
map(0x41, MINECRAFT_1_17, true),
|
map(0x41, MINECRAFT_1_17, true),
|
||||||
map(0x40, MINECRAFT_1_19, true),
|
map(0x40, MINECRAFT_1_19, true),
|
||||||
map(0x43, MINECRAFT_1_19_1, true),
|
map(0x43, MINECRAFT_1_19_1, true),
|
||||||
map(0x42, MINECRAFT_1_19_3, true));
|
map(0x42, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x46, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(TitleTimesPacket.class, TitleTimesPacket::new,
|
clientbound.register(TitleTimesPacket.class, TitleTimesPacket::new,
|
||||||
map(0x5A, MINECRAFT_1_17, true),
|
map(0x5A, MINECRAFT_1_17, true),
|
||||||
map(0x5B, MINECRAFT_1_18, true),
|
map(0x5B, MINECRAFT_1_18, true),
|
||||||
map(0x5E, MINECRAFT_1_19_1, true),
|
map(0x5E, MINECRAFT_1_19_1, true),
|
||||||
map(0x5C, MINECRAFT_1_19_3, true));
|
map(0x5C, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x60, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(TitleClearPacket.class, TitleClearPacket::new,
|
clientbound.register(TitleClearPacket.class, TitleClearPacket::new,
|
||||||
map(0x10, MINECRAFT_1_17, true),
|
map(0x10, MINECRAFT_1_17, true),
|
||||||
map(0x0D, MINECRAFT_1_19, true),
|
map(0x0D, MINECRAFT_1_19, true),
|
||||||
map(0x0C, MINECRAFT_1_19_3, true));
|
map(0x0C, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x0E, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(LegacyPlayerListItem.class, LegacyPlayerListItem::new,
|
clientbound.register(LegacyPlayerListItem.class, LegacyPlayerListItem::new,
|
||||||
map(0x38, MINECRAFT_1_7_2, false),
|
map(0x38, MINECRAFT_1_7_2, false),
|
||||||
map(0x2D, MINECRAFT_1_9, false),
|
map(0x2D, MINECRAFT_1_9, false),
|
||||||
@ -363,20 +383,25 @@ public enum StateRegistry {
|
|||||||
map(0x34, MINECRAFT_1_19, false),
|
map(0x34, MINECRAFT_1_19, false),
|
||||||
map(0x37, MINECRAFT_1_19_1, MINECRAFT_1_19_1, false));
|
map(0x37, MINECRAFT_1_19_1, MINECRAFT_1_19_1, false));
|
||||||
clientbound.register(RemovePlayerInfo.class, RemovePlayerInfo::new,
|
clientbound.register(RemovePlayerInfo.class, RemovePlayerInfo::new,
|
||||||
map(0x35, MINECRAFT_1_19_3, false));
|
map(0x35, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x39, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(UpsertPlayerInfo.class, UpsertPlayerInfo::new,
|
clientbound.register(UpsertPlayerInfo.class, UpsertPlayerInfo::new,
|
||||||
map(0x36, MINECRAFT_1_19_3, false));
|
map(0x36, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x3A, MINECRAFT_1_19_4, false));
|
||||||
clientbound.register(SystemChat.class, SystemChat::new,
|
clientbound.register(SystemChat.class, SystemChat::new,
|
||||||
map(0x5F, MINECRAFT_1_19, true),
|
map(0x5F, MINECRAFT_1_19, true),
|
||||||
map(0x62, MINECRAFT_1_19_1, true),
|
map(0x62, MINECRAFT_1_19_1, true),
|
||||||
map(0x60, MINECRAFT_1_19_3, true));
|
map(0x60, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x64, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(PlayerChatCompletion.class, PlayerChatCompletion::new,
|
clientbound.register(PlayerChatCompletion.class, PlayerChatCompletion::new,
|
||||||
map(0x15, MINECRAFT_1_19_1, true),
|
map(0x15, MINECRAFT_1_19_1, true),
|
||||||
map(0x14, MINECRAFT_1_19_3, true));
|
map(0x14, MINECRAFT_1_19_3, true),
|
||||||
|
map(0x16, MINECRAFT_1_19_4, true));
|
||||||
clientbound.register(ServerData.class, ServerData::new,
|
clientbound.register(ServerData.class, ServerData::new,
|
||||||
map(0x3F, MINECRAFT_1_19, false),
|
map(0x3F, MINECRAFT_1_19, false),
|
||||||
map(0x42, MINECRAFT_1_19_1, false),
|
map(0x42, MINECRAFT_1_19_1, false),
|
||||||
map(0x41, MINECRAFT_1_19_3, false));
|
map(0x41, MINECRAFT_1_19_3, false),
|
||||||
|
map(0x45, MINECRAFT_1_19_4, false));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
LOGIN {
|
LOGIN {
|
||||||
|
@ -47,7 +47,7 @@ public class ServerData implements MinecraftPacket {
|
|||||||
@Override
|
@Override
|
||||||
public void decode(ByteBuf buf, ProtocolUtils.Direction direction,
|
public void decode(ByteBuf buf, ProtocolUtils.Direction direction,
|
||||||
ProtocolVersion protocolVersion) {
|
ProtocolVersion protocolVersion) {
|
||||||
if (buf.readBoolean()) {
|
if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_19_4) >= 0 || buf.readBoolean()) {
|
||||||
this.description = ProtocolUtils.getJsonChatSerializer(protocolVersion)
|
this.description = ProtocolUtils.getJsonChatSerializer(protocolVersion)
|
||||||
.deserialize(ProtocolUtils.readString(buf));
|
.deserialize(ProtocolUtils.readString(buf));
|
||||||
}
|
}
|
||||||
@ -73,8 +73,10 @@ public class ServerData implements MinecraftPacket {
|
|||||||
public void encode(ByteBuf buf, ProtocolUtils.Direction direction,
|
public void encode(ByteBuf buf, ProtocolUtils.Direction direction,
|
||||||
ProtocolVersion protocolVersion) {
|
ProtocolVersion protocolVersion) {
|
||||||
boolean hasDescription = this.description != null;
|
boolean hasDescription = this.description != null;
|
||||||
|
if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_19_4) < 0) {
|
||||||
buf.writeBoolean(hasDescription);
|
buf.writeBoolean(hasDescription);
|
||||||
if (hasDescription) {
|
}
|
||||||
|
if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_19_4) >= 0 || hasDescription) {
|
||||||
ProtocolUtils.writeString(
|
ProtocolUtils.writeString(
|
||||||
buf,
|
buf,
|
||||||
ProtocolUtils.getJsonChatSerializer(protocolVersion).serialize(this.description)
|
ProtocolUtils.getJsonChatSerializer(protocolVersion).serialize(this.description)
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren