Description
This component is provided by the Drone.
Drones are mobile open computer machines, similar to robots, yet more mobile yet more limited. For example, they lack an option for a screen or harddrive.
Component name: drone .
This component is provided by the Drone.
Drones are mobile open computer machines, similar to robots, yet more mobile yet more limited. For example, they lack an option for a screen or harddrive.
Component name: drone .
getStatusText():string Get the status text currently being displayed in the GUI.
setStatusText(value:string):string Set the status text to display in the GUI, returns new value.
move(dx:number, dy:number, dz:number) Change the target position by the specified offset.
getOffset():number Get the current distance to the target position.
getVelocity():number Get the current velocity in m/s.
getMaxVelocity():number Get the maximum velocity, in m/s.
getAcceleration():number Get the currently set acceleration.
setAcceleration(value:number):number Try to set the acceleration to the specified value and return the new acceleration.
name():string a doc
swing(side:number):boolean[, string] Lets the robot use the currently equipped item in the tool slot against the block or space directly in front of the robot.use(side: number[, sneaky: boolean[, duration: number]]): boolean[, string] Attempts to use the item currently equipped in the tool slot in the same way as if the player would make a right-click. place(side: number[, sneaky: boolean]): boolean[, string] Tries to place the block in the currently selected inventory slot on the specified side of the robot (if the side is supported).getLightColor():number Get the current color of the activity(robot) or flap(drone) light as an integer encoded RGB value (0xRRGGBB).
setLightColor(value:number):number Set the color of the activity(robot) or flap(drone) light to the specified integer encoded RGB value (0xRRGGBB).
inventorySize():number Returns the size of the device's internal inventory.
select([slot:number]):number Get the currently selected slot; set the selected slot if specified.
count([slot:number]):number Get the number of items in the specified slot, otherwise in the selected slot.
space([slot:number]):number Get the remaining space in the specified slot, otherwise in the selected slot.
compareTo(otherSlot:number):boolean Compare the contents of the selected slot (in the robot inventory) to the contents of the specified slot (also in the robot inventory).
transferTo(toSlot:number[, amount:number]):boolean Move the specified amount of items from the selected slot into the specified slot. If no amount is specified, the entire stack is moved to the target slot.
tankCount():number Returns the number of tanks installed in the robot.
selectTank(tank:number) Selects the specified tank (if robot contains more than one Tank upgrade). Any tank operations will use this tank.
tankLevel([tank:number]):number Returns the fluid level in the specified tank. If no tank specified, returns the fluid level in the selected tank (using selectTank()).
tankSpace([tank:number]):number Returns the remaining fluid capacity (empty space) in the specified tank. If not tank specified, returns the remaining capacity in the selected tank.
compareFluidTo(tank:number):boolean Tests whether the fluid in the selected tank (in the robot inventory) is the same as in the specified tank (requires Tank upgrade).
transferFluidTo(tank:number[, count:number]):boolean Transfer the specified amount of fluid in the selected tank into the specified tank. If no volume is specified, the robot will attempt to transfer 1000mB.
detect(side:number):boolean Detects the block on the given side, relative to the robot, and returns whether or not the robot can move into the block, as well as a general description of the block.compareFluid(side:number):boolean Compares fluid in the selected tank (requires a Tank upgrade) to fluid in the world or in an external tank on the specified side of the robot.
drain(side:number[, count:number]):boolean Extracts the specified amount of fluid from the world or a tank on the specified side of the robot. If no amount is specified, the robot will try to drain 1000mB. If the tank is unable to store the specified amount of fluid, the operation will fail (no fluid is lost in the process).
fill(side:number[, count:number]):boolean Fills the specified amount of fluid from the selected tank (requires a Tank upgrade) into the world or a tank in front of the robot. If no amount is specified, the robot will try to fill the target tank with 1000mB of fluid. If there is not enough fluid to fill a block, or not enough space in the target tank, the operation will fail with no fluids lost.
compare(side:number[, fuzzy:boolean=false]):boolean Compares the block on the specified side of the robot with the item in the currently selected slot and returns whether they are the same or not. drop(side:number[, count:number]):boolean Drops the specified number of items from the currently selected slot. Returns true if at least one item is dropped, false otherwise.suck(side:number[, count:number]):boolean Tries to pick up the specified number of items and place it in the selected slot.