diff --git a/pom.xml b/pom.xml
index bdafbf5..eb82570 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
io.github.totemo
Doppelganger
- 1.1.0
+ 1.1.1
jar
Doppelganger
Provides custom, summonable mobs that are reminiscent of the built-in golem types.
diff --git a/src/io/github/totemo/doppelganger/CreatureShape.java b/src/io/github/totemo/doppelganger/CreatureShape.java
index 151c4e6..2b4c030 100644
--- a/src/io/github/totemo/doppelganger/CreatureShape.java
+++ b/src/io/github/totemo/doppelganger/CreatureShape.java
@@ -324,7 +324,8 @@ public boolean hasBorder(Location loc) {
int x = loc.getBlockX() + offset.getBlockX();
int y = loc.getBlockY() + offset.getBlockY();
int z = loc.getBlockZ() + offset.getBlockZ();
- if (loc.getWorld().getBlockAt(x, y, z).getType() != Material.AIR) {
+ Material blockType = loc.getWorld().getBlockAt(x, y, z).getType();
+ if (blockType != Material.AIR && blockType != Material.CAVE_AIR) {
return false;
}
}
@@ -383,11 +384,9 @@ protected void computeBorder() {
++maxZ;
// Iterate over all offset coordinates in the bounded volume adding an
- // entry
- // to _border if the corresponding offset is not in _offsets. Iteration
- // proceeds from the ground up on the basis that ground obstacles offer
- // the
- // earliest failure exit at creature spawn time.
+ // entry to _border if the corresponding offset is not in _offsets.
+ // Iteration proceeds from the ground up on the basis that ground
+ // obstacles offer the earliest failure exit at creature spawn time.
for (int y = minY; y <= maxY; ++y) {
for (int x = minX; x <= maxX; ++x) {
for (int z = minZ; z <= maxZ; ++z) {