import { Client } from "https://deno.land/x/replcraft@v1.1.0/lib/client.ts";
Properties
connection: StandardWebSocketClient | null
token: Token | null
Methods
private
wait(action: ActionType, nonce: number): Promise<ActionData>Wait until the server has responded to an event with the specified identifier.
craft(output: Location, recipe: (SlotReference | null)[]): Promise<void>
Craft an item using its recipe.
getFuelInfo(): Promise<FuelInfo>
Get information about the current fuel usage of the structure and all connected clients.
getInventory(location: Location): Promise<ItemSlot[]>
Get the contents of a container within the structure.
pollAll(): Promise<void>
Poll all of the structure's blocks for updates. This is way slower than Client#watch(), and not as reliable.
send(action: ActionType, data?: ActionData): Promise<ActionData>
Send a request to the ReplCraft server. You should not use this function directly.
setBlock(): Promise<void>
Set the state of the block at the specified location inside of the structure.
watchAll(): Promise<void>
Watch all of the structure's block for updates. This may not catch all possible block updates.