Skip to main content
Module

x/minecraft_lib/core/mod.ts>Registry

A collection of modules that can be used to build Minecraft servers, clients, utilities and other tools.
Latest
class Registry
import { Registry } from "https://deno.land/x/minecraft_lib@0.1.0/core/mod.ts";

Constructors

new
Registry(defaultKey?: Key)

Type Parameters

Value
optional
Key extends string = string

Properties

readonly
size: number

Methods

entries(): Iterable<[string, Value]>
getById(id: number): Value | null
getByKey(key: Key): Value | null
getId(value: Value): number

Returns -1 if no value is found.

getKey(value: Value): Key | null
keys(): Iterable<string>
register<T extends Value>(key: Key, value: T): T
values(): Iterable<Value>