The name may have given it away: the main feature this mod adds are programmable computers. Please do at least read the disclaimer paragraph. Since people kept asking, I have a Patreon account now. You are free to use this mod in public and private modpacks alike, no questions asked. minecraft/mods folder (do not extract it!). Download and copy the mod's JAR into your.If you need additional support, browse the forums at or drop by the IRC, channel #oc on, or join us on Discord. Inter-operation with many other mods is provided via the Adapter block (for example reading power information from energy cells and so on).įor more information, please visit the Wiki at where, aside from blocks and items in the mod, the built-in Lua APIs are documented as well, so you can read up what you can actually do with the computers. There are a lot of components in the mod that can be used to extend computers, such as motion sensors, holograms and there are also robots. minecraft/config/opencomputers/user.recipes for more information). If you want an extra challenge, try the hard mode recipe set (see. OpenComputers is designed to fit well with survival gameplay, and is played best in combination with other mods, which allow automating ore processing, and ideally crafting to some extent! Computers are not cheap to craft, so don't expect to build your first computer early when starting a new game. If a compatible power generating mod is present, by default they will need power to run - however, like pretty much everything else about the mod, this can be changed in the config. execution resumes where the computer was saved when it is loaded again), they are highly modular (there are graphics cards, network cards, redstone cards. ( this is normally used for logging etc.)įlushes the data to the specified file.This mod adds computers that can be programmed in Lua 5.2 and 5.3. If you just want to save a file, without closing the handle, then you could do a flush. Writes a string of characters to the file, then appends an end-of-line character Writes a string of characters to the file exactly as they appear in the string data String the entire rest of the file, with the end-of-line character on the very last line (if present) strippedĪ file opened in mode "w" (text write mode) or "a" (text append mode) exposes the following functions: String the next line read from the file, with the end-of-line character stripped or nil if there are no more lines in the file A file opened in any mode exposes the following close function:Ĭloses the file handle, after which it can no longer be usedĪ file opened in mode "r" (text read mode) exposes the following functions. When you open a file you must remember to close the handle when you've finished with it! The write modes supported by ComputerCraft may not actually output data until this is done. The examples below assume a file has already been opened and the handle stored in the variable h. A file handle is a table the functions within the table are accessed with the dot operator ( not the colon operator, as may be more intuitive!). Local h = fs.open("abcd", fs.exists("abcd") and "a" or "w")Ī file handle allows access to a file. Opens "abcd" in either append or write mode, depending on whether it already exists or not. 2.5 Files opened in binary write/append modeĬreates the file "abcd" for writing, and holds a file handle to it.2.3 Files opened in text write/append mode.if mode was "r" and the file did not exist, or if mode was "w" or "a" and the file was in a read-only location) Table the file handle, or nil on error (e.g. When you have opened a file you must always close the file handle, or else data may not be saved.Īppend mode and write mode both create a new file if none already exists (and write mode creates a new one even if one does) however, under a few builds of ComputerCraft in the 1.5x range, append mode will fail if an existing file cannot be found. In either case, any characters not supported are translated to 0x3F (representing a question mark). Prior to ComputerCraft 1.76, instead only printable ASCII characters are supported. Text mode file handles assume UTF-8 encoding for both input and output purposes, and supports all characters within the ISO 8859-1 codepage (plus a few extras).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |