Skip to content
LotuxPunk edited this page Dec 8, 2018 · 26 revisions

Welcome to the Handles wiki!

ComputerCraft

For this example we will take this situation :

m = peripheral.wrap("left")

Returns a table of functions, allowing you to call peripheral methods as if they were normal Lua functions. If no peripheral is connected, returns nil. (http://computercraft.info/wiki/Peripheral.wrap)

OpenComputers

For this example we will take this situation :

component = require("component")
m = component.tardisinterface

Now you can do what ever you want !

Get TARDIS Location

local x, y, z = m.getTardisPos()

Returns the 3 coordinate of your TARDIS Location (x, y, z)

Set TARDIS Destination

m.setTardisPos(x,y,z,[dimensionID])

To set the destination at 0,0 at the height 64 in OverWorld m.setTardisPos(0,64,0,0) The dimensionID is optionnal since the 1.12.2-1.2.5.1

Start Flight

m.startFlight()

Set the doors open/close

m.setDoors(boolean) -> m.setDoors(false) //to close the doors

Get is in flight

local booleanValue = m.isInFlight()

Returns a boolean value depending if is in flight.

Get fuel level

local fuelLevel = m.getFuel()

Returns a double between 0 & 1 depending on the energy gauge

Set fueling mode

m.setFueling(boolean)

Is doors openned ?

local booleanValue = m.isDoorsOpenned()

Your TARDIS is able to fly ?

local booleanValue = m.canFly()

Get the travel time (in seconds)

local timeInSecond = m.getTravelTime()

Get a TARDIS waypoint

local x, y, z, dim = m.getWaypoint(waypointID)

Beware, TARDIS can only save 15 waypoints (0 to 14).

Get TARDIS waypoints

local arrayOfWaypoint = m.getWaypoints()

Set a TARDIS waypoint

local booleanValue = m.setWaypoint(waypointID,x,y,z,dimensionID)

Get the health of a component

local doubleValue = m.getHealthComponent(componentID)

Get the dimensions ID of the Minecraft save

local arrayOfInt = m.getDimensionsID()

Get the dimension name

local stringValue = m.getDimensionName(dimensionID)

Clone this wiki locally