Skip to content

Commit 7154877

Browse files
committed
Blocks under the walls were classed as walls.
Fixes #77
1 parent 80c985a commit 7154877

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/java/world/bentobox/greenhouses/data/Greenhouse.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,12 @@ public Map<Material, Integer> getMissingBlocks() {
256256
* @return true if wall or roof block
257257
*/
258258
public boolean isRoofOrWallBlock(Location l) {
259-
return ((l.getBlockY() == getCeilingHeight() - 1)
260-
|| l.getBlockX() == (int)getBoundingBox().getMinX()
261-
|| l.getBlockX() == (int)getBoundingBox().getMaxX() - 1
262-
|| l.getBlockZ() == (int)getBoundingBox().getMinZ()
263-
|| l.getBlockZ() == (int)getBoundingBox().getMaxZ() - 1
264-
);
259+
return (l.getBlockY() > this.getFloorHeight()
260+
&& ((l.getBlockY() == getCeilingHeight() - 1)
261+
|| l.getBlockX() == (int)getBoundingBox().getMinX()
262+
|| l.getBlockX() == (int)getBoundingBox().getMaxX() - 1
263+
|| l.getBlockZ() == (int)getBoundingBox().getMinZ()
264+
|| l.getBlockZ() == (int)getBoundingBox().getMaxZ() - 1
265+
));
265266
}
266267
}

0 commit comments

Comments
 (0)