Add value types for settings (BlockSpec, NoiseStyle, StyledRange, Range, BlockPosition, Object as any JSON), host-built noise through PackResources.noise(), and VanillaStructureHook for the platform's own structures

This commit is contained in:
piexel committed 2026-10-09 14:20:10 +02:00
1 parent ef4b640867
commit 84969c74bd
28 files changed
+1012 -39

No files matched your search

@@ -0,0 +1,19 @@
package com.volmit.vanilla;
import com.volmit.resource.ResourceId;
/** A module's say over the platform's own structures. Modules register it with
* {@link com.volmit.FeatureRegistry#registerVanillaStructureHook}; the host asks every hook of the pack before the
* platform starts one of its structures in a world, and when it locates one.
*
* <p>The host asks once per world, structure and pack snapshot and keeps the answer, so a hook decides from the
* pack (its settings and resources) and never from where a start would be. Rules of several modules combine with
* {@link VanillaStructureRule#and}: any module may block the platform's starts.
*/
@FunctionalInterface
public interface VanillaStructureHook {
/** What this module wants for the platform structure {@code structure}, such as {@code minecraft:village_plains},
* in the world {@code context} describes. {@link VanillaStructureRule#GENERATE} when the module has no part in it.
*/
VanillaStructureRule rule(ResourceId structure, VanillaStructureContext context);
}