3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-20 15:00:11 +01:00
Dieser Commit ist enthalten in:
onebeastchris 2024-08-11 14:44:50 +02:00
Ursprung 61334875fa
Commit 0f8d729dbc
2 geänderte Dateien mit 33 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -74,6 +74,12 @@ public interface ResourcePackManifest {
@NonNull
Collection<? extends Subpack> subpacks();
/**
* Gets the settings of the resource pack.
* This is the text shown in the settings menu of a resource pack.
*/
Collection<? extends Setting> 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.
*/

Datei anzeigen

@ -42,7 +42,8 @@ public record GeyserResourcePackManifest(
Header header,
Collection<Module> modules,
Collection<Dependency> dependencies,
Collection<Subpack> subpacks
Collection<Subpack> subpacks,
Collection<Setting> 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 {