mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
VanillaStructures service replaces the vanilla structure hook; fit values leave the API
The hook's rule, starts and setup move to a @Service(ALL) VanillaStructures with default methods. adjustment and the fit value types (VanillaStructureAdjustment, VanillaStructureFit, StructureTerrain, StructureStilts, YBand) are gone: modules keep their fit vocabulary as settings. New neutral questions: shift (vertical move of a platform start), reach (how far around its pieces a module changes terrain for a start), beforePieces/afterPieces around the platform placing a chunk's starts. StructureFit hands a module the chunk's starts (pieces, junctions, processed template cells, template columns, legacy template air, platform terrain adaptation and step, the start's memo), the chunk's live blocks as a BlockAccess, the surface heights and the platform's natural block. VanillaStructureStart carries a StartMemo instead of a fit; the host keeps it with the start's ownership record.
This commit is contained in:
1 parent
b82c292dcb
commit
ee7bb11790
25 files changed
+555
-715
No files matched your search
@@ -13,7 +13,6 @@ import com.volmit.resource.ResourceId;
|
||||
import com.volmit.resource.ResourceKind;
|
||||
import com.volmit.service.Providers;
|
||||
import com.volmit.validation.Validator;
|
||||
import com.volmit.vanilla.VanillaStructureHook;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -48,7 +47,6 @@ public final class ModuleRegistry implements FeatureRegistry {
|
||||
private final List<ValidatorRegistration> validators = new ArrayList<>();
|
||||
private final List<LifecycleRegistration> lifecycles = new ArrayList<>();
|
||||
private final List<ServiceRegistration> services = new ArrayList<>();
|
||||
private final List<VanillaStructureHookRegistration> vanillaStructureHooks = new ArrayList<>();
|
||||
private final Set<String> reservedFolders;
|
||||
private final List<DiscoveredModule> registered = new ArrayList<>();
|
||||
private FeatureCatalog catalog;
|
||||
@@ -175,14 +173,6 @@ public final class ModuleRegistry implements FeatureRegistry {
|
||||
services.add(added);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerVanillaStructureHook(VanillaStructureHook hook) {
|
||||
checkOpen();
|
||||
Objects.requireNonNull(hook, "hook");
|
||||
requireRegistering("Vanilla structure hook " + hook);
|
||||
vanillaStructureHooks.add(new VanillaStructureHookRegistration(hook, registering));
|
||||
}
|
||||
|
||||
/** Catalogs a settings type named by a stage's when(...), whose owner {@link StageGraphBuilder}
|
||||
* has checked. Several stages, and the owner's {@link #registerSettings}, may name one type. Call
|
||||
* it after every module has registered, so the owner is known.
|
||||
@@ -204,7 +194,7 @@ public final class ModuleRegistry implements FeatureRegistry {
|
||||
public FeatureCatalog freeze() {
|
||||
if (catalog == null) {
|
||||
catalog = new FeatureCatalog(settings, objects, mantle, resourceKinds.values(), heldTypes.values(),
|
||||
validators, lifecycles, services, vanillaStructureHooks);
|
||||
validators, lifecycles, services);
|
||||
}
|
||||
return catalog;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user