Skip to main content

Overview

Iris provides a builder pattern API for creating worlds through the IrisCreator class. Access it via IrisToolbelt.createWorld().

Quick Start

import com.volmit.iris.core.tools.IrisToolbelt;
import org.bukkit.World;

// Create a basic Iris world
World world = IrisToolbelt.createWorld()
    .name("myworld")
    .dimension("overworld")
    .seed(1234L)
    .create();

IrisToolbelt

The IrisToolbelt class provides utility methods for working with Iris worlds.

Static Methods

createWorld()
IrisCreator
Returns a new IrisCreator builder instance for world creation
getDimension(String)
IrisDimension
Finds and loads a dimension by name. Automatically downloads from repositories if not found locally.Parameters:
  • dimension - Dimension folder name, or GitHub repository (e.g., “GithubUsername/repository” or “GithubUsername/repository/branch”)
Returns: IrisDimension or null if not found
isIrisWorld(World)
boolean
Checks if a world is managed by IrisParameters:
  • world - The world to check
Returns: true if the world uses Iris generation
access(World)
PlatformChunkGenerator
Gets the Iris generator interface for a worldParameters:
  • world - The world to access
Returns: PlatformChunkGenerator or null if not an Iris world

IrisCreator Builder

The IrisCreator class uses a fluent builder pattern for configuring world creation.

Builder Methods

name(String)
IrisCreator
Sets the world nameDefault: "irisworld"
dimension(String)
IrisCreator
Sets the dimension to use for generationDefault: Value from IrisSettings.get().getGenerator().getDefaultWorldType()
seed(long)
IrisCreator
Sets the world seedDefault: 1337
studio(boolean)
IrisCreator
Enables studio mode. Studio worlds are hotloadable, use dimensions from Iris/packs folder, and are deleted when unloaded.Default: false
benchmark(boolean)
IrisCreator
Enables benchmark mode for performance testingDefault: false
sender(VolmitSender)
IrisCreator
Sets a sender to receive progress updates and auto-teleport when completeDefault: Iris.getSender()
pregen(PregenTask)
IrisCreator
Configures pregeneration during world creationDefault: null (no pregeneration)

Creating the World

create()
World
Creates the world with the configured settings. Must be called from an async thread.Returns: The created Bukkit WorldThrows: IrisException if creation fails or called on main thread

Complete Example

import com.volmit.iris.core.tools.IrisToolbelt;
import com.volmit.iris.util.exceptions.IrisException;
import org.bukkit.World;

public class WorldCreationExample {
    
    public void createCustomWorld() {
        // Must run async
        CompletableFuture.runAsync(() -> {
            try {
                World world = IrisToolbelt.createWorld()
                    .name("custom_world")
                    .dimension("overworld")
                    .seed(987654321L)
                    .studio(false)  // Production world
                    .create();
                    
                System.out.println("Created world: " + world.getName());
            } catch (IrisException e) {
                e.printStackTrace();
            }
        });
    }
    
    public void createStudioWorld() {
        CompletableFuture.runAsync(() -> {
            try {
                // Studio world for development
                World studio = IrisToolbelt.createWorld()
                    .name("dev_world")
                    .dimension("custom_dimension")
                    .studio(true)  // Hotloadable, auto-deletes
                    .create();
            } catch (IrisException e) {
                e.printStackTrace();
            }
        });
    }
}

Important Notes

create() must be called from an async thread. It will throw an IrisException if called on the main server thread.
Studio worlds are automatically removed from MultiverseCore config and deleted when unloaded. They’re designed for dimension development.

Build docs developers (and LLMs) love