Action & Requirement & Condition

Action

# Drop items

type: drop-items
value:
  # should the items go directly into player's inventory
  to-inventory: false
  quality-crops:
    min: 1
    max: 4
    items:
      1: customcrops:tomato
      2: customcrops:tomato_silver_star
      3: customcrops:tomato_golden_star
  other-items:
    loot_1:
      item: customcrops:tomato_seeds
      min: 1
      max: 1
      chance: 1
# send a sound to player

type: sound
value:
  source: player
  key: minecraft:block.crop.break
  volume: 1
  pitch: 1
# execute a command

type: command
value:
  - 'say Hello, {player}!'
chance: 0.5
# send an actionbar

type: actionbar
value: 'Hello, {player}!'
chance: 1
# turn into another block type

type: variation
value:
  golden:
    item: customcrops:tomato_stage_golden
    type: TRIPWIRE
    chance: 0.01
# break the block

type: break
value: true # whether to trigger break event too 是否触发break事件
# replant the crop

type: replant
value:
  point: 0
  crop: tomato  # Replant the crop 重新种植农作物
  model: customcrops:tomato_stage_1 # crop model 农作物模型
# directly add exp to a player

type: exp
value: 10
chance: 0.5
# firstly mending, the other exp would go to levels

type: mending
value: 10
chance: 0.5
# send a message to player

type: message
value:
  - 'Hello, {player}!'
chance: 0.5
# add job exp

type: job-xp
value:
  xp: 100
  job: xxx
chance: 0.5
# add skill exp

type: skill-xp
value: 10 
chance: 0.5
# display particle

type: particle
value:
  particle: FLAME
  amount: 3
  offset: 0.5
# apply potion effect

type: potion-effect
value:
  type: BLINDNESS
  duration: 20
  amplifier: 0
# swing player's hand

type: swing-hand
# chain effects

type: chain
chance: 1
requirements:
  req_1:
    xxx
  req_2:
    xxx
value:
  action_1:
     xxxx
  action_2:
     xxxx

Requirement

# Requirement is a section where you can customize the preconditions before some actions
requirements:
  # requirement name, it's named causally as long as you the follow YAML syntax
  req_1:
    # type, see the types below
    type: permission
    # value = arguments
    value: speed_grow_1.use
    # Optional message
    message: "You don't have permission to use the fertilizer"
    # Optional actions
    actions:
      action_1:
        type: sound
        value:
          source: player
          key: minecraft:block.anvil.land
          volume: 1
          pitch: 1
# permission

type: permission
value: tomato.plant
# season

type: season
value:
  - Spring
  - Autumn
# biome

type: biome
value:
  - minecraft:plains
# Y position

type: ypos
value:
  - 10~100
# world

type: world
value:
  - world_the_end
# Game time 0~23999

type: time
value:
  - 0~12000
# skill level

type: skill-level
value: 10
# job level

type: job-level
value:
  level: 10
  job: xxx
# real life date

type: date
value:
  - 2/29
# weather

type: weather
value:
  - clear
  - rain
  - thunder
# placeholder conditions

type: papi-condition
value:
  '||':
    condition_1:
      type: '=='
      papi: '%player_world%'
      value: world
    '&&':
      condition_1:
        type: '>='
        papi: '%player_health%'
        value: 5
      condition_2:
        type: '<'
        papi: '%player_health%'
        value: 15
# light level
type: light
value: 14
# natural light level
type: natural-light
value: 14
# limit the entity amount in chunk
type: max-entity-amount-in-chunk
value: 64

Condition

# suitable season

type: suitable_season
value:
  - Spring
  - Autumn
# Pot water amount

type: water_more_than
value: 2
# 0~1 random chance

type: random
value: 0.7
# unsuitable season

type: unsuitable_season
value:
  - Winter
# Pot water amount

type: water_less_than
value: 1
# crow attack

type: crow_attack
value:
  chance: 0.001
  fly-model: customcrops:crow_fly
  stand-model: customcrops:crow_stand
# weather

type: weather
value:
  - clear
  - thunder
  - rain

Last updated