mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 16:25:36 +00:00
Tighten the tooling package and document it
JsonText only reads now; splicing text is the host's, as the studio makes every write. JsonPath steps are a sealed Key or Index. Absent values are empty instead of -1 or blank: GraphNode.part, BlockPattern.pickAt and the entries' group. GraphNode's child list, movability and additions are one Edits record. README and DESIGN describe the tooling package, CONTRACTS maps it, and the docs no longer name the types the last batch removed.
This commit is contained in:
1 parent
2b6f96e5c2
commit
cdd138d9f4
13 files changed
+213
-298
No files matched your search
@@ -10,8 +10,8 @@ public interface IrisModule {
|
||||
ModuleInfo info();
|
||||
|
||||
/** Defines this module's stages and registers its other contributions (geometry generators, mantle layers,
|
||||
* settings no stage names, pack resource kinds, validators, lifecycle hooks and services), before settings are
|
||||
* decoded or generation starts. Called once per pack load, in any order relative to other modules; stage bodies
|
||||
* settings no stage names, pack resource kinds, validators, lifecycle hooks and services) and its studio views
|
||||
* ({@link ModuleSetup#tooling()}), before settings are decoded or generation starts. Called once per pack load, in any order relative to other modules; stage bodies
|
||||
* must not capture per-invocation state.
|
||||
*/
|
||||
void setup(ModuleSetup setup);
|
||||
|
||||
@@ -6,14 +6,14 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.OptionalInt;
|
||||
|
||||
/**
|
||||
* What a {@link PatternView} places over a square of columns: the distinct blocks, and which of them each column holds,
|
||||
* row by row from the north west.
|
||||
*/
|
||||
public final class BlockPattern {
|
||||
/** What {@link #pickAt} gives for a column the pattern places nothing at. */
|
||||
public static final int NO_BLOCK = -1;
|
||||
private static final int NOTHING_PLACED = -1;
|
||||
|
||||
private final int columns;
|
||||
private final List<BlockState> blocks;
|
||||
@@ -39,7 +39,7 @@ public final class BlockPattern {
|
||||
int[] picks = new int[columnBlocks.length];
|
||||
for (int column = 0; column < columnBlocks.length; column++) {
|
||||
BlockState block = columnBlocks[column];
|
||||
picks[column] = block == null ? NO_BLOCK : indexByBlock.computeIfAbsent(block, added -> {
|
||||
picks[column] = block == null ? NOTHING_PLACED :indexByBlock.computeIfAbsent(block, added -> {
|
||||
blocks.add(added);
|
||||
return blocks.size() - 1;
|
||||
});
|
||||
@@ -56,8 +56,9 @@ public final class BlockPattern {
|
||||
return blocks;
|
||||
}
|
||||
|
||||
/** Which of {@link #blocks()} the column holds, or {@link #NO_BLOCK}. */
|
||||
public int pickAt(int column, int row) {
|
||||
return picks[row * columns + column];
|
||||
/** Which of {@link #blocks()} the column holds; empty where the pattern places nothing. */
|
||||
public OptionalInt pickAt(int column, int row) {
|
||||
int pick = picks[row * columns + column];
|
||||
return pick == NOTHING_PLACED ? OptionalInt.empty() : OptionalInt.of(pick);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public interface EditableSceneView extends SceneView {
|
||||
|
||||
/**
|
||||
* {@code text}, the file of entry {@code key}, as nodes. The pack may not have read this text yet, so a node whose
|
||||
* part the scene does not show yet has {@link GraphNode#NO_PART}.
|
||||
* part the scene does not show yet has no {@link GraphNode#part()}.
|
||||
*
|
||||
* @throws IllegalArgumentException when {@code text} does not hold what this view edits
|
||||
*/
|
||||
|
||||
@@ -3,36 +3,33 @@ package com.volmit.tooling;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.OptionalInt;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* One node of a {@link NodeGraph}: a JSON object of the file, shown as a box of its settings, with the nodes it holds.
|
||||
*
|
||||
* @param kind what it is, such as {@code Stem}; nodes of one kind are drawn alike
|
||||
* @param title what its box is headed, such as the object's name
|
||||
* @param path where it is written; a node in an array can be duplicated and deleted, the root can't be deleted
|
||||
* @param partId the part of the scene it draws, so choosing one chooses the other; {@link #NO_PART} for none
|
||||
* @param roles the block roles it places or decorates, shown as tags
|
||||
* @param settings the objects whose settings its box shows, its own first
|
||||
* @param children the nodes it holds, each with what the wire to it means
|
||||
* @param childList the array a node moved under this one is added to; empty when nothing can be moved here
|
||||
* @param movable whether it can be moved under another node with a child list
|
||||
* @param additions the nodes that can be added under it
|
||||
* @param kind what it is, such as {@code Stem}; nodes of one kind are drawn alike
|
||||
* @param title what its box is headed, such as the object's name
|
||||
* @param path where it is written; a node in an array can be duplicated and deleted, the root can't be deleted
|
||||
* @param part the part of the scene it draws, so choosing one chooses the other; empty when it draws none
|
||||
* @param roles the block roles it places or decorates, shown as tags
|
||||
* @param settings the objects whose settings its box shows, its own first
|
||||
* @param children the nodes it holds, each with what the wire to it means
|
||||
* @param edits how the studio may change it beyond its settings
|
||||
*/
|
||||
public record GraphNode(String kind, String title, JsonPath path, int partId, List<String> roles, List<NodeSettings> settings,
|
||||
List<Link> children, Optional<JsonPath> childList, boolean movable, List<Addition> additions) {
|
||||
public static final int NO_PART = -1;
|
||||
|
||||
public record GraphNode(String kind, String title, JsonPath path, OptionalInt part, List<String> roles,
|
||||
List<NodeSettings> settings, List<Link> children, Edits edits) {
|
||||
public GraphNode {
|
||||
Objects.requireNonNull(kind, "kind");
|
||||
Objects.requireNonNull(title, "title");
|
||||
Objects.requireNonNull(path, "path");
|
||||
Objects.requireNonNull(childList, "childList");
|
||||
Objects.requireNonNull(part, "part");
|
||||
roles = List.copyOf(roles);
|
||||
settings = List.copyOf(settings);
|
||||
children = List.copyOf(children);
|
||||
additions = List.copyOf(additions);
|
||||
if (movable && !path.isElement()) {
|
||||
Objects.requireNonNull(edits, "edits");
|
||||
if (edits.movable() && !path.isElement()) {
|
||||
throw new IllegalArgumentException("Only a node in an array can move, not the one at " + path);
|
||||
}
|
||||
}
|
||||
@@ -59,6 +56,22 @@ public record GraphNode(String kind, String title, JsonPath path, int partId, Li
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* How the studio may change a node beyond its settings.
|
||||
*
|
||||
* @param childList the array a node moved under this one is added to; empty when nothing can be moved here
|
||||
* @param movable whether it can be moved under another node with a child list
|
||||
* @param additions the nodes that can be added under it
|
||||
*/
|
||||
public record Edits(Optional<JsonPath> childList, boolean movable, List<Addition> additions) {
|
||||
public static final Edits NONE = new Edits(Optional.empty(), false, List.of());
|
||||
|
||||
public Edits {
|
||||
Objects.requireNonNull(childList, "childList");
|
||||
additions = List.copyOf(additions);
|
||||
}
|
||||
}
|
||||
|
||||
/** A node that can be added: {@code literal} appended to the array at {@code list}, which is written when missing. */
|
||||
public record Addition(String label, JsonPath list, String literal) {
|
||||
public Addition {
|
||||
|
||||
@@ -3,42 +3,60 @@ package com.volmit.tooling;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Where a value sits in a JSON file: member names and element indices from the root, such as
|
||||
* {@code parts, 0, stem} for the stem of the first part.
|
||||
*
|
||||
* @param steps each a {@link String} member name or a non-negative {@link Integer} element index
|
||||
* {@code parts, 0, stem} for the stem of the first part, built as {@code ROOT.member("parts").element(0).member("stem")}.
|
||||
*/
|
||||
public record JsonPath(List<Object> steps) {
|
||||
public record JsonPath(List<JsonPath.Step> steps) {
|
||||
public static final JsonPath ROOT = new JsonPath(List.of());
|
||||
|
||||
public JsonPath {
|
||||
steps = List.copyOf(steps);
|
||||
for (Object step : steps) {
|
||||
boolean index = step instanceof Integer at && at >= 0;
|
||||
if (!(step instanceof String) && !index) {
|
||||
throw new IllegalArgumentException("A JSON path step is a member name or an index from 0, not " + step);
|
||||
}
|
||||
}
|
||||
|
||||
/** One step down from a value: into a member of an object or an element of an array. */
|
||||
public sealed interface Step permits Key, Index {
|
||||
}
|
||||
|
||||
/** The member named {@code name} of an object. */
|
||||
public record Key(String name) implements Step {
|
||||
public Key {
|
||||
Objects.requireNonNull(name, "name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
public static JsonPath of(Object... steps) {
|
||||
return new JsonPath(List.of(steps));
|
||||
/** The element at {@code position} of an array, from 0. */
|
||||
public record Index(int position) implements Step {
|
||||
public Index {
|
||||
if (position < 0) {
|
||||
throw new IllegalArgumentException("An element index counts from 0, not " + position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(position);
|
||||
}
|
||||
}
|
||||
|
||||
public JsonPath member(String key) {
|
||||
Objects.requireNonNull(key, "key");
|
||||
return then(key);
|
||||
public JsonPath member(String name) {
|
||||
return then(new Key(name));
|
||||
}
|
||||
|
||||
public JsonPath element(int index) {
|
||||
return then(index);
|
||||
public JsonPath element(int position) {
|
||||
return then(new Index(position));
|
||||
}
|
||||
|
||||
/** This path with {@code suffix}'s steps after its own. */
|
||||
public JsonPath resolve(JsonPath suffix) {
|
||||
List<Object> longer = new ArrayList<>(steps);
|
||||
List<Step> longer = new ArrayList<>(steps);
|
||||
longer.addAll(suffix.steps);
|
||||
return new JsonPath(longer);
|
||||
}
|
||||
@@ -54,14 +72,14 @@ public record JsonPath(List<Object> steps) {
|
||||
}
|
||||
|
||||
/** @throws IllegalStateException at the root */
|
||||
public Object last() {
|
||||
public Step last() {
|
||||
requireStep();
|
||||
return steps.getLast();
|
||||
}
|
||||
|
||||
/** Whether the value here is an element of an array. */
|
||||
public boolean isElement() {
|
||||
return !isRoot() && last() instanceof Integer;
|
||||
return !isRoot() && last() instanceof Index;
|
||||
}
|
||||
|
||||
public boolean startsWith(JsonPath prefix) {
|
||||
@@ -72,8 +90,8 @@ public record JsonPath(List<Object> steps) {
|
||||
return steps.size();
|
||||
}
|
||||
|
||||
private JsonPath then(Object step) {
|
||||
List<Object> longer = new ArrayList<>(steps);
|
||||
private JsonPath then(Step step) {
|
||||
List<Step> longer = new ArrayList<>(steps);
|
||||
longer.add(step);
|
||||
return new JsonPath(longer);
|
||||
}
|
||||
@@ -86,6 +104,6 @@ public record JsonPath(List<Object> steps) {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return steps.isEmpty() ? "the root" : steps.stream().map(String::valueOf).reduce((first, second) -> first + "." + second).orElseThrow();
|
||||
return steps.isEmpty() ? "the root" : steps.stream().map(Step::toString).collect(Collectors.joining("."));
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.volmit.tooling;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* A JSON file that remembers where each value is written, so an edit rewrites only the value it changes and the rest
|
||||
* of the file keeps the layout its author gave it. Comments are passed over, as the pack reader allows them.
|
||||
* A JSON file that remembers where each value is written, so the studio can edit one value and leave the rest of the
|
||||
* file as its author laid it out. Comments are passed over, as the pack reader allows them.
|
||||
*/
|
||||
public final class JsonText {
|
||||
private final String text;
|
||||
@@ -41,28 +40,6 @@ public final class JsonText {
|
||||
}
|
||||
}
|
||||
|
||||
/** {@code plain} as a JSON string literal. */
|
||||
public static String quote(String plain) {
|
||||
StringBuilder quoted = new StringBuilder("\"");
|
||||
for (char character : plain.toCharArray()) {
|
||||
switch (character) {
|
||||
case '"' -> quoted.append("\\\"");
|
||||
case '\\' -> quoted.append("\\\\");
|
||||
case '\n' -> quoted.append("\\n");
|
||||
case '\r' -> quoted.append("\\r");
|
||||
case '\t' -> quoted.append("\\t");
|
||||
default -> {
|
||||
if (character < 0x20) {
|
||||
quoted.append(String.format("\\u%04x", (int) character));
|
||||
} else {
|
||||
quoted.append(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return quoted.append('"').toString();
|
||||
}
|
||||
|
||||
public String text() {
|
||||
return text;
|
||||
}
|
||||
@@ -74,7 +51,7 @@ public final class JsonText {
|
||||
/** The value at {@code path}; empty when the file has none there. */
|
||||
public Optional<Value> at(JsonPath path) {
|
||||
Value value = root;
|
||||
for (Object step : path.steps()) {
|
||||
for (JsonPath.Step step : path.steps()) {
|
||||
Optional<Value> inside = stepInto(value, step);
|
||||
if (inside.isEmpty()) {
|
||||
return Optional.empty();
|
||||
@@ -89,121 +66,16 @@ public final class JsonText {
|
||||
return text.substring(value.start(), value.end());
|
||||
}
|
||||
|
||||
/** The text of {@code value}, its later lines indented as if it started a line with no indent. */
|
||||
public String detachedTextOf(Value value) {
|
||||
return reindented(textOf(value), indentOfLine(value.start()), "");
|
||||
}
|
||||
|
||||
public Splice replace(Value value, String literal) {
|
||||
return new Splice(value.start(), value.end(), literal);
|
||||
}
|
||||
|
||||
/** Sets the member, written after the last one in the object's own style when it is new. */
|
||||
public Splice put(Obj object, String key, String literal) {
|
||||
Optional<Member> existing = object.member(key);
|
||||
if (existing.isPresent()) {
|
||||
return replace(existing.get().value(), literal);
|
||||
private static Optional<Value> stepInto(Value value, JsonPath.Step step) {
|
||||
if (step instanceof JsonPath.Key(String name) && value instanceof Obj object) {
|
||||
return object.get(name);
|
||||
}
|
||||
if (object.members().isEmpty()) {
|
||||
return replace(object, "{" + quote(key) + ": " + reindented(literal, "", indentOfLine(object.start())) + "}");
|
||||
}
|
||||
Member last = object.members().getLast();
|
||||
String indent = indentOfLine(last.keyStart());
|
||||
String entry = quote(key) + ": " + reindented(literal, "", indent);
|
||||
String separator = isMultiline(object) ? ",\n" + indent : ", ";
|
||||
return new Splice(last.value().end(), last.value().end(), separator + entry);
|
||||
}
|
||||
|
||||
/** @throws IllegalArgumentException when the object has no member {@code key} */
|
||||
public Splice remove(Obj object, String key) {
|
||||
List<Member> members = object.members();
|
||||
int index = members.indexOf(object.member(key).orElseThrow(() -> new IllegalArgumentException("No " + key + " to remove")));
|
||||
if (members.size() == 1) {
|
||||
return replace(object, "{}");
|
||||
}
|
||||
if (index > 0) {
|
||||
return new Splice(members.get(index - 1).value().end(), members.get(index).value().end(), "");
|
||||
}
|
||||
return new Splice(members.getFirst().keyStart(), members.get(1).keyStart(), "");
|
||||
}
|
||||
|
||||
/** Adds an element after the last one, a multi-line one indented to match the array. */
|
||||
public Splice append(Arr array, String literal) {
|
||||
if (array.elements().isEmpty()) {
|
||||
return replace(array, "[" + reindented(literal, "", indentOfLine(array.start())) + "]");
|
||||
}
|
||||
Value last = array.elements().getLast();
|
||||
String indent = indentOfLine(last.start());
|
||||
String separator = isMultiline(array) ? ",\n" + indent : ", ";
|
||||
return new Splice(last.end(), last.end(), separator + reindented(literal, "", indent));
|
||||
}
|
||||
|
||||
public Splice removeElement(Arr array, int index) {
|
||||
List<Value> elements = array.elements();
|
||||
Objects.checkIndex(index, elements.size());
|
||||
if (elements.size() == 1) {
|
||||
return replace(array, "[]");
|
||||
}
|
||||
if (index > 0) {
|
||||
return new Splice(elements.get(index - 1).end(), elements.get(index).end(), "");
|
||||
}
|
||||
return new Splice(elements.getFirst().start(), elements.get(1).start(), "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The text with {@code splices} made, each placed by where it was in this text.
|
||||
*
|
||||
* @throws IllegalArgumentException when two splices overlap
|
||||
*/
|
||||
public String apply(List<Splice> splices) {
|
||||
List<Splice> fromLast = new ArrayList<>(splices);
|
||||
fromLast.sort(Comparator.comparingInt(Splice::start).reversed());
|
||||
StringBuilder edited = new StringBuilder(text);
|
||||
int earliestStart = Integer.MAX_VALUE;
|
||||
for (Splice splice : fromLast) {
|
||||
if (splice.end() > earliestStart) {
|
||||
throw new IllegalArgumentException("Overlapping edits");
|
||||
}
|
||||
edited.replace(splice.start(), splice.end(), splice.replacement());
|
||||
earliestStart = splice.start();
|
||||
}
|
||||
return edited.toString();
|
||||
}
|
||||
|
||||
private static Optional<Value> stepInto(Value value, Object step) {
|
||||
if (step instanceof String key && value instanceof Obj object) {
|
||||
return object.get(key);
|
||||
}
|
||||
if (step instanceof Integer index && value instanceof Arr array && index < array.elements().size()) {
|
||||
return Optional.of(array.elements().get(index));
|
||||
if (step instanceof JsonPath.Index(int position) && value instanceof Arr array && position < array.elements().size()) {
|
||||
return Optional.of(array.elements().get(position));
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
private boolean isMultiline(Value value) {
|
||||
return textOf(value).indexOf('\n') >= 0;
|
||||
}
|
||||
|
||||
// The blanks before the first character on the line holding position.
|
||||
private String indentOfLine(int position) {
|
||||
int lineStart = text.lastIndexOf('\n', position - 1) + 1;
|
||||
int indentEnd = lineStart;
|
||||
while (indentEnd < position && (text.charAt(indentEnd) == ' ' || text.charAt(indentEnd) == '\t')) {
|
||||
indentEnd++;
|
||||
}
|
||||
return text.substring(lineStart, indentEnd);
|
||||
}
|
||||
|
||||
private static String reindented(String literal, String fromIndent, String toIndent) {
|
||||
String[] lines = literal.split("\n", -1);
|
||||
StringBuilder result = new StringBuilder(lines[0]);
|
||||
for (int index = 1; index < lines.length; index++) {
|
||||
String line = lines[index].startsWith(fromIndent) ? lines[index].substring(fromIndent.length()) : lines[index].stripLeading();
|
||||
result.append('\n').append(toIndent).append(line);
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/** A value of the file, from {@code start} up to {@code end} in its text. */
|
||||
public sealed interface Value permits Obj, Arr, Literal {
|
||||
int start();
|
||||
@@ -242,16 +114,6 @@ public final class JsonText {
|
||||
}
|
||||
}
|
||||
|
||||
/** Replaces the text from {@code start} up to {@code end} with {@code replacement}. */
|
||||
public record Splice(int start, int end, String replacement) {
|
||||
public Splice {
|
||||
Objects.requireNonNull(replacement, "replacement");
|
||||
if (start < 0 || end < start) {
|
||||
throw new IllegalArgumentException("A splice runs forwards from 0, not " + start + " to " + end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final class Parser {
|
||||
private final String text;
|
||||
private int position;
|
||||
|
||||
@@ -2,17 +2,18 @@ package com.volmit.tooling;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* One entry of a {@link PatternView}'s catalogue.
|
||||
*
|
||||
* @param key what the view names the entry by in {@link PatternView#pattern}
|
||||
* @param name what the studio lists it as, such as "Layer 1"
|
||||
* @param group what the studio lists it under, such as its biome's name; blank for none
|
||||
* @param group what the studio lists it under, such as its biome's name; empty to list it at the top
|
||||
* @param depths how many blocks deep the entry can reach, at least 1
|
||||
* @param facts short lines the studio shows with the entry, such as "2 to 4 blocks thick"
|
||||
*/
|
||||
public record PatternEntry(String key, String name, String group, int depths, List<String> facts) {
|
||||
public record PatternEntry(String key, String name, Optional<String> group, int depths, List<String> facts) {
|
||||
public PatternEntry {
|
||||
Objects.requireNonNull(key, "key");
|
||||
Objects.requireNonNull(name, "name");
|
||||
@@ -21,6 +22,9 @@ public record PatternEntry(String key, String name, String group, int depths, Li
|
||||
if (key.isBlank()) {
|
||||
throw new IllegalArgumentException("A pattern entry needs a key");
|
||||
}
|
||||
if (group.isPresent() && group.get().isBlank()) {
|
||||
throw new IllegalArgumentException("Pattern entry " + key + " has a blank group; leave it empty instead");
|
||||
}
|
||||
if (depths < 1) {
|
||||
throw new IllegalArgumentException("Pattern entry " + key + " reaches " + depths + " blocks deep; an entry reaches at least 1");
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
package com.volmit.tooling;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* One entry of a {@link SceneView}'s catalogue.
|
||||
*
|
||||
* @param key what the view names the entry by in {@link SceneView#scene}, such as an object's {@code trees/oak}
|
||||
* @param name what the studio lists it as
|
||||
* @param group the folder the studio lists it under, such as {@code trees}; blank for none
|
||||
* @param group the folder the studio lists it under, such as {@code trees}; empty to list it at the top
|
||||
* @param variants how many scenes the entry has, at least 1
|
||||
*/
|
||||
public record SceneEntry(String key, String name, String group, int variants) {
|
||||
public record SceneEntry(String key, String name, Optional<String> group, int variants) {
|
||||
public SceneEntry {
|
||||
Objects.requireNonNull(key, "key");
|
||||
Objects.requireNonNull(name, "name");
|
||||
@@ -18,6 +19,9 @@ public record SceneEntry(String key, String name, String group, int variants) {
|
||||
if (key.isBlank()) {
|
||||
throw new IllegalArgumentException("A scene entry needs a key");
|
||||
}
|
||||
if (group.isPresent() && group.get().isBlank()) {
|
||||
throw new IllegalArgumentException("Scene entry " + key + " has a blank group; leave it empty instead");
|
||||
}
|
||||
if (variants < 1) {
|
||||
throw new IllegalArgumentException("Scene entry " + key + " has " + variants + " variants; an entry has at least 1");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user