mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Baseline IrisApi draft before stage-graph redesign
This commit is contained in:
commit
9043d93fbd
91 files changed
+4045
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package com.volmit;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
/** Maps settings to an ordinary existing JSON field, without an extension wrapper. */
|
||||
public record FeatureAttachment(String field, Set<Target> targets) {
|
||||
public enum Target { DIMENSION, REGION, BIOME, OBJECT_PLACEMENT }
|
||||
|
||||
public FeatureAttachment {
|
||||
Objects.requireNonNull(field, "field");
|
||||
if (field.isBlank()) throw new IllegalArgumentException("Field must not be blank");
|
||||
targets = Set.copyOf(targets);
|
||||
if (targets.isEmpty()) throw new IllegalArgumentException("At least one target is required");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user