Skip to content

mcutils:coral

Vanilla coral block behavior.

Registering

Before you can use this component you need to register it.

js
import { system } from "@minecraft/server";
import { CoralComponent } from "@lpsmods/mc-utils";

system.beforeEvents.startup.subscribe((event) => {
  event.blockComponentRegistry.registerCustomComponent(CoralComponent.typeId, new CoralComponent());
});

Requirements

Component

Options

NameTypeDefaultDescription
delaynumber60
blockstring

Examples

Coral Block

json
{
  "format_version": "1.21.100",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:custom_coral_block"
    },
    "components": {
      "minecraft:tick": {
        "interval_range": [0, 0],
        "looping": true
      },
      "mcutils:coral": {
        "block": "wiki:dead_coral_block",
        "delay": 60
      }
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft