Proper cutting board

This commit is contained in:
2026-09-29 00:04:56 -03:00
parent a51adba46f
commit 445148e812
26 changed files with 549 additions and 16 deletions
+7
View File
@@ -175,6 +175,11 @@ export interface ServerWorld {
get_state(x: number, y: number, z: number, name: string): number | undefined;
set_state(x: number, y: number, z: number, name: string, value: number): boolean;
get_block_data<T>(x: number, y: number, z: number): T | undefined;
// the item a block with item_display shows on top of it, like a block entity renderer: saved with the block's data
// and synced to players. undefined shows nothing. it goes away with the block, without dropping
set_block_item(x: number, y: number, z: number, item: ItemStack | undefined): void;
// a copy
get_block_item(x: number, y: number, z: number): ItemStack | 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
@@ -202,6 +207,8 @@ export interface Player {
readonly id: string;
readonly name: string;
readonly position: Readonly<Position>;
// where they look, in radians. 0 is north (-z), going up turning west
readonly yaw: number;
readonly inventory: Container; // 36 slots, hotbar is 0-8
readonly selected_slot: number;
readonly held_item: ItemStack | undefined;