-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64fcefe
commit f7796d7
Showing
5 changed files
with
59 additions
and
81 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
src/main/java/world/bentobox/greenhouses/greenhouse/MinMaxXZ.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package world.bentobox.greenhouses.greenhouse; | ||
|
||
/** | ||
* Holds min, max x and z coords and provides the area | ||
* @author tastybento | ||
* | ||
*/ | ||
public abstract class MinMaxXZ { | ||
|
||
protected int minX; | ||
protected int maxX; | ||
protected int minZ; | ||
protected int maxZ; | ||
|
||
/** | ||
* @return the minX | ||
*/ | ||
public int getMinX() { | ||
return minX; | ||
} | ||
|
||
/** | ||
* @return the maxX | ||
*/ | ||
public int getMaxX() { | ||
return maxX; | ||
} | ||
|
||
/** | ||
* @return the minZ | ||
*/ | ||
public int getMinZ() { | ||
return minZ; | ||
} | ||
|
||
/** | ||
* @return the maxZ | ||
*/ | ||
public int getMaxZ() { | ||
return maxZ; | ||
} | ||
|
||
/** | ||
* @return the area | ||
*/ | ||
public int getArea() { | ||
return (maxX - minX) * (maxZ - minZ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters