# ❓️ 常见问题

## 问题 1: 如何使用原版耕地作为种植盆

现在你得在插件的浇水系统（①）和原版的湿度系统（②）之间做个选择。

① 如果你想使用插件的浇水和施肥系统，必须在config.yml中禁用原版的湿度设置，以避免冲突。

```yaml
  # 原版耕地设置
  vanilla-farmland:
    # 禁用原版耕地的湿度机制
    # 这个选项是因为一些用户更喜欢使用原版耕地，但水系统与原版耕地冲突
    disable-moisture-mechanic: true
```

然后编辑 /contents/pots 文件夹中的 default.yml。

```yaml
default:
  # 最大水储存容量
  max-water-storage: 7
  # 最基本的设置
  base:
    # 种植盆模型
    dry: minecraft:farmland[moisture=0]
    wet: minecraft:farmland[moisture=7]
  # 种植盆是否吸收雨水
  absorb-rainwater: true
  # 附近的水是否让种植盆变湿
  absorb-nearby-water: true
```

② 如果你更喜欢原版耕地的机制，可以直接在 CustomCrops 中禁用所有浇水机制。你需要做的是编辑 /contents/pots 文件夹下的 default.yml。

```yaml
default:
  vanilla-farmland: true
```

然后，你需要对每种作物的生长条件进行修改，否则它们在原版耕地上不会生长，因为 `water-more-than` 检查的是插件提供的水，而 `moisture-more-than` 检查的是原版耕地方块数据的湿度。

```yaml
water_condition:
  type: water-more-than
  value: 0
----->
moisture_condition:
  type: moisture-more-than
  value: 0
```

## 问题 2: 我无法使用插件的任何功能

确保你的世界不在黑名单中 / 确保你的世界在白名单中

```yaml
# 世界设置
worlds:
  # 这是为使用独立文件夹存放世界的服务器设计的
  # 特别适用于领域系统
  absolute-world-folder-path: ''
  # 一个决定插件机制生效的世界列表
  # 模式：whitelist/blacklist
  mode: blacklist
  list:
    - blacklist_world
```

## 问题 3: 如何让洒水壶可损坏

以 ItemsAdder 为例，你需要将材料设置为可损坏的物品，比如 "WOODEN\_SWORD"。CustomCrops 会为你处理耐久度系统，所以你不需要做其他任何事情！

<figure><img src="https://content.gitbook.com/content/orsLN8iAxZurNZDMTgzR/blobs/yhcY6DeTZjSHCHfESbRX/image.png" alt=""><figcaption></figcaption></figure>

```yaml
items:
  watering_can_1:
    display_name: display-name-watering_can_1
    resource:
      generate: false
      material: WOODEN_SWORD
      model_path: item/wateringcans/watering_can_1
    item_flags:
    - HIDE_ATTRIBUTES
```

## 问题 4: 我想使用其他插件中的物品作为种子/掉落物

首先，在 config.yml 中添加插件的名称。您可以在页面上获取所有兼容的插件：

