Skip to content

Conduit config

ConduitConfig loads config/conduit.toml once at startup. The format is a flat key = value subset — no tables, no arrays, # for comments. Every value is typed in Java, and every getter returns a baked-in default when the file is missing or the key is absent, so the engine is fully functional without a config file.

The class is named ConduitConfig in the source (inventory listed it as EngineConfig; the engine rebrand renamed it).

  • You want operators to tweak engine-wide numbers (pool size, staging-box dimensions, tick budget) without recompiling.
  • You’re reading the engine defaults from your own mod (e.g. defaultStagingHalf() to pre-fill a config screen).
package me.zlex.conduit.config;
public final class ConduitConfig {
public static synchronized void load(); // called by ConduitCoreMod.onInitialize
public static int poolSize(); // default 8
public static boolean autoHubOnJoin(); // default true
public static int defaultStagingHalf(); // default 8
public static int defaultStagingHeight(); // default 4
public static int hubSpawnX(); // default 0
public static int hubSpawnY(); // default 65
public static int hubSpawnZ(); // default 0
public static int tickBudgetUs(); // default 1000
}

Sample config/conduit.toml:

conduit.toml
pool_size = 8
auto_hub_on_join = true
default_staging_half = 8
default_staging_height = 4
hub_spawn_x = 0
hub_spawn_y = 65
hub_spawn_z = 0
tick_budget_us = 1000
import me.zlex.conduit.config.ConduitConfig;
import me.zlex.conduit.game.StagingConfig;
public final class MyGameStaging {
/** Take the engine default and grow the ceiling for a tall meeting room. */
public static StagingConfig stagingFor() {
int half = ConduitConfig.defaultStagingHalf();
int ceiling = ConduitConfig.defaultStagingHeight() + 4;
return new StagingConfig(half, ceiling);
}
}
  • The loader is called by ConduitCoreMod.onInitialize — you don’t usually invoke load() yourself.
  • Malformed lines log a warning via ConduitLog.CONFIG and are skipped — bad TOML doesn’t break the server.
  • Adding a new key means a new getter on ConduitConfig; the file format is just the storage layer.