@ApiStatus.NonExtendable
public interface PackFormat
extends net.kyori.examination.Examinable
Since Minecraft 1.20.2 (pack format 18), resource-packs can also describe a range for pack formats that this pack supports.
| Modifier and Type | Method and Description |
|---|---|
int |
format()
Returns the pack format.
|
static @NotNull PackFormat |
format(int format)
Create a pack format that supports only a single
pack format, specified by the
format parameter. |
static @NotNull PackFormat |
format(int format,
int min,
int max)
Create a pack format that supports a range of formats
specified by the
min and max parameters. |
boolean |
isInRange(int format)
Determines whether the given
format is in the
range of this pack format. |
boolean |
isSingle()
Determines whether this pack format is a single format
and not a range of formats.
|
int |
max()
Returns the maximum supported pack format.
|
int |
min()
Returns the minimum supported pack format.
|
int format()
This value is still required for older versions to be able to read the resource-pack.
The value is between min and max values.
int min()
int max()
boolean isSingle()
boolean isInRange(int format)
format is in the
range of this pack format.format - The format to check.@NotNull static @NotNull PackFormat format(int format)
format parameter.format - The pack format@NotNull static @NotNull PackFormat format(int format, int min, int max)
min and max parameters.
Note: since this range information is ignored by old
versions of the game, they will always see a "normal",
single-version pack, without any extended compatibility.
The single-version for this pack is specified by the
format parameter.
Also note that the given format must be in
the bounds of the provided range.
format - The pack format (for older versions)min - The minimum supported pack format (INCLUSIVE)max - The maximum supported pack format (INCLUSIVE)