ctx.blocks.solid(id) api
This commit is contained in:
@@ -56,6 +56,8 @@ export interface ClientContext {
|
||||
// the components its json lists and their params, a copy, like the server's ctx.blocks.components. for showing
|
||||
// what a component does, like what a crab pot catches
|
||||
components(id: Id): Record<Id, unknown>;
|
||||
// whether it's solid like stone, like the server's ctx.blocks.solid
|
||||
solid(id: Id): boolean;
|
||||
};
|
||||
// the mods' loot table files (see docs/modding/resources/loot_tables.md), to show what they give. tables server
|
||||
// scripts make with ctx.loot.register_table aren't here
|
||||
|
||||
@@ -511,6 +511,9 @@ export interface BlockApi {
|
||||
toughness(id: Id): number;
|
||||
// the components its json lists and their params, a copy, like ItemApi.components
|
||||
components(id: Id): Record<Id, unknown>;
|
||||
// whether it's solid like stone: drawn in the solid layer, and a whole block to bump into in every state. glass,
|
||||
// leaves, slabs and chests aren't. what passes signals on, and what wire turns corners around. false for air
|
||||
solid(id: Id): boolean;
|
||||
}
|
||||
|
||||
export interface RecipeApi {
|
||||
|
||||
@@ -72,6 +72,8 @@ export interface SharedContext {
|
||||
exists(id: Id): boolean;
|
||||
// the components its json lists and their params, a copy
|
||||
components(id: Id): Record<Id, unknown>;
|
||||
// whether it's solid like stone, like the server's ctx.blocks.solid
|
||||
solid(id: Id): boolean;
|
||||
};
|
||||
readonly components: {
|
||||
// the rules of a block component, the same id the server script registers the rest of it under
|
||||
|
||||
Reference in New Issue
Block a user