Blocks under the walls were classed as walls.
Fixes https://github.com/BentoBoxWorld/Greenhouses/issues/77
This commit is contained in:
parent
80c985ad7d
commit
7154877f14
|
@ -256,11 +256,12 @@ public class Greenhouse implements DataObject {
|
|||
* @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
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue