9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-19 15:09:18 +00:00

add scripts for engine setup

This commit is contained in:
Julian Krings
2025-07-07 21:06:36 +02:00
parent 2929a1f0a7
commit c35c858eee
2 changed files with 5 additions and 0 deletions

View File

@@ -173,6 +173,7 @@ public class IrisEngine implements Engine {
effects = new IrisEngineEffects(this);
hash32 = new CompletableFuture<>();
setupMode();
getDimension().getSetupScripts().forEach(execution::execute);
J.a(this::computeBiomeMaxes);
J.a(() -> {
File[] roots = getData().getLoaders()

View File

@@ -250,6 +250,10 @@ public class IrisDimension extends IrisRegistrant {
@Desc("A list of globally applied pre-processors")
@ArrayType(type = IrisPreProcessors.class)
private KList<IrisPreProcessors> globalPreProcessors = new KList<>();
@Desc("A list of scripts executed on engine setup")
@RegistryListResource(IrisScript.class)
@ArrayType(type = String.class, min = 1)
private KList<String> setupScripts = new KList<>();
public int getMaxHeight() {
return (int) getDimensionHeight().getMax();