Skip to main content
A crop is a flora entry with a crop: section. Players plant its seed on farmland, it grows by itself one stage at a time, and they pick it when it’s ripe, just like wheat.
items/flora/tomato/tomato.yml
This is the tomato that Lode Items installs on first start, in items/flora/tomato/. Run /lodeitems give tomato_seeds and plant them on farmland. The entry’s id is the seed: its item plants the crop, and the crop drops it back while it’s still growing. The produce (tomato above) is a normal item.

What a crop does

Crops behave like vanilla wheat:
  • They grow by themselves, one stage at a time, at wheat’s speed by default. Wet farmland under and around a crop speeds it up, and crops planted in rows grow faster than ones packed in a square. Below min-light they don’t grow at all.
  • Bone meal grows a crop 2 to 5 stages for an 8-stage crop like wheat, fewer for crops with fewer stages, and always at least one. Dispensers with bone meal work too.
  • They pop off with their drops when they can’t stay: the farmland under them is trampled or turns back into dirt, the block under them is broken, water flows into them or a piston pushes them.
  • Farmland under a crop doesn’t turn back into dirt when it dries out, the same as under wheat.
  • Right-click a ripe crop to pick it. Its drops pop out and it starts again from the first stage. If the drops include its seed, one seed fewer drops, because that one goes back in the ground. Breaking it works too.
  • They break instantly, you walk through them, and they sound like wheat when planted and broken.
Planting fires a normal block place and picking is a right-click on a block, so protection plugins apply to both.

Options

section
required
The rest of the entry sets up the seed item and the plant as a block:
  • texture is the seed’s icon. Without it, the ripe stage’s picture is used, so a crop whose stages are all models needs a texture.
  • name, lore and every other item option apply to the seed.
  • sounds and tags work as for blocks, and events like interact and break work on the planted crop.
Each stage uses a walk-through block slot and look, so the number of crops is limited. See How many crops and saplings.
Props used to grow with grows:. Growing is now crop behaviour: make the stages one type: flora entry with a crop: section. A prop that still has grows: loads with a warning and doesn’t grow.

Not yet supported

  • Fortune doesn’t add to crop drops.
  • The harvest item option (a hoe that harvests around it) only harvests vanilla crops. Pick Lode Items crops by right-clicking them.
  • Crops don’t appear in newly generated worlds.