Let take tomato as an example to configure the crop settings
Unique Identifier for Your Crop:
Start by naming your crop under a unique identifier like tomato. This makes it easy to reference and customize later on.
Define the Crop Type:
Set the type to either BLOCK or FURNITURE. For "tomato", it is set to BLOCK. This setting affects all custom item types that appear in the entire configuration. But you can also set the type of an item individually through some additional configuration.
# Item type# BLOCK / FURNITUREtype:BLOCK
Set Planting Restrictions:
Use the pot-whitelist to specify which pots are allowed for planting. The "tomato" crop can only be planted in the default pot. If you modify the configuration of the pot, please be sure to modify this configuration simultaneously.
# The crop can only be planted on whitelisted potspot-whitelist: - default
Configure Seed Information:
The seed field identifies the item used to plant the crop. Here, tomato_seeds is the seed for the tomato crop.
# Seed of the cropseed:tomato_seeds
Manage Rotation (FURNITURE Mode Only):
random-rotation controls whether the crop rotates randomly when planted. This only applies if the type is FURNITURE.
# Only works in FURNITURE moderandom-rotation:true
Set Basic Requirements:
Define conditions under requirements for this crop. For example, the "tomato" can only be planted in Spring or Autumn, and an action bar message is displayed if these conditions are not met.
# Break/Plant/Interact requirementsrequirements:interact: {}break: {}plant:requirement_1:type:seasonvalue: - Spring - Autumnnot-met-actions:message_action:type:messagevalue:'<red><bold>[X] It''s not a good season to plant tomato'
Configure Event Settings:
Customize crop events under events for actions like planting or breaking. For instance, when planting a "tomato," a sound (minecraft:item.hoe.till) is played, and a hand-swing animation occurs. Available events for crops: reach_limit/plant/break/interact/death
events:break: {}interact: {}death: {}reach_limit:actionbar_action:type:actionbarvalue:'<red><bold>[X] You are not allowed to plant more crops'plant:# Swing the main handswing_hand_action:type:swing-handvalue:true# Send sound while plantingsound_action:type:soundvalue:source:playerkey:minecraft:item.hoe.tillvolume:1pitch:1
Define Growth Stages and Models:
Use the points section to outline crop growth stages. For each stage, specify a model (appearance) and actions that occur, such as seed dropping or hologram adjustments.
Available events for crops: grow/break/interact
# This determines the maximum stages for crops to growmax-points:6
# Actions and settings for each growth stage of the croppoints:0:# Model representing the crop at this growth stagemodel:tomato_stage_1# Adjusts hologram position to match the crop model's heighthologram-offset-correction:0.2# Set the type for this stage if it's different from the global type set abovetype:BLOCK# Break/Interact requirements for this stagerequirements:break:...interact:...# Events triggered when the crop is broken at this stageevents:grow: {}interact: {}break:# 30% chance to drop tomato seeds when brokenaction_1:type:drop-itemvalue:ignore-fertilizer:trueitem:tomato_seedsmin:1max:1chance:0.3
Customize Growth and Death Conditions:
Use grow-conditions to set conditions for crop growth, such as the season or water level. Similarly, death-conditions determine when a crop should die, like during a crow attack or in an unsuitable season.
# Conditions under which the crop can growgrow-conditions:default:point:1conditions:season_condition:type:suitable_seasonvalue: - Spring - Autumnwater_condition:type:water_more_thanvalue:0
# Conditions that may cause the crop to diedeath-conditions:no_water:# Custom model for the death stage, triggered by lack of watermodel:crop_stage_deathconditions:'&&':condition_1:type:water_less_thanvalue:1condition_2:type:randomvalue:0.7unsuitable_season:# Crop dies in unsuitable seasonsmodel:crop_stage_deathconditions:condition_1:type:unsuitable_seasonvalue: - Wintercrow_attack:# Crop removal due to crow attackconditions:condition_1:type:crow_attackvalue:chance:0.005fly-model:crow_flystand-model:crow_stand# Delay before the crop is removed after a crow attackdelay:150
Define Custom Bone Meal Effects:
Under custom-bone-meal, configure special effects and actions triggered by using bone meal, such as particles, sounds, or the chance of growth.
# Custom settings for bone meal usecustom-bone-meal:bone_meal_1:item:BONE_MEAL# Allows use with a dispenserdispenser:truechance:2:0.21:0.6actions:swing_action:type:swing-handvalue:trueparticle_action:type:particlevalue:particle:VILLAGER_HAPPYx:0.5y:0.5z:0.5count:5offset-x:0.3offset-y:0.3offset-z:0.3sound_action:type:soundvalue:source:playerkey:minecraft:item.bone_meal.usevolume:1pitch:1