Skip to content

Commit

Permalink
Blocks under the walls were classed as walls.
Browse files Browse the repository at this point in the history
Fixes #77
  • Loading branch information
tastybento committed Apr 9, 2021
1 parent 80c985a commit 7154877
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/world/bentobox/greenhouses/data/Greenhouse.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,12 @@ public Map<Material, Integer> getMissingBlocks() {
* @return true if wall or roof block
*/
public boolean isRoofOrWallBlock(Location l) {
return ((l.getBlockY() == getCeilingHeight() - 1)
|| l.getBlockX() == (int)getBoundingBox().getMinX()
|| l.getBlockX() == (int)getBoundingBox().getMaxX() - 1
|| l.getBlockZ() == (int)getBoundingBox().getMinZ()
|| l.getBlockZ() == (int)getBoundingBox().getMaxZ() - 1
);
return (l.getBlockY() > this.getFloorHeight()
&& ((l.getBlockY() == getCeilingHeight() - 1)
|| l.getBlockX() == (int)getBoundingBox().getMinX()
|| l.getBlockX() == (int)getBoundingBox().getMaxX() - 1
|| l.getBlockZ() == (int)getBoundingBox().getMinZ()
|| l.getBlockZ() == (int)getBoundingBox().getMaxZ() - 1
));
}
}

0 comments on commit 7154877

Please sign in to comment.