Procedural object settings as module-owned IrisApi types: coral, crystal, formation, fungus, ruin and the tree profile classes; ResolvedProceduralPlacement bakes and places them

This commit is contained in:
piexel committed 2026-10-09 22:31:08 +02:00
1 parent feaa1e88c4
commit 1f3e1c9aba
62 files changed
+2309 -1003

No files matched your search

@@ -0,0 +1,60 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.prepare;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
/** How an object is turned around each axis, written as a placement's {@code rotation}. */
@Snippet("object-rotator")
@Desc("Configures rotation for iris")
public final class ObjectRotation {
private static final double QUARTER_TURN_DEGREES = 90;
@Desc("If this rotator is enabled or not")
private boolean enabled = true;
@Desc("The x axis rotation")
private AxisRotationClamp xAxis = new AxisRotationClamp();
@Desc("The y axis rotation")
private AxisRotationClamp yAxis = AxisRotationClamp.of(true, false, 0, 0, QUARTER_TURN_DEGREES);
@Desc("The z axis rotation")
private AxisRotationClamp zAxis = new AxisRotationClamp();
public ObjectRotation() {
}
public boolean enabled() {
return enabled;
}
public AxisRotationClamp xAxis() {
return xAxis;
}
public AxisRotationClamp yAxis() {
return yAxis;
}
public AxisRotationClamp zAxis() {
return zAxis;
}
}
@@ -0,0 +1,70 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.prepare;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.Snippet;
/** How far an object is shifted from where it would be placed, written as a placement's {@code translate}. */
@Snippet("object-translator")
@Desc("Translate objects")
public final class ObjectTranslate {
@MinNumber(-128)
@MaxNumber(128)
@Desc("The x shift in blocks")
private int x = 0;
@Required
@MinNumber(-128)
@MaxNumber(128)
@Desc("The y shift in blocks")
private int y = 0;
@MinNumber(-128)
@MaxNumber(128)
@Desc("Adds an additional amount of height randomly (translateY + rand(0 - yRandom))")
private int yRandom = 0;
@MinNumber(-128)
@MaxNumber(128)
@Desc("The z shift in blocks")
private int z = 0;
public ObjectTranslate() {
}
public int x() {
return x;
}
public int y() {
return y;
}
public int yRandom() {
return yRandom;
}
public int z() {
return z;
}
}