Description
This is the component provided by the open printer block.
Component name: openprinter
.
This is the component provided by the open printer block.
Component name: openprinter
.
writeln(text:String[,color:number][,position:String])
color format is 0xRRGGBB, using this will add one use of your color ink cartridge, enter will attempt to render the string in the center of the page, instead of left justified. you can use Minecraft's chat formatting control codes with calls to writeln, Minecraft Color Codes EACH CALL to a COLOR set will add one use of the color ink cartridge, calls to format codes will NOT.
setTitle(title:String)
Sets the "name" of the printed page, this also effects the item display in your inventory, never forget which page is which!
getPaperLevel():number
Returns the amount of paper in your printer, 0-64 for Normal MC paper, or 0-256 for a paper roll.
getColorInkLevel():number
returns the number of uses left in the color ink cartridge 0-4000 (default).
getBlackInkLevel():number
returns the number of uses left in the black ink cartridge 0-4000 (default).
clear()
Will clear everything set by previous calls to writeln().
print():boolean
Calling this method will print all previous calls to writeln to the printer.
scan():table
scans a printed page and returns the lines as table
scanLine(lineNumber:number):String
scans the given line from a printed page.
scanBook():table
scans a book and returns its as table (vanilla and bibliocraft BigBook are currently supported).