Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minecraft 1.21.4 #1457

Merged
merged 9 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ public boolean isSupported() {
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
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;
Expand Down Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public enum Action {
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;
Expand Down Expand Up @@ -223,6 +228,7 @@ public static class Entry {
private int gameMode;
@Nullable
private ComponentHolder displayName;
private boolean showHat;
private int listOrder;
@Nullable
private RemoteChatSession chatSession;
Expand Down Expand Up @@ -256,6 +262,10 @@ public ComponentHolder getDisplayName() {
return displayName;
}

public boolean getShowHat() {
kennytv marked this conversation as resolved.
Show resolved Hide resolved
return showHat;
}

public int getListOrder() {
return listOrder;
}
Expand Down Expand Up @@ -285,6 +295,10 @@ public void setDisplayName(@Nullable ComponentHolder displayName) {
this.displayName = displayName;
}

public void setShowHat(boolean showHat) {
this.showHat = showHat;
}

public void setListOrder(int listOrder) {
this.listOrder = listOrder;
}
Expand Down