diff --git a/api/src/main/java/org/geysermc/geyser/api/pack/ResourcePackManifest.java b/api/src/main/java/org/geysermc/geyser/api/pack/ResourcePackManifest.java index 06a1c5278..6f7ead20d 100644 --- a/api/src/main/java/org/geysermc/geyser/api/pack/ResourcePackManifest.java +++ b/api/src/main/java/org/geysermc/geyser/api/pack/ResourcePackManifest.java @@ -74,6 +74,12 @@ public interface ResourcePackManifest { @NonNull Collection subpacks(); + /** + * Gets the settings of the resource pack. + * This is the text shown in the settings menu of a resource pack. + */ + Collection settings(); + /** * Represents the header of a resource pack. */ @@ -203,6 +209,8 @@ public interface ResourcePackManifest { /** * Gets the memory tier of the subpack. + * One memory tier requires 0.25 GB of free memory + * that a device must have to run a sub-pack. * * @return the memory tier */ @@ -210,6 +218,27 @@ public interface ResourcePackManifest { Float memoryTier(); } + /** + * Represents a setting that is shown client-side that describe what a pack does. + * Multiple setting entries are shown in separate paragraphs. + */ + interface Setting { + + /** + * The type of the setting. Usually just "label". + * + * @return the type + */ + String type(); + + /** + * The text shown for the setting. + * + * @return the text content + */ + String text(); + } + /** * Represents a version of a resource pack. */ diff --git a/core/src/main/java/org/geysermc/geyser/pack/GeyserResourcePackManifest.java b/core/src/main/java/org/geysermc/geyser/pack/GeyserResourcePackManifest.java index 1807c63bb..4120bebbe 100644 --- a/core/src/main/java/org/geysermc/geyser/pack/GeyserResourcePackManifest.java +++ b/core/src/main/java/org/geysermc/geyser/pack/GeyserResourcePackManifest.java @@ -42,7 +42,8 @@ public record GeyserResourcePackManifest( Header header, Collection modules, Collection dependencies, - Collection subpacks + Collection subpacks, + Collection settings ) implements ResourcePackManifest { public record Header(UUID uuid, Version version, String name, String description, @JsonProperty("min_engine_version") Version minimumSupportedMinecraftVersion) implements ResourcePackManifest.Header { } @@ -53,6 +54,8 @@ public record GeyserResourcePackManifest( public record Subpack(@JsonProperty("folder_name") String folderName, String name, @JsonProperty("memory_tier") Float memoryTier) implements ResourcePackManifest.Subpack { } + public record Setting(String type, String text) implements ResourcePackManifest.Setting { } + @JsonDeserialize(using = Version.VersionDeserializer.class) public record Version(int major, int minor, int patch) implements ResourcePackManifest.Version {