Batch 4 of the API review: api and host artifacts, ModuleLoadException

- Split into Gradle subprojects api (com.volmit:iris-api) and host
  (com.volmit:iris-host). ExposedPackages never exposes com.volmit.host.
- One unchecked ModuleLoadException(moduleId, origin, message, cause)
  for every load error; messages unchanged.
- PlacementAccess.set(x, y, z, state) next to set(PlacedBlock).
- BlockState: precompiled patterns, withProperty copies once.
- Mantle and layer views are made once per invocation.
- Hunk getters are width(), height(), depth().
- Held types and host types are deprecated for removal at the cut-over.
- Docs: artifacts, one-or-more modules per jar, no option shorthand.
This commit is contained in:
piexel committed 2026-10-24 04:19:39 +02:00
1 parent 3a307b5b8e
commit b6c2992752
309 files changed
+547 -178

No files matched your search

@@ -0,0 +1,29 @@
package com.volmit.service;
import com.volmit.resource.ResourceId;
import com.volmit.world.PackWorld;
import java.util.Optional;
/**
* Which biome a module puts underground. The host places the cave biome of a position itself, from the biome its regions give
* the column and its terrain; this service tells it where a module overrides that and where a cave biome gives way to the
* surface's. A pack has one provider, since two modules deciding the biome of the same cave could not both be right.
*/
@Service(Providers.ONE)
public interface CaveBiomes {
/**
* The pack biome the module puts at the position whatever the regions say, such as a band of the deep dark. Empty where it
* overrides nothing.
*
* @param y the height above the dimension's bottom
* @return the biome's pack id
*/
Optional<ResourceId> overriddenBiome(PackWorld world, int x, int y, int z);
/**
* How many blocks below the surface a position must lie for the pack biome {@code biome} to be the cave biome there;
* nearer the surface the surface's biome is. 0 for a biome that has no such limit. The answer depends on the world and the
* biome only: the host asks once per biome and keeps it while the world runs.
*/
int minDepthBelowSurface(PackWorld world, ResourceId biome);
}