mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 16:25:36 +00:00
Describe module settings for studio as LoadedPack.schema()
PackSchema (com.volmit.host.schema) is a JSON-free description of every catalogued settings type: features with their module, JSON field and targets, every reachable class once by name (cycles end at the name), options with value kind, description, required, bounds, defaults read from a no-argument instance and @Ref references, plus object generator settings and snippets. Everything is in a fixed order. The pack load fails, naming class, field and module, on unsupported field types, @Ref on fields that are not text, classes without a working no-argument constructor and snippet names that are not folder names or are used twice. GrassSettings.block becomes a BlockState, a block reference without @Ref.
This commit is contained in:
1 parent
93c755ffe4
commit
3465f8d390
19 files changed
+1302
-6
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package com.volmit.host;
|
||||
|
||||
import com.volmit.host.schema.PackSchema;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -58,6 +59,13 @@ public final class LoadedPack implements AutoCloseable {
|
||||
return loaded.catalog();
|
||||
}
|
||||
|
||||
/** What the pack's modules, built-in ones included, add to the pack's JSON, for studio's schema
|
||||
* and completion. Built with the pack, so a load that returns has a complete description.
|
||||
*/
|
||||
public PackSchema schema() {
|
||||
return loaded.schema();
|
||||
}
|
||||
|
||||
public ResolvedGraph placement() {
|
||||
return loaded.placement();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user