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_3(765, "1.20.3", "1.20.4"),
|
||||||
MINECRAFT_1_20_5(766, "1.20.5", "1.20.6"),
|
MINECRAFT_1_20_5(766, "1.20.5", "1.20.6"),
|
||||||
MINECRAFT_1_21(767, "1.21", "1.21.1"),
|
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;
|
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_20_5;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_21;
|
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_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_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;
|
||||||
@ -358,7 +359,8 @@ public enum StateRegistry {
|
|||||||
map(0x27, MINECRAFT_1_20_2, false),
|
map(0x27, MINECRAFT_1_20_2, false),
|
||||||
map(0x28, MINECRAFT_1_20_3, false),
|
map(0x28, MINECRAFT_1_20_3, false),
|
||||||
map(0x2B, MINECRAFT_1_20_5, 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(
|
serverbound.register(
|
||||||
FinishedUpdatePacket.class, () -> FinishedUpdatePacket.INSTANCE,
|
FinishedUpdatePacket.class, () -> FinishedUpdatePacket.INSTANCE,
|
||||||
map(0x0B, MINECRAFT_1_20_2, false),
|
map(0x0B, MINECRAFT_1_20_2, false),
|
||||||
|
@ -193,6 +193,11 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
|
|||||||
info.listOrder = ProtocolUtils.readVarInt(buf);
|
info.listOrder = ProtocolUtils.readVarInt(buf);
|
||||||
}, (version, buf, info) -> { // write
|
}, (version, buf, info) -> { // write
|
||||||
ProtocolUtils.writeVarInt(buf, info.listOrder);
|
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;
|
private final Read read;
|
||||||
@ -223,6 +228,7 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
|
|||||||
private int gameMode;
|
private int gameMode;
|
||||||
@Nullable
|
@Nullable
|
||||||
private ComponentHolder displayName;
|
private ComponentHolder displayName;
|
||||||
|
private boolean showHat;
|
||||||
private int listOrder;
|
private int listOrder;
|
||||||
@Nullable
|
@Nullable
|
||||||
private RemoteChatSession chatSession;
|
private RemoteChatSession chatSession;
|
||||||
@ -256,6 +262,10 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
|
|||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getShowHat() {
|
||||||
|
return showHat;
|
||||||
|
}
|
||||||
|
|
||||||
public int getListOrder() {
|
public int getListOrder() {
|
||||||
return listOrder;
|
return listOrder;
|
||||||
}
|
}
|
||||||
@ -285,6 +295,10 @@ public class UpsertPlayerInfoPacket implements MinecraftPacket {
|
|||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setShowHat(boolean showHat) {
|
||||||
|
this.showHat = showHat;
|
||||||
|
}
|
||||||
|
|
||||||
public void setListOrder(int listOrder) {
|
public void setListOrder(int listOrder) {
|
||||||
this.listOrder = listOrder;
|
this.listOrder = listOrder;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren