mcraft-fun-mineflayer
Version:
Mineflayer viewer (connector) for mcraft.fun project and vanilla Minecraft client! Both TCP and WebSockets servers are supported.
21 lines (20 loc) • 742 B
TypeScript
import { Bot } from 'mineflayer';
import { AuxClientsState, handleAuxClientsProxy } from './generalPacketsProxy';
import { Client, ServerClient } from 'minecraft-protocol';
export declare class MineflayerPacketHandler {
private bot;
private auxClientsState;
private Item;
auxHelpers: ReturnType<typeof handleAuxClientsProxy>;
loginState: string;
onClientJoin: ((client: Client) => void)[];
constructor(bot: Bot, auxClientsState: AuxClientsState);
private setupPacketListeners;
private writeClients;
private patchBotMethods;
updateSlot(clients?: any[]): void;
updateHealth(clients?: any[]): void;
handleNewConnection(client: ServerClient): void;
private debug;
private sendChunks;
}