Skip to content

mcutils:copper_bulb

Vanilla copper bulb block behavior.

Registering

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

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

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

Requirements

Component

Options

NameTypeDefaultDescription
lit_statestringmcutils:lit
powered_statestringmcutils:powered

Examples

Copper Bulb

json
{
  "format_version": "1.21.100",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:custom_copper_bulb",
      "states": {
        "mcutils:powered": [false, true],
        "mcutils:lit": [false, true]
      }
    },
    "components": {
      "minecraft:tick": {
        "interval_range": [0, 0],
        "looping": true
      },
      "mcutils:waxable": {
        "block": "wiki:waxed_copper_bulb",
        "items": ["honeycomb"]
      },
      "mcutils:oxidizable": {
        "block": "wiki:weathered_copper_bulb"
      },
      "mcutils:copper_bulb": {
        "lit_state": "mcutils:lit",
        "powered_state": "mcutils:powered"
      }
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft