A C D G H I M Q R S T U V W

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(IComputerAccess, 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.
createNewSaveDir(String) - Method in interface dan200.computer.api.IComputerAccess
Creates a new numbered directory in a subPath of the users game save, and return that number.
createPeripheral(ITurtleAccess, TurtleSide) - Method in interface dan200.turtle.api.ITurtleUpgrade
Will only be called for Peripheral upgrades.

D

dan200.computer.api - package dan200.computer.api
 
dan200.turtle.api - package dan200.turtle.api
 
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.

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(net.minecraft.item.ItemStack) - Method in interface dan200.computer.api.IMedia
 
getAudioTitle(net.minecraft.item.ItemStack) - Method in interface dan200.computer.api.IMedia
 
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(net.minecraft.item.ItemStack) - Method in interface dan200.computer.api.IMedia
 
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.
getSelectedSlot() - Method in interface dan200.turtle.api.ITurtleAccess
Returns which slot the turtle currently has selected in its inventory using turtle.select().
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.
IMedia - Interface in dan200.computer.api
TODO: Document me
IPeripheral - Interface in dan200.computer.api
The interface that defines a peripheral.
IPeripheralHandler - Interface in dan200.computer.api
TODO: Document me
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.

M

mountData(net.minecraft.item.ItemStack, IComputerAccess) - Method in interface dan200.computer.api.IMedia
 
mountFixedDir(String, String, boolean, long) - Method in interface dan200.computer.api.IComputerAccess
Mounts a directory into the computers file system, from a real directory in the Minecraft install folder.
For example: mountFixedDir( "stuff", "mods/mymod/lua/stuff", true ), will mount the "lua/stuff" folder from your mod's directory into the computers filesystem at the location "stuff", with readonly permission, giving the computer access to those files.
When a directory is mounted, it will appear in the computers file system, and the user will be able to use file operation to read from and write to the directory (unless readOnly, then only writes will be allowed).
mountFixedDir can also be used to mount files, for example: mountFixedDir( "rom/apis/myapi", "mods/mymod/lua/myapi.lua", true ) can be used to have the peripheral install an API onto the computer it attaches to.
mountSaveDir(String, String, int, boolean, long) - Method in interface dan200.computer.api.IComputerAccess
Mounts a directory into the computers file system, from a real directory a subPath of the users game save, with a numerical name.

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(net.minecraft.item.ItemStack, String) - Method in interface dan200.computer.api.IMedia
 
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 mountSaveDir or mountFixedDir.
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.

A C D G H I M Q R S T U V W