Skip to content

Commit

Permalink
24w44a
Browse files Browse the repository at this point in the history
  • Loading branch information
RealBauHD committed Nov 5, 2024
1 parent 08a42b3 commit 1029e70
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
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(-1, 220, "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(0x2E, 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() {
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

0 comments on commit 1029e70

Please sign in to comment.