Subterrain lookup check order

- Subterrain cell lookup resolves the dimension only after the complex is present
This commit is contained in:
Brian Neumann-Fopiano committed 2026-10-22 10:55:21 -04:00
1 parent 9d9acc7a3a
commit 97c67b794b
1 file changed
+4 -1
@@ -343,8 +343,11 @@ public interface Engine extends DataProvider, Fallible, BlockUpdater, Renderer,
@BlockCoordinates
default SubterrainCell getSubterrainCell(int x, int y, int z) {
IrisComplex complex = getComplex();
if (complex == null) {
return SubterrainCell.OUTSIDE;
}
IrisDimension dimension = getDimension();
if (complex == null || dimension == null
if (dimension == null
|| !dimension.allowsSubterrainFeatures()
|| dimension.getSubterrainFeatures() == null || dimension.getSubterrainFeatures().isEmpty()) {
return SubterrainCell.OUTSIDE;