Skip to content

PottedFlowerComponent Class

Makes this block behave like a Flower Pot

Parameters

NameTypeDefaultDescription
itemStringThe flower item
flowerPotStringminecraft:flower_potThe block to convert to a potted flower

Methods

onPlayerInteract

Example

js
new PottedFlowerComponent("minecraft:poppy", "minecraft:flower_pot");
json
{
  "format_version": "1.21.20",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:potted_custom_flower"
    },
    "component": {
      "minecraft:custom_components": ["wiki:potted_custom_flower"]
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft