Some more kinetic blocks
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user