A C D E G H I L M O P Q R S T U V W Y

A

attach(IComputerAccess) - Method in interface dan200.computer.api.IPeripheral
Is called when canAttachToSide has returned true, and a computer is attaching to the peripheral.
attackWithItemStack(net.minecraft.item.ItemStack, int, float) - Method in interface dan200.turtle.api.ITurtleAccess
Tries to "attack" entities with an item stack in the direction specified.

C

callMethod(ILuaContext, int, Object[]) - Method in interface dan200.computer.api.ILuaObject
Called when a user calls one of the methods that this object implements.
callMethod(IComputerAccess, ILuaContext, int, Object[]) - Method in interface dan200.computer.api.IPeripheral
This is called when a lua program on an attached computer calls peripheral.call() with one of the methods exposed by getMethodNames().

Be aware that this will be called from the ComputerCraft Lua thread, and must be thread-safe when interacting with minecraft objects.
canAttachToSide(int) - Method in interface dan200.computer.api.IPeripheral
Is called before the computer attempts to attach to the peripheral, and should return whether to allow the attachment.
ComputerCraftAPI - Class in dan200.computer.api
The static entry point to the ComputerCraft API.
ComputerCraftAPI() - Constructor for class dan200.computer.api.ComputerCraftAPI
 
consumeFuel(int) - Method in interface dan200.turtle.api.ITurtleAccess
Removes some fuel from the turtles fuel supply.
createDataMount(ItemStack, World) - Method in interface dan200.computer.api.IMedia
If this disk represents an item with data (like a floppy disk), get a mount representing it's contents.
createPeripheral(ITurtleAccess, TurtleSide) - Method in interface dan200.turtle.api.ITurtleUpgrade
Will only be called for Peripheral upgrades.
createResourceMount(Class, String, String) - Static method in class dan200.computer.api.ComputerCraftAPI
Creates a file system mount to a resource folder, and returns it.
Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.
The files in this mount will be a combination of files in the specified mod jar, and resource packs that contain resources with the same domain and path.
createSaveDirMount(World, String, long) - Static method in class dan200.computer.api.ComputerCraftAPI
Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.
Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the users save directory onto a computers file system.
createUniqueNumberedSaveDir(World, String) - Static method in class dan200.computer.api.ComputerCraftAPI
Creates a numbered directory in a subfolder of the save directory for a given world, and returns that number.
Use in conjuction with createSaveDirMount() to create a unique place for your peripherals or media items to store files.

D

dan200.computer.api - package dan200.computer.api
 
dan200.turtle.api - package dan200.turtle.api
 
delete(String) - Method in interface dan200.computer.api.IWritableMount
Deletes a directory at a given path inside the virtual file system.
deployWithItemStack(net.minecraft.item.ItemStack, int) - Method in interface dan200.turtle.api.ITurtleAccess
"Deploys" an item stack in the direction specified.
detach(IComputerAccess) - Method in interface dan200.computer.api.IPeripheral
Is called when a computer is detaching from the peripheral.
dropItemStack(net.minecraft.item.ItemStack, int) - Method in interface dan200.turtle.api.ITurtleAccess
Drops an item stack from the turtle onto the floor, or into an inventory is there is one adjacent to the turtle in the direction specified.

E

exists(String) - Method in interface dan200.computer.api.IMount
Returns whether a file with a given path exists or not.

G

getAdjective() - Method in interface dan200.turtle.api.ITurtleUpgrade
Return a String to describe this type of upgrade in turtle item names.
getAttachmentName() - Method in interface dan200.computer.api.IComputerAccess
Get a string, unique to the computer, by which the computer refers to this peripheral.
getAudioRecordName(ItemStack) - Method in interface dan200.computer.api.IMedia
If this disk represents an item with audio (like a record), get the resource name of the audio track to play.
getAudioTitle(ItemStack) - Method in interface dan200.computer.api.IMedia
If this disk represents an item with audio (like a record), get the readable name of the audio track.
getCraftingItem() - Method in interface dan200.turtle.api.ITurtleUpgrade
Return an item stack representing the type of item that a turtle must be crafted with to create a turtle which holds this upgrade.
getFacingDir() - Method in interface dan200.turtle.api.ITurtleAccess
Returns the world direction the turtle is currently facing.
getFuelLevel() - Method in interface dan200.turtle.api.ITurtleAccess
Returns the current fuel level of the turtle, this is the same integer returned by turtle.getFuelLevel(), that decreases by 1 every time the turtle moves.
getIcon(ITurtleAccess, TurtleSide) - Method in interface dan200.turtle.api.ITurtleUpgrade
Called to obtain the Icon to be used when rendering a turtle peripheral.
getID() - Method in interface dan200.computer.api.IComputerAccess
Returns the numerical ID of this computer.
This is the same number obtained by calling os.getComputerID() or running the "id" program from lua, and is guarunteed unique.
getInventorySize() - Method in interface dan200.turtle.api.ITurtleAccess
Returns the size of the turtles inventory, in number of slots.
getLabel(ItemStack) - Method in interface dan200.computer.api.IMedia
Get a string representing the label of this item.
getMethodNames() - Method in interface dan200.computer.api.ILuaObject
Get the names of the methods that this object implements.
getMethodNames() - Method in interface dan200.computer.api.IPeripheral
Should return an array of strings that identify the methods that this peripheral exposes to Lua.
getPeripheral(net.minecraft.tileentity.TileEntity) - Method in interface dan200.computer.api.IPeripheralHandler
 
