From a1c27c632b4064a2b5bf4a99c905d6353e511a4d Mon Sep 17 00:00:00 2001 From: piexel Date: Mon, 12 Oct 2026 02:04:00 +0200 Subject: [PATCH] ReadOnlyMantle.host: the host's mantle behind a chunk stage's read-only view, for the host's own extensions --- src/main/java/com/volmit/host/ReadOnlyMantle.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/volmit/host/ReadOnlyMantle.java b/src/main/java/com/volmit/host/ReadOnlyMantle.java index 577e41c60..191790cc3 100644 --- a/src/main/java/com/volmit/host/ReadOnlyMantle.java +++ b/src/main/java/com/volmit/host/ReadOnlyMantle.java @@ -11,7 +11,7 @@ import com.volmit.mantle.MantleVisitor; /** The mantle as chunk stages see it: reads pass through, every write throws. The mantle pipeline has * finished around the chunk by then, and its neighbors may already be generated. */ -final class ReadOnlyMantle implements Mantle { +public final class ReadOnlyMantle implements Mantle { private static final String READ_ONLY = "Chunk stages read the mantle but do not write it;" + " write it from a mantle stage (Stage.mantle), which runs before the chunks it reaches"; @@ -21,6 +21,13 @@ final class ReadOnlyMantle implements Mantle { this.mantle = mantle; } + /** The host's mantle behind this view: for a host's own extensions of {@link Mantle}, such as a built-in facade that + * reaches the platform's storage. A module that writes through it breaks the promise this view makes to chunk stages. + */ + public Mantle host() { + return mantle; + } + @Override public BlockBox bounds() { return mantle.bounds();