Player api
This commit is contained in:
@@ -93,19 +93,23 @@ export interface SharedBlock extends Position {
|
||||
}
|
||||
|
||||
// a player placing a block at x y z by clicking face of the block next to it, at hit (0 to 1 on each axis of that
|
||||
// block), like minecraft's BlockPlaceContext. facing is the way the player looks, along the ground
|
||||
// block), like minecraft's BlockPlaceContext. facing is the way the player looks, along the ground, and sneaking
|
||||
// whether they hold the sneak key, for blocks placed another way round when they do
|
||||
export interface BlockPlacement extends Position {
|
||||
readonly face: Face;
|
||||
readonly hit: readonly [number, number, number];
|
||||
readonly facing: "north" | "east" | "south" | "west";
|
||||
readonly sneaking: boolean;
|
||||
}
|
||||
|
||||
// a player right clicking face of a block, at hit (0 to 1 on each axis of the block), like minecraft's BlockHitResult.
|
||||
// facing is the way the player looks, along the ground
|
||||
// facing is the way the player looks, along the ground, and sneaking whether they hold the sneak key. sneaking with
|
||||
// an item in hand doesn't interact at all, the item is used or placed instead
|
||||
export interface BlockInteraction {
|
||||
readonly face: Face;
|
||||
readonly hit: readonly [number, number, number];
|
||||
readonly facing: "north" | "east" | "south" | "west";
|
||||
readonly sneaking: boolean;
|
||||
}
|
||||
|
||||
// P is the component's params from the block json
|
||||
|
||||
Reference in New Issue
Block a user