Test mod
This commit is contained in:
@@ -48,6 +48,12 @@ export class EverythingRegistry {
|
||||
static get_registry<T>(registry: string): T[] {
|
||||
return this.#id_to_value.get(registry) as T[];
|
||||
}
|
||||
|
||||
// [key, value] pairs in registration order
|
||||
static entries<T>(registry: string): [string, T][] {
|
||||
const values = this.#id_to_value.get(registry) ?? [];
|
||||
return [...(this.#key_to_id.get(registry) ?? [])].map(([key, id]) => [key, values[id] as T]);
|
||||
}
|
||||
}
|
||||
|
||||
interface TextureSideTopBottom {
|
||||
@@ -96,6 +102,8 @@ export interface BlockRegistry {
|
||||
// right clicking it does something instead of placing a block, clients don't predict placing against it.
|
||||
// behavior runs on the server, see server/game/blocks.ts
|
||||
interactive?: boolean;
|
||||
// placing a block into it replaces it, like water
|
||||
replaceable?: boolean;
|
||||
|
||||
compiled_states?: CompiledStateDefinition[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user