{% content-ref url="jian-rong-xing" %}
[jian-rong-xing](https://momi.gtemc.cn/customcrops/cha-jian-wiki/customcrops/jian-rong-xing)
{% endcontent-ref %}

```yaml
  item-detection-order:
    - MMOItems
```

然后你就可以在任何地方使用 MMOItems

```yaml
  # 作物种子
  seed: MMOItems:MATERIAL:TOMATO_SEEDS
```

```yaml
  # 掉落物
  quality_crop_action:
    type: quality-crops
    value:
      min: 1
      max: 4
      items:
        1: MMOItems:MATERIAL:TOMATO
        2: MMOItems:MATERIAL:TOMATO_SILVER_STAR
        3: MMOItems:MATERIAL:TOMATO_GOLDEN_STAR
```

## 问题 5: 如何将等级插件的等级应用到作物的掉落数量？/ 我如何从收获作物中获得等级插件的经验？/ 如何为种植作物设置等级要求？

首先检查该插件是否在 [支持的等级插件](https://momi.gtemc.cn/customcrops/cha-jian-wiki/customcrops/jian-rong-xing/zhi-chi-de-deng-ji-xi-tong) 中。

然后将该占位符注册到 CustomCrops 中

```yaml
  placeholder-register:
    '{skill-level}': '%levelplugin_farming%'
```

现在你可以在掉落数量中使用占位符和表达式了

```yaml
  # 掉落物
  quality_crop_action:
    type: quality-crops
    value:
      min: "1 + {skill-level} * 0.1"
      max: "4 + {skill-level} * 0.1"
      ...
```

要从收获中获得经验，你必须在破坏/交互事件部分添加一个动作

```yaml
  action_exp:
    type: plugin-exp
    value:
      plugin: AureliumSkills
      target: FARMING  # 目标由你使用的等级插件决定
      exp: 100
    chance: 1
```

要使用种植作物的等级要求，你可以参考以下示例

```yaml
  requirements:
    plant:
      requirement_0:
        type: plugin-level
        value:
          plugin: AureliumSkills
          target: FARMING  # 目标由你使用的等级插件决定
          level: 10
        not-met-actions:
          message_action:
            type: message
            value: "这些种子需要 10 级以上的农业技能等级"
      requirement_1:
        type: season
        value:
          - Spring
          - Autumn
        not-met-actions:
          message_action:
            type: message
            value: "现在不是种植番茄的好季节"
```

## 问题 6: "protect-original-lore" 如何工作？

你可以在 config.yml 中仔细查找此选项

```yaml
  # 是否保护物品的原始描述
  # 这使用计分板组件来识别插件的描述，
  # 这可能会与仍在使用 SpigotAPI#ItemMeta 的某些插件产生冲突。
  protect-original-lore: false
```

以 ItemsAdder 为例

```yaml
items:
  watering_can_1:
    display_name: display-name-watering_can_1
    resource:
      generate: false
      material: WOODEN_SWORD
      model_path: item/wateringcans/watering_can_1
    item_flags:
    - HIDE_ATTRIBUTES
    lore:
      - '1111111111'
      - '2222'
      - '333333'
```

![](https://content.gitbook.com/content/orsLN8iAxZurNZDMTgzR/blobs/PvOQgmfbwF7aniBQK4Ps/image.png)

```yaml
protect-original-lore: true
```

![](https://content.gitbook.com/content/orsLN8iAxZurNZDMTgzR/blobs/bzi3xrJwAjOz88eg0N3g/image.png)

```yaml
protect-original-lore: false
```

![](https://content.gitbook.com/content/orsLN8iAxZurNZDMTgzR/blobs/HKlWKdEbw37GsqR9sBBt/image.png)

## 问题 7: 我无法种植更多作物

情况1：我能听到种植的声音，种子被消耗了

如果你正在使用 ItemsAdder，请打开 ItemsAdder 的 config.yml 并将该值设置得更高

```yaml
entities:
  max-furniture-vehicles-per-chunk: 30
```

如果你使用的是 ItemsAdder 并且使用的是 `BLOCK` 模式，请打开 ItemsAdder 的 config.yml 并参考下面设置

```yaml
# IA 3.6
disable-REAL_WIRE: false
# IA 4.0+
wire: true
```

情况2：什么也没发生

打开 CustomCrops 的 config.yml

<pre class="language-yaml"><code class="lang-yaml"># 限制一个区块中作物的最大数量
<strong>max-per-chunk: 150
</strong></code></pre>

## 问题 8: 如果玩家无法种植更多作物，如何通知玩家？

在 pot/crop/sprinkler 的配置中，有一个名为`reach_limitation`的事件类型，您可以在其中添加自定义操作。

```yaml
events:
  reach_limit:
    actionbar_action:
      type: actionbar
      value: '<red><bold>[X] 你不能种植更多作物'
```

## 问题 9: 如何禁用作物的骨粉？

例如，从作物配置中删除`custom-bone-meal`部分

```yaml
  # 骨粉使用的自定义设置
  custom-bone-meal: {}
```

## 问题 10: 如何在种植盆里种植原版作物？

首先，你需要在config.yml中添加方块类型来禁用某种作物的原版机制。这将防止原版作物被更新并掉落物品。

```yaml
# 指定应该被插件覆盖的方块类型
# 一些常见的作物: WHEAT/CARROTS/POTATOES/BEETROOTS/SWEET_BERRY_BUSH
override-vanilla-blocks:
  - WHEAT
```

然后在/contents/crops/文件夹下创建一个新文件，例如`wheat.yml`

```yaml
# 作物的唯一标识符
wheat:
  # 物品类型
  type: BLOCK
  # 指定作物可以种植在哪个种植盆里
  pot-whitelist:
    - default
  # 用于种植作物的种子
  seed: WHEAT_SEEDS
  # 种植和破坏等动作的事件设置
  events:
    plant:
      # 种植时播放挥手动画
      swing_hand_action:
        type: swing-hand
        value: true
      # 种植作物时播放声音
      sound_action:
        type: sound
        value:
          source: player
          key: minecraft:item.hoe.till
          volume: 1
          pitch: 1
    break:
      # 破坏作物时播放声音
      sound_action:
        type: sound
        value:
          source: player
          key: minecraft:block.crop.break
          volume: 1
          pitch: 1
  # 作物的最大生长阶段
  max-points: 7
  # 作物每个生长阶段的动作和设置
  points:
    0:
      model: minecraft:wheat[age=0]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 1
    1:
      model: minecraft:wheat[age=1]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 1
    2:
      model: minecraft:wheat[age=2]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 1
    3:
      model: minecraft:wheat[age=3]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 1
    4:
      model: minecraft:wheat[age=4]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 1
    5:
      model: minecraft:wheat[age=5]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 1
    6:
      model: minecraft:wheat[age=6]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 1
    7:
      model: minecraft:wheat[age=7]
      events:
        break:
          action_1:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT_SEEDS
              min: 1
              max: 2
          action_2:
            type: drop-item
            value:
              ignore-fertilizer: true
              item: WHEAT
              min: 1
              max: 1
  grow-conditions: {}
  death-conditions: {}
  custom-bone-meal:
    bone_meal_1:
      item: BONE_MEAL
      dispenser: true
      chance:
        2: 0.5
        1: 1
      actions:
        swing_action:
          type: swing-hand
          value: true
        particle_action:
          type: particle
          value:
            particle: VILLAGER_HAPPY
            x: 0.5
            y: 0.5
            z: 0.5
            count: 5
            offset-x: 0.3
            offset-y: 0.3
            offset-z: 0.3
        sound_action:
          type: sound
          value:
            source: player
            key: minecraft:item.bone_meal.use
            volume: 1
            pitch: 1
```

<figure><img src="https://content.gitbook.com/content/orsLN8iAxZurNZDMTgzR/blobs/DOCNY5KtjjJrlUtWrySJ/image.png" alt=""><figcaption></figcaption></figure>

## 问题 11: 如何使用原版物品作为掉落物/种子？

只需使用大写字母，例如“APPLE”

```yaml
seed: APPLE
```

## 问题 12: 如何使用其他原版方块作为种植盆？

要继续使用插件的水和肥料机制，请按如下方式配置：

```yaml
# 种植盆的唯一标识符
default:
  # 种植盆的最大储水容量
  max-water-storage: 5
  # 种植盆外观和行为的基本设置
  base:
    # 种植盆外观的模型
    dry: minecraft:xxx[xxx=xxx]  # 种植盆干燥时的模型ID
    wet: minecraft:xxx[xxx=xxx]  # 种植盆湿润时的模型ID
```

要禁用插件的机制，只需按如下方式配置即可：

```yaml
# 种植盆的唯一标识符
grass_pot:
  vanilla-blocks:
    - minecraft:grass_block[snowy=false]
```

## 问题 13: 如何让不同的种植盆有不同的刻模式 <a href="#q13-how-to-let-different-pots-have-different-tick-modes" id="q13-how-to-let-different-pots-have-different-tick-modes"></a>

首先在 config.yml 中将刻模式设置为 `ALL`

```yaml
pot:
  # RANDOM_TICK / SCHEDULED_TICK / ALL
  mode: ALL
```

然后在其自己的配置中配置特定种植盆的刻模式，可以在以下位置找到

{% content-ref url="ge-shi/zhong-zhi-pen" %}
[zhong-zhi-pen](https://momi.gtemc.cn/customcrops/cha-jian-wiki/customcrops/ge-shi/zhong-zhi-pen)
{% endcontent-ref %}

{% content-ref url="ge-shi/zuo-wu" %}
[zuo-wu](https://momi.gtemc.cn/customcrops/cha-jian-wiki/customcrops/ge-shi/zuo-wu)
{% endcontent-ref %}
