Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-06 00:00:47 +01:00
24w44a
Dieser Commit ist enthalten in:
Ursprung
08a42b3723
Commit
1029e704b6
@ -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(-1, 220, "1.21.4");
|
||||
|
||||
private static final int SNAPSHOT_BIT = 30;
|
||||
|
||||
|
@ -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(0x2E, MINECRAFT_1_21_4, false));
|
||||
serverbound.register(
|
||||
FinishedUpdatePacket.class, () -> FinishedUpdatePacket.INSTANCE,
|
||||
map(0x0B, MINECRAFT_1_20_2, false),
|
||||
|
@ -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 getShowHat() {
|
||||
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;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren