MineJSv0.5.1

PacketRegistry

Source: registry.ts:334


Constructors

new PacketRegistry(): PacketRegistry

Returns

PacketRegistry


Static Methods

getPacket( state: 'handshaking' | 'status' | 'login' | 'configuration' | 'play', type: 'clientbound' | 'serverbound', id: string | number, ): { id: number; name: string; skipForNow: boolean; structure: Record<string, FieldNode> } | undefined

Parameters

  • state ("handshaking" | "status" | "login" | "configuration" | "play")
  • type ("clientbound" | "serverbound")
  • id (string | number)

Returns

  • { id: number; name: string; skipForNow: boolean; structure: Record<string, FieldNode> } | undefined

load(version: string): Promise<void>

Load block registry from JSON file.

Should be called once time

Parameters

  • version (string)

Returns

  • Promise<void>