mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 22:10:18 +00:00
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:
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) {
|
default void gotoBiome(IrisBiome biome, Player player, boolean teleport) {
|
||||||
Set<String> regionKeys = getDimension()
|
Set<String> regionKeys = getDimension()
|
||||||
.getAllRegions(this).stream()
|
.getAllRegions(this).stream()
|
||||||
.filter((i) -> i.getAllBiomeIds().contains(biome.getLoadKey()))
|
.filter((i) -> i.getAllBiomeIdsIncludingChildren(this).contains(biome.getLoadKey()))
|
||||||
.map(IrisRegistrant::getLoadKey)
|
.map(IrisRegistrant::getLoadKey)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
Locator<IrisBiome> lb = Locator.surfaceBiome(biome.getLoadKey());
|
Locator<IrisBiome> lb = Locator.surfaceBiome(biome.getLoadKey());
|
||||||
@@ -929,7 +929,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
|||||||
.map(IrisRegistrant::getLoadKey)
|
.map(IrisRegistrant::getLoadKey)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
Set<String> regionKeys = getDimension().getAllRegions(this).stream()
|
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()
|
|| i.getJigsawStructures()
|
||||||
.stream()
|
.stream()
|
||||||
.anyMatch((j) -> j.getStructure().equals(s.getLoadKey())))
|
.anyMatch((j) -> j.getStructure().equals(s.getLoadKey())))
|
||||||
@@ -961,7 +961,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
|||||||
.map(IrisRegistrant::getLoadKey)
|
.map(IrisRegistrant::getLoadKey)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
Set<String> regionKeys = getDimension().getAllRegions(this).stream()
|
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)))
|
|| i.getObjects().stream().anyMatch((f) -> f.getPlace().contains(s)))
|
||||||
.map(IrisRegistrant::getLoadKey)
|
.map(IrisRegistrant::getLoadKey)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|||||||
@@ -265,6 +265,15 @@ public class IrisRegion extends IrisRegistrant implements IRare {
|
|||||||
return b.v();
|
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) {
|
public KList<IrisBiome> getBiomes(DataProvider g, InferredType type) {
|
||||||
if (type.equals(InferredType.LAND)) {
|
if (type.equals(InferredType.LAND)) {
|
||||||
return getRealLandBiomes(g);
|
return getRealLandBiomes(g);
|
||||||
|
|||||||
Reference in new issue
Block a user