# Custom Crops

Crops have multiple growing stages, as well have multiple harvest stages (example: 1st stage 1-2 tomatoes, 2nd stage 3-5 tomatoes), and last stage - rotten.

<figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FtMIDnGnSGr0ELWJqJuiH%2F2024-12-23_00.43.28.png?alt=media&#x26;token=77f9615b-6480-4310-8479-425015cf5f1c" alt=""><figcaption><p>Tomatoes all stages</p></figcaption></figure>

There are 5 types of harvest you can receive from each crop: Regular, Silver Star, Gold Star, Amethyst Star, Rotten. The better the stage, the more valuable it can be registered as (economy wise).

<figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2Fog9FCQT5wE7AXswf6qiu%2F2024-12-23_00.35.32.png?alt=media&#x26;token=20e5e6ab-7cba-4d13-99ec-ec1ac7e218d1" alt=""><figcaption><p>Harvest Types</p></figcaption></figure>

Additionally, there are crops that don't need to be "broken" and are simply harvested by right-clicking them (unless needing a harvesting tool), without the need to replant the crop after.

<div data-full-width="true"><figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FD46Vw6eyu0wmPzIggUBF%2F2024-12-23_00.44.51.png?alt=media&#x26;token=5e54aa82-e97d-4409-988a-63dcd3620b50" alt=""><figcaption></figcaption></figure></div>

Each crop has its specific configuration in the `crops.yml` file. Below is an example of a crop configuration:

```yaml
crops:
  pepper:
    id: pepper
    item:
      displayName: '&ePepper Seed'
      lore: []
      materialType: PAPER
      itemId: pepper_seed
      minAmount: 1
      maxAmount: 1
      modelData: 435
    rewards:
      almost_matured:
      - ITEM:
          type: HarvestRewardItem
          name: item-almost_matured
          items:
            almost_matured_1:
              itemId: pepper
              minAmount: 1
              maxAmount: 3
              modelData: 436
              lore: []
              displayName: '&bPepper'
              materialType: APPLE
    configurationPerSeason:
      spring:
        stages:
        - modelData: 427
          requiredGrowthPoints: 35
          name: seedling
          model: infinitecrops:pepper_stage_1
          modelType: ITEMSADDER
          status: INIT
        waterLossMultiplier: 1.8
    initial-water-level: 50.0
    waterLoss: 0.005
    placeableBlocks:
    - FARMLAND
    requireTool: false
```

***

### Key Attributes

#### General

* **id**: Unique identifier for the crop.
* **item**: Defines the crop seed/item used for planting.
  * `displayName`: Name displayed in the game.
  * `materialType`: Base Minecraft material.
  * `modelData`: Custom model data for the item.

#### Rewards

Defines items obtained when harvesting. Rewards are categorized by crop stages (`almost_matured`, `matured`, `last_stage`).

#### Seasonal Configurations

Each crop can have specific behaviors and growth stages per season.

* **stages**: Defines growth stages for the crop in a season.
  * `modelData`: Appearance of the crop at a stage.
  * `requiredGrowthPoints`: Points required to progress to the next stage.
  * `status`: State of the crop (e.g., `INIT`, `GROWTH`, `HARVEST`).

#### Water and Light Levels

* **initial-water-level**: Starting water level for the crop.
* **waterLoss**: Rate of water loss per second.
* **lightLevelMultipliers**: Growth point multiplier based on light levels.

#### Loot Table

Defines items dropped upon harvesting.

* `itemsDroppedPerStar`: Rewards based on crop quality.

***

### Seasonal Behavior

Each crop behaves differently depending on the season. The growth stages, water loss multiplier, and rewards can vary. Example configuration for seasons:

```yaml
configurationPerSeason:
  spring:
    stages:
    - modelData: 427
      requiredGrowthPoints: 35
      name: seedling
      model: infinitecrops:pepper_stage_1
      modelType: ITEMSADDER
      status: INIT
    waterLossMultiplier: 1.8
  summer:
    stages:
    - modelData: 428
      requiredGrowthPoints: 25
      name: seedling
      model: infinitecrops:pepper_stage_1
      modelType: ITEMSADDER
      status: INIT
    waterLossMultiplier: 2.5
```

More screenshots from the game regarding crop stages and seeds (there are more content screenshots in other sections like Money Trees, Bushes, Harvesting Tools and more)

<div data-full-width="true"><figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FvGceAyqNBVmEa5E8ASEd%2F2024-12-23_00.31.11.png?alt=media&#x26;token=3b3340df-4bfa-42c4-89b4-baa85b8c425c" alt=""><figcaption><p>Crops</p></figcaption></figure></div>

<div data-full-width="true"><figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FBwqOewxY4kAcoqGfxLsa%2F2024-12-23_00.42.40.png?alt=media&#x26;token=67ea2594-c0b4-47bf-9656-14236f1815e3" alt=""><figcaption></figcaption></figure></div>

<div data-full-width="true"><figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FK8gRT6waz2tzCVugeb8n%2F2024-12-23_00.46.48.png?alt=media&#x26;token=9a24026b-4be3-4923-b974-c0236222531f" alt=""><figcaption></figcaption></figure> <figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FdGBwbvdUeTjbDnuSuqKs%2F2024-12-23_00.47.19.png?alt=media&#x26;token=df3dc46f-2773-4fe1-9637-05257eb41398" alt=""><figcaption></figcaption></figure></div>

<div data-full-width="true"><figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2FMqZF13KDbYjcWZduimjb%2F2024-12-18_21.49.01.png?alt=media&#x26;token=cf012aac-b8f2-4717-b326-37e961e8b6c5" alt=""><figcaption><p>Money Trees</p></figcaption></figure></div>

<div data-full-width="true"><figure><img src="https://43358839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ifdxZDjYYdaFezGOVfx%2Fuploads%2Fwdc14JFSjm0ZxZJ8sFrn%2F2024-12-18_08.53.23.png?alt=media&#x26;token=c820c284-6570-447b-9a43-e97f3b3f8ac1" alt=""><figcaption><p>Bushes</p></figcaption></figure></div>
