mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
getFromID -> getByID
This commit is contained in:
@@ -214,9 +214,9 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
||||
public @Nullable
|
||||
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
|
||||
return new BukkitChunkGeneratorWrapper(generatorMap.computeIfAbsent(worldName, name -> {
|
||||
ConfigPack pack = platform.getConfigRegistry().getIDMatches(id).orElseThrow(
|
||||
ConfigPack pack = platform.getConfigRegistry().getByID(id).orElseThrow(
|
||||
() -> new IllegalArgumentException("No such config pack \"" + id + "\""));
|
||||
return pack.getGeneratorProvider().newInstance(pack);
|
||||
}), platform.getRawConfigRegistry().getIDMatches(id).orElseThrow(), platform.getWorldHandle().air());
|
||||
}), platform.getRawConfigRegistry().getByID(id).orElseThrow(), platform.getWorldHandle().air());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public final class TerraCLI {
|
||||
CLIPlatform platform = new CLIPlatform();
|
||||
platform.getEventManager().callEvent(new PlatformInitializationEvent());
|
||||
|
||||
ConfigPack generate = platform.getConfigRegistry().getIDMatches("OVERWORLD").orElseThrow(); // TODO: make this a cli argument
|
||||
ConfigPack generate = platform.getConfigRegistry().getByID("OVERWORLD").orElseThrow(); // TODO: make this a cli argument
|
||||
|
||||
CLIWorld world = new CLIWorld(2, 2, 384, -64, generate);
|
||||
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ public abstract class GeneratorOptionsMixin {
|
||||
prop = prop.substring(prop.indexOf(":") + 1);
|
||||
|
||||
String finalProp = prop;
|
||||
ConfigPack config = main.getConfigRegistry().getFromID(prop).orElseThrow(() -> new IllegalArgumentException(
|
||||
ConfigPack config = main.getConfigRegistry().getByID(prop).orElseThrow(() -> new IllegalArgumentException(
|
||||
"No such pack " + finalProp));
|
||||
|
||||
cir.setReturnValue(
|
||||
|
||||
Reference in New Issue
Block a user