Fishing hook

This commit is contained in:
2026-09-28 20:52:53 -03:00
parent d606bc4b55
commit ad6adb49dc
16 changed files with 258 additions and 37 deletions
+12
View File
@@ -177,6 +177,8 @@ export interface ServerWorld {
get_block_data<T>(x: number, y: number, z: number): T | undefined;
// pops an item out of the block at x y z, like a broken block's drops
drop_item(x: number, y: number, z: number, item: ItemStack): void;
// an entity from entities/ with its feet at x y z. throws for kinds that don't exist
spawn_entity(id: Id, x: number, y: number, z: number): EntityRef;
is_loaded(x: number, z: number): boolean;
readonly seed: string;
// ticks since 06:00 of day 1. a day is 36000 ticks (06:00 to 18:00), a night 12000
@@ -186,6 +188,16 @@ export interface ServerWorld {
set_time(time: number): void;
}
// an entity in the world. once it's removed, by a script or anything else, it stays removed and moving it does nothing
export interface EntityRef {
readonly id: string;
readonly type: Id;
readonly position: Readonly<Position>;
readonly removed: boolean;
teleport(x: number, y: number, z: number): void;
remove(): void;
}
export interface Player {
readonly id: string;
readonly name: string;