# Greenhouses

A **Greenhouse** in InfiniteCrops is a specialized structure that simulates a controlled environment for your custom crops, bushes, or money trees. By placing a greenhouse item (which spawns a schematic), you can **override** environmental conditions such as biome temperature or dryness. Crops inside the greenhouse can **thrive** irrespective of harsh deserts, frigid tundras, or other external factors.

***

#### 1. What is a Greenhouse?

A Greenhouse is essentially a **mini-region** you can place in your world. It is defined by:

1. A **schematic** (the building structure itself).
2. An **internal region** bounding box (pos1 & pos2).
3. A **controller block**—the “heart” of your greenhouse.

Crops, bushes, or money trees inside this region can ignore normal biome or altitude effects, letting them **grow faster** or at a consistent rate.

***

#### 2. Configuration Overview

Greenhouse items and definitions live in **`greenhouse.yml`** (by default). Each greenhouse has:

* **`name`**: The internal name of the greenhouse item (e.g. `"SmallGreenhouse"`).
* **`schematic`**: The schematic file name (e.g. `"smallest"`) to spawn when placed.
* **`item`**: The display material, name, lore, etc., used in the greenhouse item.
* **`controller_material`**: The block used as a “controller.” This is often a single block inside the schematic that players can break to remove or salvage the greenhouse.

**features/greenhouse.yml**

```yaml
small_greenhouse:
  name: "SmallGreenhouse"
  schematic: "smallest"
  item:
    material: "GLASS"
    displayName: "&aSmall Greenhouse"
    lore:
      - "&7A neat little greenhouse!"
  controller_material: "IRON_BLOCK"
```

* Once placed, a region is formed between the bounding corners. Any farmland, pots, or advanced plants inside gets the greenhouse benefit.

***

#### 3. How to Obtain & Place a Greenhouse

1. **Admin Command**

   ```plaintext
   /infinitecrops greenhouse give <player> <greenhouseId> [amount]
   ```

   *For example:*

   ```plaintext
   /infinitecrops greenhouse give Notch small_greenhouse 1
   ```
2. **Placement**
   * Hold the greenhouse item in your hand.
   * Right-click on **ground** or a valid block. The plugin will spawn the schematic around that point.
   * A controller block (defined in config) is also placed. That block tracks ownership and region boundaries.

***

#### 3. Breaking/Removing a Greenhouse

Once the controller block is broken, the greenhouse is also removed.

***

#### Common Questions

1. **Why do I need a controller block?**
   * The controller block is used by the plugin to **track** your greenhouse region easily. Breaking it signals the greenhouse’s removal process.
2. **Can I use my own schematics?**
   * Yes. Place your `.schem` files in the designated folder (often `plugins/InfiniteCrops/schematics/...`) and reference them in `greenhouse.yml`.
   * Use the `/ic-schematic` commands to create or edit schematics in-game.
3. **Do greenhouse effects stack with normal environmental perks?**
   * Typically, greenhouse overrides. If your server sets “desert dryness,” the greenhouse **protects** inside blocks from that dryness. Some features like altitude might still partially apply if not explicitly overridden.
4. **Is it possible to have multiple greenhouses next to each other?**
   * Yes. Each placed greenhouse region is tracked separately, though you may want to leave space to avoid bounding box overlap.
5. **Can I let players place greenhouse items in protected areas?**
   * InfiniteCropsRegion is used to track the region and if the player has access for the region the green house will load. On the other hand without access to the regions the plugin will not load the greenhouse to prevent any mistakes, thus not overriding protected areas that the user doesn't have access to.

<figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FCJw8hpBE5BbaQZJExz9c%2F2025-01-06_20.38.29.png?alt=media&#x26;token=e8690355-ded5-49e1-8448-322e315932ce" alt=""><figcaption><p>Small Greenhouse</p></figcaption></figure>

<figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FRrRQaFhttirsFVx7bbbz%2F2025-01-06_20.48.37.png?alt=media&#x26;token=81ee615d-db40-4e51-8bb5-b53b56a323ae" alt=""><figcaption><p>Medium Greenhouse</p></figcaption></figure>

<figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FttRE0lgku2gt1FKL3YzD%2F2025-01-06_20.50.40.png?alt=media&#x26;token=755d44de-84f5-4b45-babb-3520ed8822a2" alt=""><figcaption><p>Large Greenhouse</p></figcaption></figure>
