Skip to content

TallCropComponent Class

The custom behavior for Sweet Corn

Extends

Parameters

NameTypeDefaultDescription
stateNameStringmorefood:stageThe name of the growth state
halfNameStringmorefood:halfThe name of the half block state
maxStageNumber7The max growth stage

Methods

canPlace

beforeOnPlayerPlace

onPlace

update

onTick

canGrow

onPlayerDestroy

destroy

Example

js
new TallCropComponent("stage", "half", 7);
json
{
  "format_version": "1.21.20",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:custom_double_crop"
    },
    "component": {
      "minecraft:custom_components": ["morefood:tall_crop"]
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft