import Minecraft from "./net/minecraft/client/Minecraft"; import Entity from "./net/minecraft/entity/Entity"; import ItemStack from "./net/minecraft/item/ItemStack"; import Packet from "net/minecraft/network/Packet"; declare global { var mc: Minecraft; class chat { /** * Prints a message into that chat without sending it to the server. * * @param message - Message to be printed */ static print(message: string): void; } class script { /** * Imports an external script file. * * @param path - Path to the file to be imported */ static import(path: string): void; } class moduleManager { /** * Registers a script module. * * @param module - Instance of the script module to be registered */ static registerModule(module: customModule): adaptedModule; /** * Unregisters a client module. * * @param module - Client module to be unregistered */ static unregisterModule(module: adaptedModule): void; /** * Unregisters a client module. * * @param module - Client module to be unregistered * @param autoDisable - Whether the module should be automatically disabled */ static unregisterModule(module: adaptedModule, autoDisable: boolean): void; /** * Gets a module from the client. * * @param name - Name of the module * * @returns Client module */ static getModule(name: string): adaptedModule; } abstract class customModule { onUpdate?(): void; onEnabled?(): void; onDisable?(): void; onAttack?(event: attackEvent): void; onJump?(event: jumpEvent): void; onPacket?(event: packetEvent): void; onRender3D?(event: render3DEvent): void; onRender2D?(event: render2DEvent): void; onMotion?(event: motionEvent): void; } interface cancelableEvent { /** * Cancels the event */ cancelEvent(): void; /** * Whether the event is cancelled * * @returns Whether event is cancelled */ isCancelled(): boolean; } interface eventState { /** * Returns name of event state. Either "PRE" or "POST". * * @returns State of event */ getStateName(): string; } interface attackEvent { /** * Gets the attacked entity. * * @returns Attacked entity */ getTargetEntity(): Entity; } interface jumpEvent extends cancelableEvent { /** * Gets motion of jump. * * @returns Motion of jump */ getMotion(): number; /** * Sets motion of the jump. */ setMotion(motion: number): void; } interface packetEvent extends cancelableEvent { /** * Gets packet which triggered event. * * @returns The packet */ getPacket(): Packet } interface render3DEvent { /** * Gets current partial ticks. Used to render FPS independent animations. * * @returns Current partial ticks */ getPartialTicks(): number; } interface render2DEvent { /** * Gets current partial ticks. Used to render FPS independent animations. * * @returns Current partial ticks */ getPartialTicks(): number; } interface motionEvent { /** * State of motion event. * * @returns Event state */ getEventState(): eventState; } abstract class commandManager { /** * Registers a script command. * * @param command - Instance of the script command to be registered */ static registerCommand(command: customCommand): void; /** * Unregisters a client command. * * @param command - Client command to be unregistered */ static unregisterCommand(command: customCommand): void; /** * Executes a command. * * @param command - Client command to be executed */ static executeCommand(command: string): void; /** * Executes a command. * * @param command - Client command to be executed * @param parameters - Array of command parameters */ static executeCommand(command: customCommand, ...parameters: string[]): void; } abstract class customCommand { execute?(args: string[]): void; } abstract class item { /** * Creates a new ItemStack * * @param itemArguments - string containing arguments for item creation * * @returns New ItemStack */ static createItem(itemArguments: string): ItemStack; } interface adaptedModule { /** * Gets the name of module. * * @returns Name of the module */ getName(): string; /** * Gets the description of module. * * @returns Description of the module */ getDescription(): string; /** * Gets the category of module. * * @returns Category of the module */ getCategory(): string; /** * Gets the state of module. * * @returns State of the module */ getState(): boolean; /** * Sets the state of module. * * @param state - Whether the module should be enabled or disabled */ setState(state: boolean): void; /** * Gets the bind of module. * * @returns Bind of the module */ getBind(): number; /** * Sets the bind of module. * * @param state - Key code the module should be bound to */ setBind(key: number): void; /** * Gets a value of module. * * @returns The value */ getValue(name: string): boolean | number | string; /** * Sets a value a of module. * * @param name - Name of the value to be set * @param value - Value the setting should be set to */ setValue(name: string, value: boolean | number | string): void; /** * Registers the module. */ register(): void; /** * Unregisters the module. */ unregister(): void; } } export { }