Cog wheels
This commit is contained in:
@@ -125,8 +125,9 @@ export interface BlockInteraction {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
export interface BlockRules<P = any> {
|
||||
// the states it's placed with when a player places it, like minecraft's getStateForPlacement. states it doesn't
|
||||
// return keep their defaults, and a 2 bit "facing" faces the player
|
||||
state_for_placement?(placement: BlockPlacement, params: P): Record<string, number> | void;
|
||||
// return keep their defaults, and a 2 bit "facing" faces the player. false when it can't go there, so it isn't
|
||||
// placed, like getStateForPlacement returning null
|
||||
state_for_placement?(placement: BlockPlacement, params: P): Record<string, number> | false | void;
|
||||
// a block next to it (on any of the 6 sides) was placed, broken or changed its states, like minecraft's
|
||||
// updateShape. neighbor is where, and what's there now
|
||||
on_neighbor_change?(block: SharedBlock, params: P, neighbor: SharedBlock): void;
|
||||
|
||||
Reference in New Issue
Block a user