sharing contexts
This commit is contained in:
@@ -70,8 +70,8 @@ export class BlockRules {
|
||||
readonly told?: (x: number, y: number, z: number, from: Position) => void,
|
||||
) {}
|
||||
|
||||
// checked by the shared context, see common/shared_context.ts
|
||||
register(mod: string, id: string, rules: Rules) {
|
||||
if (this.#rules.has(id)) throw new Error(`[${mod}] the rules of ${id} are registered twice`);
|
||||
this.#rules.set(id, { mod, rules });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user