Name pack resources with @ResourceRef

This commit is contained in:
piexel committed 2026-11-06 07:16:26 +01:00
1 parent 6c4bbb1df5
commit 6e2d94a4c8
12 files changed
+25 -24

No files matched your search

@@ -24,7 +24,7 @@ import com.volmit.config.Desc;
import com.volmit.config.Feature;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
import java.util.Collections;
@@ -44,7 +44,7 @@ public final class LootSettings implements IrisFeature {
@Desc("ADD = add on top of parent tables. REPLACE = clear parent tables, then add these. CLEAR = clear parent tables and add nothing, even if tables are listed. FALLBACK = only used when nothing else defined a table.")
private LootMode mode = LootMode.ADD;
@Ref(kind = LootTable.class)
@ResourceRef(LootTable.class)
@Desc("Add loot table registries here")
private List<String> tables = List.of();
@@ -23,7 +23,7 @@ import com.volmit.config.Desc;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
import java.util.Collections;
@@ -39,7 +39,7 @@ public final class ObjectLoot implements ObjectLootEntry {
private boolean exact = false;
@Desc("The loot table name")
@Required
@Ref(kind = LootTable.class)
@ResourceRef(LootTable.class)
private String name;
@Desc("The weight of this loot table being chosen")
@MinNumber(1)
@@ -44,8 +44,8 @@ import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Required;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
import com.volmit.noise.NoiseStyle;
import com.volmit.noise.StyledRange;
@@ -76,7 +76,7 @@ public final class ObjectPlacement {
@Required
@MinItems(1)
@Ref(kind = GeneratedObject.class)
@ResourceRef(GeneratedObject.class)
@Desc("List of objects to place")
private List<String> place = List.of();
@Desc("Rotate this objects placement")
@@ -178,11 +178,11 @@ public final class ObjectPlacement {
@Desc("This object / these objects override the following trees when they grow...")
private List<TreeOverride> trees = List.of();
@MinItems(1)
@Ref(kind = GeneratedObject.class)
@ResourceRef(GeneratedObject.class)
@Desc("List of objects to this object is allowed to collied with")
private List<String> allowedCollisions = List.of();
@MinItems(1)
@Ref(kind = GeneratedObject.class)
@ResourceRef(GeneratedObject.class)
@Desc("List of objects to this object is forbidden to collied with")
private List<String> forbiddenCollisions = List.of();
@Desc("Ignore any placement restrictions for this object")
@@ -21,13 +21,13 @@ package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
@Snippet("iris/spawn/entity-spawn")
@Desc("Represents an entity spawn during initial chunk generation")
public final class EntitySpawn {
@Ref(kind = EntityDefinition.class)
@ResourceRef(EntityDefinition.class)
@Required
@Desc("The entity")
private String entity = "";
@@ -24,7 +24,7 @@ import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
import java.util.Collections;
@@ -45,7 +45,7 @@ public final class PlacementMarker {
@Desc("If true, markers will only be placed if the block matches the mark list perfectly.")
private boolean exact = false;
@Required
@Ref(kind = SpawnMarker.class)
@ResourceRef(SpawnMarker.class)
@Desc("The marker to add")
private String marker;
@@ -20,7 +20,7 @@ package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.MinItems;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import java.util.Collections;
import java.util.List;
@@ -29,7 +29,7 @@ import java.util.List;
@Desc("Represents a marker")
public final class SpawnMarker {
@Desc("A list of spawners to add to anywhere this marker is.")
@Ref(kind = Spawner.class)
@ResourceRef(Spawner.class)
@MinItems(1)
private List<String> spawners = List.of();
@@ -26,7 +26,7 @@ import java.lang.annotation.Target;
/**
* Iris extension: says that a text option names structures of Iris's structure model by key, which Iris completes in
* studio and carries along when it exports the pack. The structure model is Iris's own resource kind, whose class a
* module cannot see, so {@code @Ref(kind = ...)} cannot name it; to another host the option is plain text.
* module cannot see, so {@code @ResourceRef} cannot name it; to another host the option is plain text.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@@ -22,7 +22,7 @@ import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import com.volmit.world.PackBiome;
import java.util.Collections;
@@ -96,7 +96,7 @@ public final class StructurePlacement {
private StructureAnchorMode anchor = StructureAnchorMode.LEGACY;
@MinItems(1)
@Ref(kind = PackBiome.class)
@ResourceRef(PackBiome.class)
@Desc("Optional cave-biome allowlist for cave anchor modes. Empty accepts the cave biome resolved at the selected anchor. Entries match by load key, including prefix matches.")
private List<String> caveBiomes = List.of();
@@ -22,7 +22,7 @@ import com.volmit.config.Level;
import com.volmit.IrisFeature;
import com.volmit.config.Desc;
import com.volmit.config.Feature;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import com.volmit.world.LinkedBiomes;
import com.volmit.world.PackBiome;
import com.volmit.resource.PackResources;
@@ -34,7 +34,7 @@ import java.util.Set;
@Desc("Registers the referenced biome with this pack's reachable biome set. It is NOT applied as a substitute under carvings; cave biomes come from the region's caveBiomes list.")
@Feature(id = "iris:carve/biome", name = "Carving biome", key = "carvingBiome", root = "biome", targets = Level.BIOME)
public final class CarvingBiomeSettings implements IrisFeature, LinkedBiomes {
@Ref(kind = PackBiome.class)
@ResourceRef(PackBiome.class)
@Desc("Registers the referenced biome with this pack's reachable biome set. It is NOT applied as a substitute under carvings; cave biomes come from the region's caveBiomes list.")
private String biome = "";
@@ -20,7 +20,7 @@ package art.arcane.iris.modules.carve;
import com.volmit.config.Desc;
import com.volmit.config.Range;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import com.volmit.world.PackBiome;
import com.volmit.config.Snippet;
import com.volmit.noise.NoiseStyle;
@@ -47,7 +47,7 @@ public final class CarvingEntry {
@Desc("Enable or disable this carving entry")
private boolean enabled = true;
@Ref(kind = PackBiome.class)
@ResourceRef(PackBiome.class)
@Desc("Cave biome to apply when world Y falls within worldYRange")
private String biome = "";
@@ -26,6 +26,7 @@ import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
import com.volmit.world.PackBiome;
import com.volmit.noise.NoiseStyle;
@@ -52,7 +53,7 @@ public final class FloatingChildBiome {
private static final NoiseStyle DEFAULT_EDGE_TAPER_VARIATION_STYLE = NoiseStyle.of("SIMPLEX").withZoom(0.18D);
private static final NoiseStyle DEFAULT_FOOTPRINT_STYLE = NoiseStyle.of("SIMPLEX");
@Ref(kind = PackBiome.class)
@ResourceRef(PackBiome.class)
@Desc("The target biome whose visual design (layers, palette, decorators, surface objects, derivative, and — when topShapeMode=BIOME — generator profile) drives the floating island. Leave empty to reuse the parent biome (self).")
private String biome = "";
@@ -24,7 +24,7 @@ import com.volmit.IrisFeature;
import com.volmit.config.Desc;
import com.volmit.config.Feature;
import com.volmit.config.MinItems;
import com.volmit.config.Ref;
import com.volmit.config.ResourceRef;
import java.util.Collections;
import java.util.List;
@@ -37,7 +37,7 @@ import java.util.List;
@Feature(id = "iris:spawn", name = "Entity spawners", key = "entitySpawners", root = "spawners", targets = {Level.DIMENSION, Level.REGION, Level.BIOME})
public final class SpawnerSettings implements IrisFeature {
@MinItems(1)
@Ref(kind = Spawner.class)
@ResourceRef(Spawner.class)
@Desc("Entity spawners to add to this area")
private List<String> spawners = List.of();