Sprinkler

Create a new yml file in the /contents/sprinklers directory to add a new sprinkler. Of course, you can also modify it based on default.yml.

Available event triggers for sprinkler:

  • work: When the sprinkler starts working

  • add_water: When players successfully add water to the pot

  • reach_limit: When the amount of sprinklers reached the limitation

  • break: When players break the sprinkler

  • place: When players place the sprinkler

  • interact: When players interact the sprinkler

# ID
sprinkler_1:
  # This decides the work range
  # □□□
  # □■□
  # □□□
  range: 1
  # Maximum water storage capacity
  storage: 5
  # Unlimited water source
  infinite: false
  # Amount of water added in a single sprinkling
  water: 1
  # Basic 3d model
  3D-item: sprinkler_1
  # If you want to create a sprinkler which has two states(has water / no water)
  # 3D-item-with-water: xxx_sprinkler_1
  # Optional 2d model
  2D-item: sprinkler_1_item
  # ITEM_FRAME / TRIPWIRE / ITEM_DISPLAY (1.19.4+)
  type: ITEM_FRAME
  # Sprinklers only work in specified planting pots
  pot-whitelist:
    - default
  # Methods to fill the sprinkler
  fill-method:
    # The name of the method, it's totally customized
    method_1:
       # The item to use
      item: WATER_BUCKET
      # The amount of item to use
      item-amount: 1
      # The item returned (Optional)
      return: BUCKET
      # The amount of item to return
      return-amount: 1
      # Requirements for this fill method
      requirements: {}
      # The amount of water to add
      amount: 3
    method_2:
      item: POTION
      return: GLASS_BOTTLE
      amount: 1
  # Water bar image settings
  water-bar:
    left: '뀂'
    full: '뀁뀃'
    empty: '뀁뀄'
    right: '뀁뀅'
  # Event settings
  events:
    place:
      swing_hand_action:
        type: swing-hand
        value: true
      sound_action:
        type: sound
        value:
          source: player
          key: minecraft:block.bone_block.place
          volume: 1
          pitch: 1
    interact:
      force_work_action:
        type: conditional
        value:
          conditions:
            requirement_1:
              type: sneak
              value: true
          actions:
            action_1:
              type: force-tick
      hologram_action:
        type: hologram
        value:
          text: '<font:customcrops:default>{water_bar}</font>'
          duration: 40
          x: 0.5
          y: -0.3
          z: 0.5
          visible-to-all: false
    work:
      fake_item_action:
        type: fake-item
        value:
          item: customcrops:water_effect
          duration: 100
          x: 0.5
          y: 0.4
          z: 0.5
          visible-to-all: true
    add_water:
      particle_action:
        type: particle
        value:
          particle: WATER_SPLASH
          x: 0.5
          y: 0.7
          z: 0.5
          count: 5
      sound_action:
        type: sound
        value:
          key: "minecraft:item.bucket.empty"
          source: 'player'
          volume: 1
          pitch: 1

Last updated