Skip to content

Commit

Permalink
Fix logic, support 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyWatcher2019 committed Oct 13, 2024
1 parent 0ba41fe commit 6a3e799
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ public void decode(ByteBuf byteBuf, ProtocolUtils.Direction direction, ProtocolV

@Override
public void encode(ByteBuf byteBuf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {
if (protocolVersion.greaterThan(ProtocolVersion.MINECRAFT_1_19_1) && protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_18_2)) {
if (protocolVersion.greaterThan(ProtocolVersion.MINECRAFT_1_19_1) || protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_18_2)) {
ProtocolUtils.writeVarInt(byteBuf, 0);
}
ProtocolUtils.writeString(byteBuf, this.soundName);
if (protocolVersion.greaterThan(ProtocolVersion.MINECRAFT_1_19_1) && protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_18_2)) {
if (protocolVersion.greaterThan(ProtocolVersion.MINECRAFT_1_19_1) || protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_18_2)) {
byteBuf.writeBoolean(false);
}
ProtocolUtils.writeVarInt(byteBuf, 0);
Expand Down

0 comments on commit 6a3e799

Please sign in to comment.