Use this file to discover all available pages before exploring further.
The IrisToolbelt class is your main entry point for working with Iris programmatically. It provides methods for world creation, world detection, pregeneration, and data access.Package:com.volmit.iris.core.tools.IrisToolbelt
public static IrisDimension getDimension(String dimension)
Parameters:
dimension - The dimension identifier (supports multiple formats):
Local pack folder name: "overworld"
GitHub repo: "GithubUsername/repository"
GitHub repo with branch: "GithubUsername/repository/branch"
Returns: The loaded IrisDimension, or null if not foundExample:
// Load from local packs folderIrisDimension dim = IrisToolbelt.getDimension("overworld");// Load from GitHub (downloads if needed)IrisDimension githubDim = IrisToolbelt.getDimension("IrisDimensions/tropical");IrisDimension branchDim = IrisToolbelt.getDimension("IrisDimensions/custom/dev");
Create a new Iris world using the builder pattern.
public static IrisCreator createWorld()
Returns: An IrisCreator builder instanceExample:
IrisAccess access = IrisToolbelt.createWorld() .name("myWorld") .dimension("overworld") .seed(69133742) .pregen(PregenTask.builder() .center(new Position2(0, 0)) // Center in REGION coords (1 region = 32x32 chunks) .radius(4) // Radius in REGIONS (4 = 9x9 region map) .build()) .create();
Here’s a comprehensive example using multiple API methods:
package com.example.plugin;import com.volmit.iris.core.tools.IrisToolbelt;import com.volmit.iris.engine.platform.PlatformChunkGenerator;import org.bukkit.World;import org.bukkit.plugin.java.JavaPlugin;public class MyIrisPlugin extends JavaPlugin { @Override public void onEnable() { // Check if a world uses Iris World world = getServer().getWorld("world"); if (IrisToolbelt.isIrisWorld(world)) { getLogger().info("World is using Iris!"); // Access the generator PlatformChunkGenerator gen = IrisToolbelt.access(world); if (gen != null) { // Get data from the engine var data = gen.getCompound().getData(); var engine = gen.getCompound().getDefaultEngine(); getLogger().info("Successfully accessed Iris engine data"); } } }}