# 🪴 Pot

Let's take `default`as an example to configure the pot settings

**Unique Identifier for Your Pot**:\
Start by naming your pot under a unique identifier like `deault`. This makes it easy to reference and customize later on.

**Set the Maximum Water Storage Capacity**:\
Use `max-water-storage` to define how much water your pot can store. For instance, setting it to `5` means the pot can hold up to five units of water. This ensures your plants have enough hydration between waterings.

```yaml
# Maximum capacity for storing water in the pot
storage: 5
```

**Customize the Pot’s Basic Appearance**:\
The `base` section allows you to define the visual look of your pot under different conditions:

* `dry`: The model ID used when the pot is dry, showing that it needs water.
* `wet`: The model ID when the pot is hydrated and moist.\
  These settings add a visual cue to the player, making it easy to see at a glance whether the pot needs watering.

```yaml
# Basic settings for pot appearance and behavior
base:
  # Models for the pot's appearance
  dry: dry_pot  # Model ID when the pot is dry
  wet: wet_pot  # Model ID when the pot is wet
```

**Control Pot’s Interaction with the Environment**:

* `absorb-rainwater`: Set to `true` if you want your pot to automatically absorb water from rain, keeping it moist without manual watering.
* `absorb-nearby-water`: Set to `false` to prevent the pot from absorbing water from nearby water sources. This setting ensures that your pot only gets watered when intended.

```yaml
# Determines if the pot absorbs rainwater when it rains
absorb-rainwater: true
# Determines if water from nearby sources can wet the pot
absorb-nearby-water: false
```

**Control Pot's Tick Mode**

```yaml
# Sometimes you may have multiple pots configured, 
# and you want the pots to have different tick modes.
# You can change the tick mode to ALL in config.yml 
# and then configure it separately here.
ignore-random-tick: false
ignore-scheduled-tick: true
```

**Manage Fertilizer Application**:\
The `max-fertilizers` parameter controls how many units of fertilizer can be applied to a pot at once. Setting it to `1` limits it to a single application, helping prevent over-fertilization which could harm the plants. For the moment it's recommended to keep it `1` as the hologram would show at most one fertilizer at the same time.

```yaml
# Maximum number of fertilizers that can be applied to the pot
max-fertilizers: 1
```

**Define Custom Appearances for Fertilized Pots**:\
Under `fertilized-pots`, you can set unique models for pots based on different fertilizer effects. Each type (e.g., `quality`, `yield_increase`, `variation`, `soil_retain`, `speed_grow`) can have distinct `dry` and `wet` appearances. This customization adds depth, visually reflecting the benefits of different fertilizers applied to the pot.

```yaml
# Custom appearances for pots with different fertilizer effects
fertilized-pots:
  enable: false
  quality:
    dry: dry_pot  # Model ID for dry pot with 'quality' fertilizer effect
    wet: wet_pot  # Model ID for wet pot with 'quality' fertilizer effect
  yield_increase:
    dry: dry_pot  # Model ID for dry pot with 'yield increase' fertilizer effect
    wet: wet_pot  # Model ID for wet pot with 'yield increase' fertilizer effect
  variation:
    dry: dry_pot  # Model ID for dry pot with 'variation' fertilizer effect
    wet: wet_pot  # Model ID for wet pot with 'variation' fertilizer effect
  soil_retain:
    dry: dry_pot  # Model ID for dry pot with 'soil retain' fertilizer effect
    wet: wet_pot  # Model ID for wet pot with 'soil retain' fertilizer effect
  speed_grow:
    dry: dry_pot  # Model ID for dry pot with 'speed grow' fertilizer effect
    wet: wet_pot  # Model ID for wet pot with 'speed grow' fertilizer effect
```

**Configure Water Refill Methods**:\
The `fill-method` section allows you to define various methods for refilling the pot with water:

* **Method 1**: Using a `WATER_BUCKET` adds `3` units of water. Upon refilling, the player receives an empty `BUCKET`.
* **Method 2**: Using a `POTION` adds `1` unit of water and returns a `GLASS_BOTTLE`.\
  Both methods include actions like playing a sound (`minecraft:item.bucket.fill` or `minecraft:item.bottle.fill`) and a hand-swing animation to provide feedback during the refill process.

```yaml
# Methods available to refill the watering can with water
fill-method:
  # Customizable refill method 1
  method_1:
    # Item required to refill
    item: WATER_BUCKET
    # Item returned after refilling (optional)
    return: BUCKET
    # Amount of water added with this method
    amount: 3
    actions:
      # Sound effect to play when refilling
      sound_action:
        type: sound
        value:
          source: player
          key: minecraft:item.bucket.fill
          volume: 1
          pitch: 1
      # Action of swinging hand during refill
      swing_hand_action:
        type: swing-hand
        value: true
  # Customizable refill method 2
  method_2:
    item: POTION
    return: GLASS_BOTTLE
    amount: 1
    actions:
      sound_action:
        type: sound
        value:
          source: player
          key: minecraft:item.bottle.fill
          volume: 1
          pitch: 1
      swing_hand_action:
        type: swing-hand
        value: true
```

**Customize the Water Level Display Bar**:\
The `water-bar` configuration allows you to create a unique visual indicator for the water level using custom characters. This display provides a quick and visually appealing way to check how much water is left in the can.

```yaml
# Configuration for the water level display bar
water-bar:
  left: '뀂'   # Left cap of the water bar
  full: '뀁뀃' # Segment representing full water level
  empty: '뀁뀄' # Segment representing empty water level
  right: '뀁뀅' # Right cap of the water bar
```

**Set Up Events**:\
The `events` section is where the real magic happens. Here, you define how the game responds to different interactions with the pots. Available events: `place`/`break`/`interact`/`tick`/`reach_limitation`/`add_water`/`full`/`max_fertilizers`

```yaml
# Event settings to handle interactions and effects
events:
  add_water:
    particle_action:
      type: particle
      value:
        particle: WATER_SPLASH  # Particle effect when water is added
        x: 0.5
        y: 1.3
        z: 0.5
        count: 5
        offset-x: 0.3
        offset-z: 0.3
  interact:
    # Action to display a hologram when holding a specified item
    conditional_action:
      type: conditional
      value:
        conditions:
          requirement_1:
            type: item-in-hand
            value:
              amount: 1
              item: soil_surveyor
        actions:
          # Display hologram for fertilizer status if fertilizer exists
          conditional_fertilizer_action:
            type: conditional
            value:
              conditions:
                requirement_1:
                  type: fertilizer
                  value:
                    has: true
              actions:
                fertilizer_hologram:
                  type: hologram
                  value:
                    duration: 20  # Duration the hologram remains visible
                    text: '<font:customcrops:default>{icon}</font> {left_times}/{max_times}'
                    apply-correction: true
                    x: 0.5
                    y: 0.83
                    z: 0.5
                    visible-to-all: false
          # Display hologram showing current water level in the pot
          water_hologram:
            type: hologram
            value:
              duration: 20  # Duration the hologram remains visible
              text: '<font:customcrops:default>{water_bar}</font>'
              apply-correction: true
              x: 0.5
              y: 0.6
              z: 0.5
              visible-to-all: false
```

**Set Up Requirements**:\
Under `requirements`, you can configure the conditions player have to meet before using the pot. Available events: `break`/`place`/`use`

```yaml
requirements:
  use: {}
  place: {}
  break:
    requirement_1:
      type: permission
      value: xxx.xxx
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
