Skip to content

Commit

Permalink
Async greenhouse building
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 17, 2021
1 parent baa9338 commit cd5a0ce
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 279 deletions.
13 changes: 10 additions & 3 deletions src/main/java/world/bentobox/greenhouses/data/Greenhouse.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.util.BoundingBox;
import org.bukkit.util.Vector;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;

Expand Down Expand Up @@ -50,6 +51,12 @@ public class Greenhouse implements DataObject {
*/
public Greenhouse() {}

/**
* Create a greenhouse
* @param world - world
* @param walls - wall object
* @param ceilingHeight - ceiling height
*/
public Greenhouse(World world, Walls walls, int ceilingHeight) {
this.location = new Location(world, walls.getMinX(), walls.getFloor(), walls.getMinZ());
Location location2 = new Location(world, walls.getMaxX() + 1D, ceilingHeight + 1D, walls.getMaxZ() + 1D);
Expand Down Expand Up @@ -147,10 +154,10 @@ public void setOriginalBiome(Biome originalBiome) {
}

/**
* @param roofHopperLocation the roofHopperLocation to set
* @param v the roofHopperLocation to set
*/
public void setRoofHopperLocation(Location roofHopperLocation) {
this.roofHopperLocation = roofHopperLocation;
public void setRoofHopperLocation(Vector v) {
this.roofHopperLocation = v.toLocation(getWorld());
}

/**
Expand Down

0 comments on commit cd5a0ce

Please sign in to comment.