Death
This commit is contained in:
@@ -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