9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-19 15:09:18 +00:00

cleanup some array types for json schema generation

This commit is contained in:
Julian Krings
2025-09-02 12:28:54 +02:00
parent 43131ed8f6
commit 34874080e7
6 changed files with 13 additions and 8 deletions

View File

@@ -220,11 +220,15 @@ public class IrisCarveModifier extends EngineAssignedModifier<BlockData> {
break;
}
if (!B.isSolid(output.get(rx, zone.floor - i - 1, rz))) {
BlockData b = blocks.get(i);
BlockData down = output.get(rx, zone.ceiling + i - 1, rz);
if (!B.isSolid(down)) {
continue;
}
if (B.isOre(output.get(rx, zone.floor - i - 1, rz))) {
if (B.isOre(down)) {
output.set(rx, zone.ceiling + i - 1, rz, B.toDeepSlateOre(down, b));
continue;
}

View File

@@ -143,14 +143,14 @@ public class IrisBiome extends IrisRegistrant implements IRare {
@Desc("The default wall if iris decides to place a wall higher than 2 blocks (steep hills or possibly cliffs)")
private IrisBiomePaletteLayer wall = new IrisBiomePaletteLayer().zero();
@Required
@ArrayType(min = 1, type = IrisBiomePaletteLayer.class)
@ArrayType(type = IrisBiomePaletteLayer.class)
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
private KList<IrisBiomePaletteLayer> layers = new KList<IrisBiomePaletteLayer>().qadd(new IrisBiomePaletteLayer());
@Required
@ArrayType(min = 1, type = IrisBiomePaletteLayer.class)
@ArrayType(type = IrisBiomePaletteLayer.class)
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
private KList<IrisBiomePaletteLayer> caveCeilingLayers = new KList<IrisBiomePaletteLayer>().qadd(new IrisBiomePaletteLayer());
@ArrayType(min = 1, type = IrisBiomePaletteLayer.class)
@ArrayType(type = IrisBiomePaletteLayer.class)
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
private KList<IrisBiomePaletteLayer> seaLayers = new KList<>();
@ArrayType(min = 1, type = IrisDecorator.class)

View File

@@ -21,6 +21,7 @@ package com.volmit.iris.engine.object;
import com.volmit.iris.Iris;
import com.volmit.iris.engine.object.annotations.ArrayType;
import com.volmit.iris.engine.object.annotations.Desc;
import com.volmit.iris.engine.object.annotations.Required;
import com.volmit.iris.engine.object.annotations.Snippet;
import com.volmit.iris.util.collection.KList;
import lombok.Data;
@@ -37,6 +38,7 @@ import org.bukkit.World;
@Data
public class IrisCommand {
@Required
@ArrayType(min = 1, type = String.class)
@Desc("List of commands. Iris replaces {x} {y} and {z} with the location of the entity spawn")
private KList<String> commands = new KList<>();

View File

@@ -33,6 +33,7 @@ import org.bukkit.entity.Player;
@Desc("Represents a casting location for a command")
@Data
public class IrisCommandRegistry {
@Required
@ArrayType(min = 1, type = IrisCommand.class)
@Desc("Run commands, at the exact location of the player")
private KList<IrisCommand> rawCommands = new KList<>();

View File

@@ -146,7 +146,6 @@ public class IrisEffect {
@MinNumber(1)
@Desc("The chance is 1 in CHANCE per interval")
private int chance = 50;
@ArrayType(min = 1, type = IrisCommandRegistry.class)
@Desc("Run commands, with configurable location parameters")
private IrisCommandRegistry commandRegistry = null;

View File

@@ -50,8 +50,7 @@ public class IrisJigsawPiece extends IrisRegistrant {
@Desc("The object this piece represents")
private String object = "";
@Required
@ArrayType(type = IrisJigsawPieceConnector.class, min = 1)
@ArrayType(type = IrisJigsawPieceConnector.class)
@Desc("The connectors this object contains")
private KList<IrisJigsawPieceConnector> connectors = new KList<>();