mcutils:redstone_lamp
Vanilla redstone lamp block behavior.
Registering
Before you can use this component you need to register it.
js
import { system } from "@minecraft/server";
import { RedstoneLampComponent } from "@lpsmods/mc-utils";
system.beforeEvents.startup.subscribe((event) => {
event.blockComponentRegistry.registerCustomComponent(RedstoneLampComponent.typeId, new RedstoneLampComponent());
});
Requirements
Component
Options
Name | Type | Default | Description |
---|---|---|---|
lit_state | string | mcutils:lit | |
delay | number | 0 |
Examples
Redstone Lamp
json
{
"format_version": "1.21.100",
"minecraft:block": {
"description": {
"identifier": "wiki:custom_redstone_lamp",
"states": {
"mcutils:lit": [false, true]
}
},
"components": {
"minecraft:tick": {
"interval_range": [0, 0],
"looping": true
},
"mcutils:redstone_lamp": {
"lit_state": "mcutils:lit",
"delay": 60
}
}
}
}