mcutils:tile_entity
Vanilla tile entity block behavior. (Like; chests, barrels)
Registering
Before you can use this component you need to register it.
js
import { system } from "@minecraft/server";
import { TileEntityComponent } from "@lpsmods/mc-utils";
system.beforeEvents.startup.subscribe((event) => {
event.blockComponentRegistry.registerCustomComponent(TileEntityComponent.typeId, new TileEntityComponent());
});
Component
Options
Name | Type | Default | Description |
---|---|---|---|
entity | string |
Examples
Chest
json
{
"format_version": "1.21.100",
"minecraft:block": {
"description": {
"identifier": "wiki:custom_chest"
},
"components": {
"mcutils:tile_entity": {
"entity": "wiki:chest"
}
}
}
}