Chip documentation
Introductions
The 'chip' API allows you to make some baseline interactions with the machine running code (the minecraft block not your pc), including allowing programs to probe for the current Unix time, fetch the machines make and model, read its uuid, and manipulate the computers state.
The chip api exists in the global space as "chip" or "_G.chip"
Lookup table
| getUUID() | Fetches a text representation of the computers unique one of a kind id |
| getMachine() | Gets a text description of the type of computer running code |
| crash(message) | Forcefully crashes the computer with the given error message |
| shutdown() | Forcefully shuts down the computer |
| version() | Looks up the current version of NEET computers in service |
| getTime() | Gets the total amount of time the computer has been executing code, in seconds |
| getUnixTime() | Gets the current time in Unix time, in seconds |
| getLunarTime() | Gets the current game lunar time |
| ToAsciiFromGLFW(code, mod = 0) | Converts GLFW codes to ascii |
Functions in detail
getUUID()
Gets the running machines UUID
Parameters: None Returns: StringgetMachine()
Gets a text description of the machine running (example: "Desktop Computer" or "Office Computer")
Parameters: None Returns: Stringcrash(message)
Crashes the computer with the given error message
Parameters: Message[String] Returns: Noneshutdown()
Shuts down the computer
Parameters: None Returns: NonegetTime()
Gets the total amount of time the computer has been executing code, in seconds
Parameters: None Returns: DecimalgetUnixTime()
Gets the current time in Unix time, in seconds
Parameters: None Returns: DecimalgetLunarTime()
Gets the current game lunar time, some benchmarks provided
- Day: 1000
- Noon: 6000
- Night: 13000
- Midnight: 18000
ToAsciiFromGLFW(code, mod = 0)
Converts key codes from GLFW to ASCII, all codes in NEET are ascii by default but this function exists for legacy systems (Computer Craft integration)
Parameters: Code[Integer], Mod[Integer] default value 0 Returns: Integer