mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 16:54:04 +00:00
PackResources keeps one idOf: the lower-casing ofPackKey one both merged branches added
This commit is contained in:
1 parent
b047a2675d
commit
53b838bd3f
1 file changed
+3
-11
@@ -28,15 +28,6 @@ public interface PackResources {
|
||||
/** Builds the noise of the {@link com.volmit.noise.NoiseStyle}s the pack's settings describe. */
|
||||
NoiseFactory noise();
|
||||
|
||||
/** The id the pack's resources have for the one the pack's own files name by {@code packKey}, such as {@code desert/dunes}
|
||||
* (a biome's key in a region, a settings field naming a biome): {@code overworld:desert/dunes} in the pack
|
||||
* {@code overworld}. Characters an id cannot hold are replaced the way the host does for its own ids, so use this and
|
||||
* not {@code new ResourceId(packId().namespace(), packKey)} for a key that may hold them.
|
||||
*/
|
||||
default ResourceId idOf(String packKey) {
|
||||
return new ResourceId(packId().namespace(), packKey);
|
||||
}
|
||||
|
||||
<T> Optional<T> find(ResourceKey<T> key);
|
||||
|
||||
/** The ids of every resource of the kind {@code type} selects, in id order. A type the host does not serve
|
||||
@@ -46,8 +37,9 @@ public interface PackResources {
|
||||
|
||||
/** The id of the resource the pack's files name by {@code key} (the file path inside the kind's folder, without
|
||||
* {@code .json}), such as {@code overworld:dungeon/chest} for {@code dungeon/chest}; see
|
||||
* {@link ResourceId#ofPackKey}. Settings that name a resource, such as a {@link com.volmit.config.ResourceRef},
|
||||
* hold such a key.
|
||||
* {@link ResourceId#ofPackKey}. Settings that name a resource, such as a {@link com.volmit.config.ResourceRef}, or a
|
||||
* biome's key in a region, hold such a key. Characters an id cannot hold are replaced the way the host does for its
|
||||
* own ids, so use this and not {@code new ResourceId(packId().namespace(), key)}.
|
||||
*/
|
||||
default ResourceId idOf(String key) {
|
||||
return ResourceId.ofPackKey(packId().namespace(), key);
|
||||
|
||||
Reference in new issue
Block a user