Let /iris find look inside child biomes

Find biome, structure and object only checked the biomes a region lists
directly, so a biome that only appears as another biome's child was
reported as not being in any region.

Model used: Claude Opus 5.5
This commit is contained in:
piexel committed 2026-10-18 22:43:59 +02:00
1 parent 6c3822cdaf
commit 05eed1f6a5
2 files changed
+12 -3

No files matched your search

@@ -889,7 +889,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
default void gotoBiome(IrisBiome biome, Player player, boolean teleport) {
Set<String> regionKeys = getDimension()
.getAllRegions(this).stream()
.filter((i) -> i.getAllBiomeIds().contains(biome.getLoadKey()))
.filter((i) -> i.getAllBiomeIdsIncludingChildren(this).contains(biome.getLoadKey()))
.map(IrisRegistrant::getLoadKey)
.collect(Collectors.toSet());
Locator<IrisBiome> lb = Locator.surfaceBiome(biome.getLoadKey());
@@ -929,7 +929,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
.map(IrisRegistrant::getLoadKey)
.collect(Collectors.toSet());
Set<String> regionKeys = getDimension().getAllRegions(this).stream()
.filter((i) -> i.getAllBiomeIds().stream().anyMatch(biomeKeys::contains)
.filter((i) -> i.getAllBiomeIdsIncludingChildren(this).stream().anyMatch(biomeKeys::contains)
|| i.getJigsawStructures()
.stream()
.anyMatch((j) -> j.getStructure().equals(s.getLoadKey())))
@@ -961,7 +961,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
.map(IrisRegistrant::getLoadKey)
.collect(Collectors.toSet());
Set<String> regionKeys = getDimension().getAllRegions(this).stream()
.filter((i) -> i.getAllBiomeIds().stream().anyMatch(biomeKeys::contains)
.filter((i) -> i.getAllBiomeIdsIncludingChildren(this).stream().anyMatch(biomeKeys::contains)
|| i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s)))
.map(IrisRegistrant::getLoadKey)
.collect(Collectors.toSet());
@@ -265,6 +265,15 @@ public class IrisRegion extends IrisRegistrant implements IRare {
return b.v();
}
public KSet<String> getAllBiomeIdsIncludingChildren(DataProvider g) {
KSet<String> ids = new KSet<>();
for (IrisBiome biome : getAllBiomes(g)) {
ids.add(biome.getLoadKey());
}
return ids;
}
public KList<IrisBiome> getBiomes(DataProvider g, InferredType type) {
if (type.equals(InferredType.LAND)) {
return getRealLandBiomes(g);