Death
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "dangerous_business:death",
|
||||
"textures": "cubi:missing",
|
||||
"model": "dangerous_business:empty",
|
||||
"item_model": "cubi:cube",
|
||||
"render_layer": "cutout",
|
||||
"shape": [[0, 0, 0, 16, 16, 16]],
|
||||
"collision": false,
|
||||
"components": {
|
||||
"dangerous_business:death": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"model": {
|
||||
"id": "dangerous_business:empty",
|
||||
"elements": []
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ export { shared } from "./shared.ts";
|
||||
export function server(ctx: ServerContext) {
|
||||
register_facility_door(ctx);
|
||||
register_door(ctx);
|
||||
register_death(ctx);
|
||||
register_commands(ctx);
|
||||
}
|
||||
|
||||
@@ -103,6 +104,15 @@ function register_door(ctx: ServerContext) {
|
||||
});
|
||||
}
|
||||
|
||||
// an invisible block that kills whatever walks or falls into it, for the bottoms of pits and the like
|
||||
function register_death(ctx: ServerContext) {
|
||||
ctx.components.register_block("dangerous_business:death", {
|
||||
on_entity_inside(_block, _params, entity) {
|
||||
entity.kill("death_block");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function register_commands(ctx: ServerContext) {
|
||||
const { literal, argument, types } = ctx.commands;
|
||||
ctx.commands.register(
|
||||
|
||||
Reference in New Issue
Block a user