getPeripheral(TurtleSide) - Method in interface dan200.turtle.api.ITurtleAccess
Returns the peripheral created by the upgrade on the specified side of the turtle, if there is one.
getPosition() - Method in interface dan200.turtle.api.ITurtleAccess
Returns a vector containing the integer block co-ordinates at which the turtle resides.
getRemainingSpace() - Method in interface dan200.computer.api.IWritableMount
Get the ammount of free space on the mount, in bytes.
getSelectedSlot() - Method in interface dan200.turtle.api.ITurtleAccess
Returns which slot the turtle currently has selected in its inventory using turtle.select().
getSize(String) - Method in interface dan200.computer.api.IMount
Returns the size of a file with a given path, in bytes
getSlotContents(int) - Method in interface dan200.turtle.api.ITurtleAccess
Returns the item stack that the turtle has in one of its inventory slots.
getType() - Method in interface dan200.computer.api.IPeripheral
Should return a string that uniquely identifies this type of peripheral.
getType() - Method in interface dan200.turtle.api.ITurtleUpgrade
Return whether this upgrade adds a tool or a peripheral to the turtle.
getUpgrade(TurtleSide) - Method in interface dan200.turtle.api.ITurtleAccess
Returns the upgrade on the specified side of the turtle, if there is one.
getUpgradeID() - Method in interface dan200.turtle.api.ITurtleUpgrade
Gets a unique numerical identifier representing this type of turtle upgrade.
getVisualPosition(float) - Method in interface dan200.turtle.api.ITurtleAccess
Returns a vector containing the co-ordinates at which the turtle is rendered.
getWorld() - Method in interface dan200.turtle.api.ITurtleAccess
Returns the world in which the turtle resides.

H

handleCommand(ITurtleAccess) - Method in interface dan200.turtle.api.ITurtleCommandHandler
Will be called by the turtle on the main thread when it is time to execute the custom command.

I

IComputerAccess - Interface in dan200.computer.api
The interface passed to peripherals by computers or turtles, providing methods that they can call.
IHostedPeripheral - Interface in dan200.computer.api
A subclass of IPeripheral specifically for peripherals created by ITurtleUpgrade's of type Peripheral.
ILuaContext - Interface in dan200.computer.api
An interface passed to peripherals and ILuaObjects' by computers or turtles, providing methods that allow the peripheral call to wait for events before returning, just like in lua.
ILuaObject - Interface in dan200.computer.api
An interface for representing custom objects returned by IPeripheral.callMethod() calls.
IMedia - Interface in dan200.computer.api
Represents an item that can be placed in a disk drive and used by a Computer.
IMount - Interface in dan200.computer.api
Represents a read only part of a virtual filesystem that can be mounted onto a computer using IComputerAccess.mount().
IPeripheral - Interface in dan200.computer.api
The interface that defines a peripheral.
IPeripheralHandler - Interface in dan200.computer.api
TODO: Document me
isDirectory(String) - Method in interface dan200.computer.api.IMount
Returns whether a file with a given path is a directory or not.
isSecret() - Method in interface dan200.turtle.api.ITurtleUpgrade
Return whether this turtle upgrade is an easter egg, and should be attempted to be hidden from the creative mode inventory and recipe book plugins.
issueCommand(ITurtleCommandHandler) - Method in interface dan200.turtle.api.ITurtleAccess
Adds a custom command to the turtles command queue.
ITurtleAccess - Interface in dan200.turtle.api
The interface passed to upgrades by turtles, providing methods that they can call.
ITurtleCommandHandler - Interface in dan200.turtle.api
An interface for objects executing custom turtle commands, used with ITurtleAccess.issueCommand
ITurtleUpgrade - Interface in dan200.turtle.api
The primary interface for defining an upgrade for Turtles.
IWritableMount - Interface in dan200.computer.api
Represents a part of a virtual filesystem that can be mounted onto a computer using IComputerAccess.mount() or IComputerAccess.mountWritable(), that can also be written to.

L

list(String, List<String>) - Method in interface dan200.computer.api.IMount
Returns the file names of all the files in a directory.

