From eb1a244114ade8971d4d3acd6bbeee85df07831f Mon Sep 17 00:00:00 2001 From: piexel Date: Sun, 18 Oct 2026 22:46:04 +0200 Subject: [PATCH] Let /iris find search the focus region a dimension is locked to With focusRegion set the world only generates that region, but find checked the dimension's region list, which the focus region does not have to be part of, so everything in it was reported as missing. Model used: Claude Opus 5.5 --- .../volmit/iris/engine/framework/Engine.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/volmit/iris/engine/framework/Engine.java b/core/src/main/java/com/volmit/iris/engine/framework/Engine.java index 70e928b95..d0d43009d 100644 --- a/core/src/main/java/com/volmit/iris/engine/framework/Engine.java +++ b/core/src/main/java/com/volmit/iris/engine/framework/Engine.java @@ -886,9 +886,17 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat return pr; } + default KList getGeneratedRegions() { + IrisRegion focusRegion = getComplex().getFocusRegion(); + if (focusRegion != null) { + return new KList<>(focusRegion); + } + + return getDimension().getAllRegions(this); + } + default void gotoBiome(IrisBiome biome, Player player, boolean teleport) { - Set regionKeys = getDimension() - .getAllRegions(this).stream() + Set regionKeys = getGeneratedRegions().stream() .filter((i) -> i.getAllBiomeIdsIncludingChildren(this).contains(biome.getLoadKey())) .map(IrisRegistrant::getLoadKey) .collect(Collectors.toSet()); @@ -928,7 +936,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat .anyMatch((j) -> j.getStructure().equals(s.getLoadKey()))) .map(IrisRegistrant::getLoadKey) .collect(Collectors.toSet()); - Set regionKeys = getDimension().getAllRegions(this).stream() + Set regionKeys = getGeneratedRegions().stream() .filter((i) -> i.getAllBiomeIdsIncludingChildren(this).stream().anyMatch(biomeKeys::contains) || i.getJigsawStructures() .stream() @@ -960,7 +968,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat .filter((i) -> i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s))) .map(IrisRegistrant::getLoadKey) .collect(Collectors.toSet()); - Set regionKeys = getDimension().getAllRegions(this).stream() + Set regionKeys = getGeneratedRegions().stream() .filter((i) -> i.getAllBiomeIdsIncludingChildren(this).stream().anyMatch(biomeKeys::contains) || i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s))) .map(IrisRegistrant::getLoadKey) @@ -985,7 +993,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat } default void gotoRegion(IrisRegion r, Player player, boolean teleport) { - if (!getDimension().getRegions().contains(r.getLoadKey())) { + if (getGeneratedRegions().stream().noneMatch(i -> i.getLoadKey().equals(r.getLoadKey()))) { player.sendMessage(C.RED + r.getName() + " is not defined in the dimension!"); return; }