Merge branch 'v3/lane-engine' into v3/lane-studio

This commit is contained in:
piexel committed 2026-11-10 13:51:55 +01:00
commit 1e44f45a34
95 files changed
+2134 -1186

No files matched your search

@@ -91,7 +91,7 @@ final class ModdedCommandSuggestions {
try {
Engine engine = IrisModdedCommands.engineFor(context.getSource().getLevel());
if (engine != null) {
return SharedSuggestionProvider.suggest(engine.getDimension().getRegions(), builder);
return SharedSuggestionProvider.suggest(engine.getDimension().getRegionKeys(), builder);
}
} catch (Throwable e) {
warnTabFailure("region keys", context.getSource(), e);
@@ -788,7 +788,7 @@ public final class ModdedStudioCommands {
int diameter = radius * 2;
int totalTasks = diameter * diameter;
KMap<String, AtomicInteger> counts = new KMap<>();
engine.getDimension().getRegions().forEach((String key) -> counts.put(key, new AtomicInteger(0)));
engine.getDimension().getRegionKeys().forEach((String key) -> counts.put(key, new AtomicInteger(0)));
// finally-scoped: a throw mid-scan previously leaked the sampler's whole
// ForkJoinPool (close() is the only thing that shuts it down).
MultiBurst burst = new MultiBurst("Region Sampler");
@@ -803,9 +803,7 @@ public final class ModdedStudioCommands {
burst.close();
}
server.execute(() -> counts.forEach((String key, AtomicInteger count) -> {
IrisRegion region = engine.getData().getRegionLoader().load(key);
String rarity = region == null ? "?" : String.valueOf(region.getRarity());
IrisModdedCommands.ok(source, IrisLanguage.plain(ModdedCommandMessages.MODDED_STUDIO_COMMANDS_RARITY, MessageArgument.untrusted("key", key), MessageArgument.untrusted("rarity", rarity), MessageArgument.untrusted("value", Form.f((double) count.get() / totalTasks * 100, 2))));
IrisModdedCommands.ok(source, IrisLanguage.plain(ModdedCommandMessages.MODDED_STUDIO_COMMANDS_RARITY, MessageArgument.untrusted("key", key), MessageArgument.untrusted("rarity", engine.getDimension().getRegionWeight(key)),MessageArgument.untrusted("value", Form.f((double) count.get() / totalTasks * 100, 2))));
}));
} catch (Throwable e) {
ModdedIrisLog.error("Iris region sampling failed", e);