M

makeDirectory(String) - Method in interface dan200.computer.api.IWritableMount
Creates a directory at a given path inside the virtual file system.
mount(String, IMount) - Method in interface dan200.computer.api.IComputerAccess
Mount a mount onto the computers' file system in a read only mode.
mountWritable(String, IWritableMount) - Method in interface dan200.computer.api.IComputerAccess
Mount a mount onto the computers' file system in a writable mode.

O

openForAppend(String) - Method in interface dan200.computer.api.IWritableMount
Opens a file with a given path, and returns an outputstream for appending to it.
openForRead(String) - Method in interface dan200.computer.api.IMount
Opens a file with a given path, and returns an inputstream representing it's contents.
openForWrite(String) - Method in interface dan200.computer.api.IWritableMount
Opens a file with a given path, and returns an outputstream for writing to it.

P

pullEvent(String) - Method in interface dan200.computer.api.ILuaContext
Wait for an event to occur on the computer, suspending the thread until it arises.
pullEventRaw(String) - Method in interface dan200.computer.api.ILuaContext
The same as pullEvent(), except "terminated" events are ignored.

Q

queueEvent(String, Object[]) - Method in interface dan200.computer.api.IComputerAccess
Causes an event to be raised on this computer, which the computer can respond to by calling os.pullEvent().

R

readFromNBT(net.minecraft.nbt.NBTTagCompound) - Method in interface dan200.computer.api.IHostedPeripheral
A method called whenever data is read from the Turtle's NBTTag, over the lifetime of the turtle.
refuelWithItemStack(net.minecraft.item.ItemStack) - Method in interface dan200.turtle.api.ITurtleAccess
Tries to increase the fuel level of a turtle by burning an item stack.
registerExternalPeripheral(Class<? extends net.minecraft.tileentity.TileEntity>, IPeripheralHandler) - Static method in class dan200.computer.api.ComputerCraftAPI
Registers a peripheral handler for a TileEntity that you do not have access to.
registerUpgrade(ITurtleUpgrade) - Static method in class dan200.turtle.api.TurtleAPI
Registers a new turtle upgrade for use in ComputerCraft.

S

setLabel(ItemStack, String) - Method in interface dan200.computer.api.IMedia
Set a string representing the label of this item.
setSlotContents(int, net.minecraft.item.ItemStack) - Method in interface dan200.turtle.api.ITurtleAccess
Changes the item stack that the turtle has in one of its inventory slots.
storeItemStack(net.minecraft.item.ItemStack) - Method in interface dan200.turtle.api.ITurtleAccess
Tries to store an item stack into the turtles current inventory, starting from the turtles currently selected inventory slot.

T

TurtleAPI - Class in dan200.turtle.api
The static entry point to the ComputerCraft Turtle Upgrade API.
TurtleAPI() - Constructor for class dan200.turtle.api.TurtleAPI
 
TurtleSide - Enum in dan200.turtle.api
An enum representing the two sides of the turtle that a turtle upgrade might reside.
TurtleUpgradeType - Enum in dan200.turtle.api
An enum representing the two different types of upgrades that an ITurtleUpgrade implementation can add to a turtle.
TurtleVerb - Enum in dan200.turtle.api
An enum representing the two different actions that an ITurtleUpgrade of type Tool may be called on to perform by a turtle.

U

unmount(String) - Method in interface dan200.computer.api.IComputerAccess
Unmounts a directory previously mounted onto the computers file system by mount() or mountWritable().
When a directory is unmounted, it will disappear from the computers file system, and the user will no longer be able to access it.
update() - Method in interface dan200.computer.api.IHostedPeripheral
A method called on each hosted peripheral once per tick, on the main thread over the lifetime of the turtle or block.
useTool(ITurtleAccess, TurtleSide, TurtleVerb, int) - Method in interface dan200.turtle.api.ITurtleUpgrade
Will only be called for Tool upgrades.

V

valueOf(String) - Static method in enum dan200.turtle.api.TurtleSide
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum dan200.turtle.api.TurtleUpgradeType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum dan200.turtle.api.TurtleVerb
Returns the enum constant of this type with the specified name.
values() - Static method in enum dan200.turtle.api.TurtleSide
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum dan200.turtle.api.TurtleUpgradeType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum dan200.turtle.api.TurtleVerb
Returns an array containing the constants of this enum type, in the order they are declared.

W

writeToNBT(net.minecraft.nbt.NBTTagCompound) - Method in interface dan200.computer.api.IHostedPeripheral
A method called whenever data is written to the Turtle's NBTTag, over the lifetime of the turtle.

Y

yield(Object[]) - Method in interface dan200.computer.api.ILuaContext
Yield the current coroutine with some arguments until it is resumed.

A C D E G H I L M O P Q R S T U V W Y