mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Let modules declare pack resource kinds and validators: ResourceKind, PackResources.ids, @ResourceRef, the validation API and folders the host reserves
This commit is contained in:
1 parent
09afee8ae3
commit
ef4b640867
37 files changed
+990
-128
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package com.volmit.host.schema;
|
||||
|
||||
import com.volmit.config.Reference;
|
||||
import com.volmit.resource.ResourceId;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -32,6 +33,15 @@ public sealed interface ValueKind {
|
||||
}
|
||||
}
|
||||
|
||||
/** A string naming a resource of the module resource kind {@code kind} by its key in the pack, such as
|
||||
* {@code castle/start}; see {@link PackSchema#resource}.
|
||||
*/
|
||||
record ResourceReferenceKind(ResourceId kind) implements ValueKind {
|
||||
public ResourceReferenceKind {
|
||||
Objects.requireNonNull(kind, "kind");
|
||||
}
|
||||
}
|
||||
|
||||
/** One of the constant names of the enum class named {@code type}, in declaration order. */
|
||||
record EnumKind(String type, List<EnumConstant> constants) implements ValueKind {
|
||||
public EnumKind {
|
||||
|
||||
Reference in new issue
Block a user