if string.find("ComputerCraft .*", _HOST or "") then return end ---Like `print`, but without trailing newline ---@vararg any ---@return nil function _G.write(...) --ignored return ... end ---@class ColourAPI ---@field combine fun(colour1:integer, colour2:integer|nil, colour3:integer|nil):integer[] ---@field subtract fun(colours:integer[], colour1:integer, colour2:integer|nil, colour3:integer|nil):integer[] ---@field test fun(colours:integer[], colour:integer):boolean ---@field packRGB fun(r:number, g:number, b:number):string ---@field unpackRGB fun(rgb:string):number,number,number ---@field toBlit fun(colour:integer):string _G.colours = { white = 1, orange = 2, magenta = 4, lightBlue = 8, yellow = 16, lime = 32, pink = 64, grey = 128, lightGrey = 256, cyan = 512, purple = 1024, blue = 2048, brown = 4096, green = 8192, red = 16384, black = 32768, } ---@class ColorAPI ---@field combine fun(color1:integer, color2:integer|nil, color3:integer|nil):integer[] ---@field subtract fun(colors:integer[], color1:integer, color2:integer|nil, color3:integer|nil):integer[] ---@field test fun(colors:integer[], color:integer):boolean ---@field packRGB fun(r:number, g:number, b:number):string ---@field unpackRGB fun(rgb:string):number,number,number ---@field toBlit fun(color:integer):string _G.colors = { white = 1, orange = 2, magenta = 4, lightBlue = 8, yellow = 16, lime = 32, pink = 64, gray = 128, lightGray = 256, cyan = 512, purple = 1024, blue = 2048, brown = 4096, green = 8192, red = 16384, black = 32768, } ---@class Redirect ---@field write fun(text:string) ---@field scroll fun(y:integer) ---@field getCursorPos fun():integer,integer ---@field setCursorPos fun(x:integer, y:integer) ---@field getCursorBlink fun():boolean ---@field setCursorBlink fun(blink:boolean) ---@field getSize fun():integer,integer ---@field clear fun() ---@field clearLine fun() ---@field getTextColour fun():integer ---@field getTextColor fun():integer ---@field setTextColour fun(colour:integer) ---@field setTextColor fun(color:integer) ---@field getBackgroundColour fun():integer ---@field getBackgroundColor fun():integer ---@field setBackgroundColour fun(colour:integer) ---@field setBackgroundColor fun(color:integer) ---@field isColour fun():boolean ---@field isColor fun():boolean ---@field blit fun(text:string, textColour:string, backgroundColour:string) ---@field setPaletteColour fun(colour:integer, hexOrR:integer, g:integer|nil, b:integer|nil) ---@field setPaletteColor fun(color:integer, hexOrR:integer|number, g:number|nil, b:number|nil) ---@field getPaletteColour fun(colour:integer):number,number,number ---@field getPaletteColor fun(color:integer):number,number,number local _ ---@class term : Redirect ---@field write fun(text:string) ---@field scroll fun(y:integer) ---@field getCursorPos fun():integer,integer ---@field setCursorPos fun(x:integer, y:integer) ---@field getCursorBlink fun():boolean ---@field setCursorBlink fun(blink:boolean) ---@field getSize fun():integer,integer ---@field clear fun() ---@field clearLine fun() ---@field getTextColour fun():integer ---@field getTextColor fun():integer ---@field setTextColour fun(colour:integer) ---@field setTextColor fun(color:integer) ---@field getBackgroundColour fun():integer ---@field getBackgroundColor fun():integer ---@field setBackgroundColour fun(colour:integer) ---@field setBackgroundColor fun(color:integer) ---@field isColour fun():boolean ---@field isColor fun():boolean ---@field blit fun(text:string, textColour:string, backgroundColour:string) ---@field setPaletteColour fun(colour:integer, hexOrR:integer, g:integer|nil, b:integer|nil) ---@field setPaletteColor fun(color:integer, hexOrR:integer|number, g:number|nil, b:number|nil) ---@field getPaletteColour fun(colour:integer):number,number,number ---@field getPaletteColor fun(color:integer):number,number,number --- ---@field redirect fun(target:Redirect) ---@field current fun():Redirect ---@field native fun():Redirect _G.term = term ---@class Window : Redirect ---@field write fun(text:string) ---@field scroll fun(y:integer) ---@field getCursorPos fun():integer,integer ---@field setCursorPos fun(x:integer, y:integer) ---@field getCursorBlink fun():boolean ---@field setCursorBlink fun(blink:boolean) ---@field getSize fun():integer,integer ---@field clear fun() ---@field clearLine fun() ---@field getTextColour fun():integer ---@field getTextColor fun():integer ---@field setTextColour fun(colour:integer) ---@field setTextColor fun(color:integer) ---@field getBackgroundColour fun():integer ---@field getBackgroundColor fun():integer ---@field setBackgroundColour fun(colour:integer) ---@field setBackgroundColor fun(color:integer) ---@field isColour fun():boolean ---@field isColor fun():boolean ---@field blit fun(text:string, textColour:string, backgroundColour:string) ---@field setPaletteColour fun(colour:integer, hexOrR:integer, g:integer|nil, b:integer|nil) ---@field setPaletteColor fun(color:integer, hexOrR:integer|number, g:number|nil, b:number|nil) ---@field getPaletteColour fun(colour:integer):number,number,number ---@field getPaletteColor fun(color:integer):number,number,number --- ---@field getLine fun(y:integer):string,string,string @Get the buffered contents of a line in this window ---@field setVisible fun(visible:boolean) @Set whether this window is visible. Invisible windows will not be drawn to the screen until they are made visible again. Making an invisible window visible will immediately draw it. ---@field isVisible fun():boolean @Get whether this window is visible. Invisible windows will not be drawn to the screen until they are made visible again. ---@field redraw fun() @Draw this window. This does nothing if the window is not visible. ---@field restoreCursor fun() @Set the current terminal's cursor to where this window's cursor is. This does nothing if the window is not visible. ---@field getPosition fun():integer,integer @Get the position of the top left corner of this window. ---@field reposition fun(new_x:integer, new_y:integer, new_width:integer|nil, new_height:integer|nil, new_parent:Redirect|nil) @Reposition or resize the given window. local _ ---@class window ---@field create fun(parent:Redirect, x:integer, y:integer, width:integer, height:integer, startVisible:boolean|nil):Window _G.window = window ---@class JSONSerializeOptions ---@field nbt_style boolean ---@field parse_null boolean local _ ---@class textutils ---@field slowWrite fun(sText:string, nRate:number|nil) ---@field slowPrint fun(sText:string, nRate:number|nil) ---@field formatTime fun(nTime:integer, bTwentyFourHour:boolean):string ---@field pagedPrint fun(_sText:string, _nFreeLines:integer) ---@field tabulate fun(t1:table, t2:table|nil, t3:table|nil) ---@field pagedTabulate fun(t1:table, t2:table|nil, t3:table|nil) ---@field serialise fun(t:any):string ---@field serialize fun(t:any):string ---@field unserialise fun(s:string):any ---@field unserialize fun(s:string):any ---@field serialiseJSON fun(t:any, bNBTStyle:boolean|nil):string ---@field serializeJSON fun(t:any, bNBTStyle:boolean|nil):string ---@field unserialiseJSON fun(s:string, options:table|nil):any,nil|string ---@field unserializeJSON fun(s:string, options:table|nil):any,nil|string ---@field urlEncode fun(str:string):string ---@field complete fun(sSearchText:string, sSearchTable:table|nil):string[] _G.textutils = { empty_json_array = {}, json_null = {}, } ---@class itemDetail ---@field name string ---@field count integer ---@field damage integer local _ ---@class itemInspected ---@field name string ---@field metadata integer ---@field state table local _ ---@class turtle ---@field forward fun():boolean ---@field back fun():boolean ---@field up fun():boolean ---@field down fun():boolean ---@field turnLeft fun():boolean ---@field turnRight fun():boolean ---@field refuel fun(itemCount:integer):boolean ---@field select fun(slot:integer|nil):integer ---@field getSelectedSlot fun() ---@field place fun():boolean ---@field placeUp fun():boolean ---@field placeDown fun():boolean ---@field dig fun():boolean ---@field digUp fun():boolean ---@field digDown fun():boolean ---@field suck fun():boolean ---@field suckUp fun():boolean ---@field suckDown fun():boolean ---@field drop fun():boolean ---@field dropUp fun():boolean ---@field dropDown fun():boolean ---@field attack fun():boolean ---@field attackUp fun():boolean ---@field attackDown fun():boolean ---@field compareTo fun(slot:integer):boolean ---@field compare fun():boolean ---@field compareUp fun():boolean ---@field compareDown fun():boolean ---@field inspect fun():boolean,itemInspected|nil ---@field inspectUp fun():boolean,itemInspected|nil ---@field inspectDown fun():boolean,itemInspected|nil ---@field detect fun():boolean ---@field detectUp fun():boolean ---@field detectDown fun():boolean ---@field transferTo fun(slot:integer) ---@field getFuelLevel fun():integer ---@field getFuelLimit fun():integer ---@field getItemCount fun(slot:integer):integer ---@field getItemDetail fun(slot:integer):itemDetail|nil ---@field getItemSpace fun(slot:integer):integer ---@field equipLeft fun(slot:integer):boolean ---@field equipRight fun(slot:integer):boolean ---@field craft fun(amount:integer|nil):boolean _G.turtle = turtle ---@class peripheralWrapped local _ ---@class peripheral ---@field getNames fun():string[] ---@field isPresent fun(name:string):boolean ---@field getName fun(peripheral:peripheralWrapped):string ---@field getType fun(name:string) ---@field getMethods fun(name:string):string[] ---@field call fun(name:string, param1:any, param2:any, etc:any):any ---@field wrap fun(name:string):peripheralWrapped ---@field find fun(type:string, fnFilter:function|nil):peripheralWrapped _G.peripheral = peripheral ---Monitors are a block which act as a terminal, displaying information on one side. This allows them to be read and interacted with in-world without opening a GUI. ---@class Monitor : Redirect, peripheral ---@field write fun(text:string):nil ---@field scroll fun(y:integer):nil ---@field getCursorPos fun():integer,integer ---@field setCursorPos fun(x:integer, y:integer):nil ---@field getCursorBlink fun():boolean ---@field setCursorBlink fun(blink:boolean):nil ---@field getSize fun():integer,integer ---@field clear fun():nil ---@field clearLine fun():nil ---@field getTextColour fun():integer ---@field getTextColor fun():integer ---@field setTextColour fun(colour:integer):nil ---@field setTextColor fun(color:integer):nil ---@field getBackgroundColour fun():integer ---@field getBackgroundColor fun():integer ---@field setBackgroundColour fun(colour:integer):nil ---@field setBackgroundColor fun(color:integer):nil ---@field isColour fun():boolean ---@field isColor fun():boolean ---@field blit fun(text:string, textColour:string, backgroundColour:string):nil ---@field setPaletteColour fun(colour:integer, hexOrR:integer, g:integer|nil, b:integer|nil):nil ---@field setPaletteColor fun(color:integer, hexOrR:integer|number, g:number|nil, b:number|nil):nil ---@field getPaletteColour fun(colour:integer):number,number,number ---@field getPaletteColor fun(color:integer):number,number,number --- ---@field setTextScale fun(size:number):nil local _ ---@class quarkItemMeta ---@field displayName string ---@field count integer ---@field name string ---@field rawName string ---@field maxDamage integer ---@field maxCount integer ---@field damage integer local _ ---@class quarkItemObj ---@field drop fun(limit:integer|nil, direction:string|nil):integer @Drop an item on the ground. Returns the number of items dropped ---@field getDocs fun(name:string):string|table @Get the documentation for all functions or the function specified. Errors if the function cannot be found. ---@field getMetadata fun():quarkItemMeta @Get metadata about this object local _ ---@class quarkMaterial ---@field solid boolean ---@field burns boolean ---@field blocksLight boolean ---@field liquid boolean ---@field requiresTool boolean ---@field opaque boolean ---@field blocksMovement boolean ---@field replaceable boolean local _ ---@class quarkMetadata ---@field color integer ---@field colour integer ---@field metadata integer ---@field state table ---@field translationKey string ---@field name string ---@field displayName string ---@field material quarkMaterial ---@field hardness number local _ ---@class quarkInventory : peripheralWrapped ---@field pullItems fun(fromName:string, fromSlot:integer, limit:integer|nil, toSlot:integer|nil):integer @Pull items to this inventory from another inventory. Returns the amount transferred. ---@field size fun():integer @The size of the inventory ---@field pushItems fun(toNAme:string, fromSlot:integer, limit:integer|nil, toSlot:integer|nil):integer @Push items from this inventory to another inventory. Return the amount transferred. ---@field getItemMeta fun(slot:integer):quarkItemMeta|nil @The metadata of the item in the specified slot. The slot number starts from 1. ---@field getItem fun(slot:integer):quarkItemObj|nil @The item in the specified slot. The slot number starts from 1. ---@field drop fun(slot:integer, limit:integer|nil, direction:string|nil):integer @Drop an item on the ground. Return the number of items dropped ---@field list fun():itemDetail[] @List all items in this inventory ---@field suck fun(slot:integer|nil, limit:integer|nil):integer @Suck an item from the ground ---@field getMetadata fun():table @Get metadata about this object ---@field getTransferLocations fun(location:string|nil):string[] @Get a list of all available objects which can be transferred to or from ---@field getDocs fun(name:string|nil):table|string @Get the documentation for all functions or the function specified. Errors if the function cannot be found. local _ ---@class quarkFurnace : quarkInventory ---@field pullItems fun(fromName:string, fromSlot:integer, limit:integer|nil, toSlot:integer|nil):integer @Pull items to this inventory from another inventory. Returns the amount transferred. ---@field size fun():integer @The size of the inventory ---@field pushItems fun(toNAme:string, fromSlot:integer, limit:integer|nil, toSlot:integer|nil):integer @Push items from this inventory to another inventory. Return the amount transferred. ---@field getItemMeta fun(slot:integer):quarkItemMeta|nil @The metadata of the item in the specified slot. The slot number starts from 1. ---@field getItem fun(slot:integer):quarkItemObj|nil @The item in the specified slot. The slot number starts from 1. ---@field drop fun(slot:integer, limit:integer|nil, direction:string|nil):integer @Drop an item on the ground. Return the number of items dropped ---@field list fun():itemDetail[] @List all items in this inventory ---@field suck fun(slot:integer|nil, limit:integer|nil):integer @Suck an item from the ground ---@field getMetadata fun():table @Get metadata about this object ---@field getTransferLocations fun(location:string|nil):string[] @Get a list of all available objects which can be transferred to or from ---@field getDocs fun(name:string|nil):table|string @Get the documentation for all functions or the function specified. Errors if the function cannot be found. --- ---@field getCookTime fun():integer @Number of ticks the current item has cooked for ---@field getBurnTime fun():integer @Number of ticks of burning the current fuel provides ---@field getRemainingBurnTime fun():integer @Number of ticks of fuel left local _