Skip to content

Commit

Permalink
Version 1.1.1.
Browse files Browse the repository at this point in the history
Count CAVE_AIR (Minecraft 1.13) as equivalent to AIR
for the purposes of checking the border.
  • Loading branch information
totemo committed Aug 28, 2019
1 parent dabebb9 commit 658ebb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.totemo</groupId>
<artifactId>Doppelganger</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<packaging>jar</packaging>
<name>Doppelganger</name>
<description>Provides custom, summonable mobs that are reminiscent of the built-in golem types.</description>
Expand Down
11 changes: 5 additions & 6 deletions src/io/github/totemo/doppelganger/CreatureShape.java
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 658ebb9

Please sign in to comment.