Iris packages and bundles the built-ins jar; this build copies it

The built-ins jar is now packaged and checked by Iris's
:core:builtinModulesJar from core's own compiled classes and bundled
into the plugin, so it always fits the Iris it ships with.
builtinModulesJar here runs that task and copies the jar to build/libs;
the packaging, entry file and check tasks moved to Iris, with the
VolmLib include build they needed.

SurfaceFitting (structure fitting, still Iris's) has its own outset
instead of calling IrisObjectVacuum, which lives in the jar only: the
plugin no longer carries the jar's classes outside the jar.
This commit is contained in:
piexel committed 2026-10-22 09:45:37 +02:00
1 parent f06908a20f
commit 242ca3e323
4 files changed
+38 -140

No files matched your search

@@ -19,7 +19,6 @@
package art.arcane.iris.engine.framework.structure.fit;
import art.arcane.iris.builtin.structure.StructureTerrainMode;
import art.arcane.iris.engine.object.placement.IrisObjectVacuum;
import com.volmit.ModuleLog;
import com.volmit.block.BlockState;
import com.volmit.vanilla.DecorationStep;
@@ -123,6 +122,17 @@ final class SurfaceFitting {
return resolveSurface(anchors, worldX, worldZ, originalY).targetY();
}
/** How far {@code value} lies outside {@code [low, high]}; 0 inside. Iris's vacuum measures footprints the same way. */
private static int outset(int value, int low, int high) {
if (value < low) {
return low - value;
}
if (value > high) {
return value - high;
}
return 0;
}
private static SurfaceResolution resolveSurface(List<SurfaceAnchor> anchors, int worldX, int worldZ, int originalY) {
int localTargetY = originalY;
SurfaceAnchor selectedLocal = null;
@@ -130,8 +140,8 @@ final class SurfaceFitting {
long weightedTargetY = 0L;
long maximumInfluence = 0L;
for (SurfaceAnchor anchor : anchors) {
int outX = IrisObjectVacuum.outset(worldX, anchor.minX(), anchor.maxX());
int outZ = IrisObjectVacuum.outset(worldZ, anchor.minZ(), anchor.maxZ());
int outX = outset(worldX, anchor.minX(), anchor.maxX());
int outZ = outset(worldZ, anchor.minZ(), anchor.maxZ());
boolean containsColumn = outX == 0 && outZ == 0;
long distanceSquared = (long) outX * outX + (long) outZ * outZ;
long radiusSquared = (long) SURFACE_TERRAIN_RADIUS * SURFACE_TERRAIN_RADIUS;