Some more kinetic blocks

This commit is contained in:
2026-10-28 22:10:48 -03:00
parent fa0748a9c5
commit b8cccb86ff
35 changed files with 670 additions and 73 deletions
+3 -1
View File
@@ -263,7 +263,9 @@ export interface ServerAfterEvents {
export interface ServerWorld {
// generates the chunk if it never was, which takes a while, see is_loaded
get_block(x: number, y: number, z: number): Id | undefined;
set_block(x: number, y: number, z: number, id: Id): boolean; // runs on_break / on_create, synced to everyone
// runs on_break / on_create, synced to everyone. states are the ones it's placed with, the rest keep their defaults,
// like minecraft's setBlock with a block state: a shaft turned into an encased one keeps its axis
set_block(x: number, y: number, z: number, id: Id, states?: Record<string, number>): boolean;
// like breaking it by hand without a tool: on_break, then its drops, which it returns (copies). undefined when there
// was nothing to break. see BreakOptions for machines breaking it
break_block(x: number, y: number, z: number, options?: BreakOptions): ItemStack[] | undefined;