Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 15:00:11 +01:00
Also expose the settings of a resource pack, as shown on https://learn.microsoft.com/en-us/minecraft/creator/documents/utilizingsubpacks?view=minecraft-bedrock-stable
Dieser Commit ist enthalten in:
Ursprung
61334875fa
Commit
0f8d729dbc
@ -74,6 +74,12 @@ public interface ResourcePackManifest {
|
|||||||
@NonNull
|
@NonNull
|
||||||
Collection<? extends Subpack> subpacks();
|
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.
|
* Represents the header of a resource pack.
|
||||||
*/
|
*/
|
||||||
@ -203,6 +209,8 @@ public interface ResourcePackManifest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the memory tier of the subpack.
|
* 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
|
* @return the memory tier
|
||||||
*/
|
*/
|
||||||
@ -210,6 +218,27 @@ public interface ResourcePackManifest {
|
|||||||
Float memoryTier();
|
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.
|
* Represents a version of a resource pack.
|
||||||
*/
|
*/
|
||||||
|
@ -42,7 +42,8 @@ public record GeyserResourcePackManifest(
|
|||||||
Header header,
|
Header header,
|
||||||
Collection<Module> modules,
|
Collection<Module> modules,
|
||||||
Collection<Dependency> dependencies,
|
Collection<Dependency> dependencies,
|
||||||
Collection<Subpack> subpacks
|
Collection<Subpack> subpacks,
|
||||||
|
Collection<Setting> settings
|
||||||
) implements ResourcePackManifest {
|
) implements ResourcePackManifest {
|
||||||
|
|
||||||
public record Header(UUID uuid, Version version, String name, String description, @JsonProperty("min_engine_version") Version minimumSupportedMinecraftVersion) implements ResourcePackManifest.Header { }
|
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 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)
|
@JsonDeserialize(using = Version.VersionDeserializer.class)
|
||||||
public record Version(int major, int minor, int patch) implements ResourcePackManifest.Version {
|
public record Version(int major, int minor, int patch) implements ResourcePackManifest.Version {
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren