Difference between revisions of "Printer"

From ComputerCraft Wiki
Jump to: navigation, search
(fixed even more derping!)
Line 17: Line 17:
 
Ink slot is accessible from: Back or Sides
 
Ink slot is accessible from: Back or Sides
  
[[File:PrinterGUI.png|thumb|350px|GUI of the Printer]]
+
[[File:PrinterGUI.png|thumb|256px|GUI of the Printer]]
  
 
==Methods==
 
==Methods==
Line 24: Line 24:
 
!style="background:#EEE" width="*"|Description
 
!style="background:#EEE" width="*"|Description
 
|-
 
|-
|[[printer]].[[printer.getPaperLevel|getPaperLevel]]()
+
|printer.[[printer.getPaperLevel|getPaperLevel]]()
 
|Returns the amount of paper avaible in the paper tray.
 
|Returns the amount of paper avaible in the paper tray.
 
|-
 
|-
|[[printer]].[[printer.getCursorPos|getCursorPos]]()
+
|printer.[[printer.getCursorPos|getCursorPos]]()
 
|Returns the coordinates of the cursor on the paper, works the same way as [[term.getCursorPos()]]
 
|Returns the coordinates of the cursor on the paper, works the same way as [[term.getCursorPos()]]
 
|-
 
|-
|[[printer]].[[printer.getPageSize|getPageSize]]()
+
|printer.[[printer.getPageSize|getPageSize]]()
 
|Returns the size of the paper, works the same way as [[term.getSize()]]
 
|Returns the size of the paper, works the same way as [[term.getSize()]]
 
|-
 
|-
|[[printer]].[[printer.getInkLevel|getInkLevel]]()
+
|printer.[[printer.getInkLevel|getInkLevel]]()
 
|Returns the amount of ink in the ink slot.
 
|Returns the amount of ink in the ink slot.
 
|-
 
|-
|[[printer]].[[printer.setCursorPos|setCursorPos]]( x, y )
+
|printer.[[printer.setCursorPos|setCursorPos]]( x, y )
 
|Sets the cursor pos.
 
|Sets the cursor pos.
 
|-
 
|-
|[[printer]].[[printer.newPage|newPage]]()
+
|printer.[[printer.newPage|newPage]]()
 
|Starts a new page. Returns true if page got started, false if not.
 
|Starts a new page. Returns true if page got started, false if not.
 
|-
 
|-
|[[printer]].[[printer.write|write]]( text )
+
|printer.[[printer.write|write]]( text )
 
|Writes text to the paper, works the same way as [[term.write()]]
 
|Writes text to the paper, works the same way as [[term.write()]]
 
|-
 
|-
|[[printer]].[[printer.setPageTitle|setPageTitle]]( text )
+
|printer.[[printer.setPageTitle|setPageTitle]]( text )
 
|Sets the title of the page.
 
|Sets the title of the page.
 
|-
 
|-
|[[printer]].[[printer.endPage|endPage]]()
+
|printer.[[printer.endPage|endPage]]()
 
|Ends the page and prints the page to the output tray. Returns true if page was ended, false if not.
 
|Ends the page and prints the page to the output tray. Returns true if page was ended, false if not.
 
|}
 
|}
  
 
[[Category:Blocks]]
 
[[Category:Blocks]]

Revision as of 09:32, 20 September 2012

The printer got added in the ComputerCraft 1.42 update. The printer is placed next to a computer, and allows for printing text onto paper with any color of ink.


Recipe

stone

stone

stone

stone

stone

stone

stone

printer



Usage

To use a printer, place it adjacently but not diagonally next to a computer (left, right, top, bottom, front, or back side). Place any color ink in the single left slot, and paper in any of the top slots.

If you are using blocks to pull/insert items from the printer the diffrent slots are avaible from these sides: Paper tray is accessible from: Top Output paper tray is accessible from: Front or Bottom Ink slot is accessible from: Back or Sides

GUI of the Printer

Methods

Method name Description
printer.getPaperLevel() Returns the amount of paper avaible in the paper tray.
printer.getCursorPos() Returns the coordinates of the cursor on the paper, works the same way as term.getCursorPos()
printer.getPageSize() Returns the size of the paper, works the same way as term.getSize()
printer.getInkLevel() Returns the amount of ink in the ink slot.
printer.setCursorPos( x, y ) Sets the cursor pos.
printer.newPage() Starts a new page. Returns true if page got started, false if not.
printer.write( text ) Writes text to the paper, works the same way as term.write()
printer.setPageTitle( text ) Sets the title of the page.
printer.endPage() Ends the page and prints the page to the output tray. Returns true if page was ended, false if not.