mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-14 19:56:19 +00:00
refactor some stuff to use new errors
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package com.dfsek.terra.cli;
|
||||
|
||||
import com.dfsek.seismic.type.vector.Vector2Int;
|
||||
|
||||
import com.dfsek.terra.api.error.Invalid;
|
||||
|
||||
import net.querz.mca.MCAUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -51,7 +54,7 @@ public final class TerraCLI implements Callable<Integer> {
|
||||
CLIPlatform platform = new CLIPlatform();
|
||||
platform.getEventManager().callEvent(new PlatformInitializationEvent());
|
||||
|
||||
ConfigPack generate = platform.getConfigRegistry().getByID(pack).collectThrow(RuntimeException::new);
|
||||
ConfigPack generate = platform.getConfigRegistry().getByID(pack).collectThrow(Invalid::toIllegal);
|
||||
|
||||
CLIWorld world = new CLIWorld(size, seed, maxHeight, minHeight, generate, noSave);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user