Skip to content

Commit

Permalink
Re-add Vanilla constructor for ServerStatus (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 authored Jun 5, 2024
1 parent caf97c9 commit a97bfc7
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
) {
public static final Codec<ServerStatus> CODEC = RecordCodecBuilder.create(
p_337519_ -> p_337519_.group(
@@ -29,7 +_,8 @@
@@ -29,10 +_,25 @@
ServerStatus.Players.CODEC.lenientOptionalFieldOf("players").forGetter(ServerStatus::players),
ServerStatus.Version.CODEC.lenientOptionalFieldOf("version").forGetter(ServerStatus::version),
ServerStatus.Favicon.CODEC.lenientOptionalFieldOf("favicon").forGetter(ServerStatus::favicon),
Expand All @@ -20,3 +20,20 @@
)
.apply(p_337519_, ServerStatus::new)
);
+
+ /**
+ * @deprecated Neo: Use {@link #ServerStatus(Component, Optional, Optional, Optional, boolean, boolean)}
+ */
+ @Deprecated
+ public ServerStatus(
+ Component description,
+ Optional<ServerStatus.Players> players,
+ Optional<ServerStatus.Version> version,
+ Optional<ServerStatus.Favicon> favicon,
+ boolean enforcesSecureChat
+ ) {
+ this(description, players, version, favicon, enforcesSecureChat, false);
+ }

public static record Favicon(byte[] iconBytes) {
private static final String PREFIX = "data:image/png;base64,";

0 comments on commit a97bfc7

Please sign in to comment.