Fertilizer

/CustomCrops/contents/fertilizers/__FERTILIZER__.yml

Let take quality_1as an example to configure the fertilizer settings

Unique Identifier for the Fertilizer: Begin by assigning a unique identifier to each fertilizer type. In this example, the fertilizer is named quality_1. This identifier is crucial for distinguishing between different fertilizer types in the game.

Define the Fertilizer Type and Icon:

  • type: Set to QUALITY, indicating that this fertilizer improves the quality of the crops it is applied to.

  • icon: Represents the visual icon that will appear in the game interface when players view or use this fertilizer. The icon '뀆' is a unique symbol that visually represents this specific fertilizer.

Available fertilizer types and their effects:

QUALITY: Change the weights of star rated crops dropping
SOIL_RETAIN: Reduce the speed of water consumption
SPEED_GROW: Accelerate crop growth
VARIATION: Crops have a higher probability of variation
YIELD_INCREASE: Increase crop yield
type: QUALITY  # The type of fertilizer

Set the Fertilizer’s Effectiveness:

  • chance: This is a probability factor (set to 1 here) that influences the effectiveness or success rate of the fertilizer. Adjusting this value can make the fertilizer more or less likely to produce its intended effects.

  • times: Specifies the duration or number of in-game ticks that the fertilizer remains effective. With a value of 28, the fertilizer will last for 28 ticking cycles, providing a sustained impact on crop growth.

chance: 1  # Probability factor influencing effect of fertilizer

Assign a Unique Item ID:

  • item: The unique item ID quality_1 links this configuration to an in-game item, ensuring that when players use this item, the game recognizes it as the quality_1 fertilizer.

item: quality_1  # Unique item ID for this fertilizer

Specify Application Timing and Pot Compatibility:

  • before-plant: Set to true, this parameter ensures that the fertilizer must be applied before planting any crops. It enforces strategic planning, requiring players to prepare their soil in advance.

  • pot-whitelist: Lists all pot types where this fertilizer can be applied. In this example, only default pots are allowed, but you can add more pot types to expand compatibility.

before-plant: true  # Indicates that this fertilizer must be applied before planting crops
pot-whitelist:
  - default  # List of allowed pots where this fertilizer can be used

Set Up Events: The events section is where the real magic happens. Here, you define how the game responds to different interactions with the fertilizers. Available events: use/before_plant/wrong_pot

events:
  use:  # Actions triggered when the fertilizer is applied
    particle_action:
      type: particle
      value:
        particle: SCRAPE
        x: 0.5
        y: 1.3
        z: 0.5
        count: 5
        offset-x: 0.3
        offset-z: 0.3
    sound_action:
      type: sound
      value:
        source: player
        key: minecraft:item.hoe.till
        volume: 1
        pitch: 1
  wrong_pot:  # Actions triggered if the fertilizer is used on the wrong pot type
    sound_action:
      type: sound
      value:
        key: "minecraft:item.bundle.insert"
        source: 'player'
        volume: 1
        pitch: 1
    actionbar_action:
      type: actionbar
      value: '<red><bold>[X] This fertilizer can only be used in pots.'  # Message shown on the action bar
  before_plant:  # Actions triggered if the fertilizer is used after planting
    sound_action:
      type: sound
      value:
        key: "minecraft:item.bundle.insert"
        source: 'player'
        volume: 1
        pitch: 1
    actionbar_action:
      type: actionbar
      value: '<red><bold>[X] You can only use this fertilizer before planting the crop.'

Set Up Requirements: Under requirements, you can configure the conditions player have to meet before using the fertilizer.

requirements:
  requirement_1:
    type: permission
    value: xxx.xxx

Last updated