3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-04 21:50:23 +01:00

Minecraft 1.21.4 (#1457)

Dieser Commit ist enthalten in:
Aaron 2024-12-03 15:07:26 +01:00 committet von GitHub
Ursprung a33f2d1af5
Commit be5f0ace26
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
3 geänderte Dateien mit 19 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -88,7 +88,8 @@ public enum ProtocolVersion implements Ordered<ProtocolVersion> {
MINECRAFT_1_20_3(765, "1.20.3", "1.20.4"),
MINECRAFT_1_20_5(766, "1.20.5", "1.20.6"),
MINECRAFT_1_21(767, "1.21", "1.21.1"),
MINECRAFT_1_21_2(768, "1.21.2", "1.21.3");
MINECRAFT_1_21_2(768, "1.21.2", "1.21.3"),
MINECRAFT_1_21_4(769, "1.21.4");
private static final int SNAPSHOT_BIT = 30;

Datei anzeigen

@ -38,6 +38,7 @@ import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_20_3;
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_20_5;
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_21;
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_21_2;
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_21_4;
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_9;
@ -358,7 +359,8 @@ public enum StateRegistry {
map(0x27, MINECRAFT_1_20_2, false),
map(0x28, MINECRAFT_1_20_3, false),
map(0x2B, MINECRAFT_1_20_5, false),
map(0x2D, MINECRAFT_1_21_2, false));
map(0x2D, MINECRAFT_1_21_2, false),
map(0x2F, MINECRAFT_1_21_4, false));
serverbound.register(
FinishedUpdatePacket.class, () -> FinishedUpdatePacket.INSTANCE,
map(0x0B, MINECRAFT_1_20_2, false),

Datei anzeigen

@ -193,6 +193,11 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
info.listOrder = ProtocolUtils.readVarInt(buf);
}, (version, buf, info) -> { // write
ProtocolUtils.writeVarInt(buf, info.listOrder);
}),
UPDATE_HAT((version, buf, info) -> { // read
info.showHat = buf.readBoolean();
}, (version, buf, info) -> { // write
buf.writeBoolean(info.showHat);
});
private final Read read;
@ -223,6 +228,7 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
private int gameMode;
@Nullable
private ComponentHolder displayName;
private boolean showHat;
private int listOrder;
@Nullable
private RemoteChatSession chatSession;
@ -256,6 +262,10 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
return displayName;
}
public boolean isShowHat() {
return showHat;
}
public int getListOrder() {
return listOrder;
}
@ -285,6 +295,10 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
this.displayName = displayName;
}
public void setShowHat(boolean showHat) {
this.showHat = showHat;
}
public void setListOrder(int listOrder) {
this.listOrder = listOrder;
}