Skip to content

BushComponent Class

Makes this block behave like Sweet Berries

Extends

Parameters

NameTypeDefaultDescription
cropItemStringThe item to drop when harvested
stateNameStringmorefood:stageThe name of the growth stage
maxStageNumber7The max growth stage

Methods

onPlayerInteract

pickBush

Example

js
new BushComponent("minecraft:sweet_berries", "growth", 7);
json
{
  "format_version": "1.21.20",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:custom_bush"
    },
    "component": {
      "minecraft:custom_components": ["morefood:bush"]
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft