2online

Drone Interface

Drone Interface icon
Ways to make it1
Recipes it goes intoNone

What it is

from pneumaticcraft’s own guide

The Drone Interface is a ComputerCraft/OpenComputers peripheral/$ that's used to communicate with Drones/$. To do so, program a Drone/$ with a Computer Control puzzle piece/$. When the Drone executes the Computer Control piece, it'll try to connect to an available/$ Drone Interface/$ located within the puzzle piece's area. An example Lua program: m = peripheral.wrap("right") m.addArea(100, 64, 100, 120, 4, 120, "Filled") m.setAction("dig") while not m.isActionDone() do sleep(1) end m.clearArea() m.addArea(80, 65, 80) m.setAction("goto") -- wait till done, as above m.setAction("standby") /$makes the drone dig out a large area - all blocks in the (100,64,100)->(120,4,120) range - and then return to (80, 65, 80) and go into standby. You may notice that the program opposite has to explicitly wait until the Dig (and Goto) actions are done before continuing, unlike when writing Drone programs via the Programmer/$. This is because your Lua computer program is running in a separate thread and can't interact with the world directly; it just tells the drone what to do next, and needs to ask the drone if it's done yet. abortAction()/$ Stops the current running action. addArea(<x1>,<y1>,<z1>)/$ addArea(<x1>,<y1>,<z1>,<x2>,<y2>,<z2>,<areaType>)/$ Adds an area to the current stored area of the Drone. When using the latter method, x1/y1/z1 represent the first point (which would be P1 of an GPS Area Tool/$), and x2/y2/z2 represent the second point, or P2 of the GPS Area Tool. getAreaTypes() can be used to list the valid area types. addBlacklistItemFilter(<item/block name>, <useNBT>, <useModSimilarity>)/$ Like the addWhitelistItemFilter(...), but to blacklist items. addBlacklistLiquidFilter(<liquid name>)/$ Like the addWhitelistLiquidFilter(...), but to blacklist liquids. addBlacklistText(<text>)/$ Adds a text to the blacklisted texts. Used to specify a filter for the "entity_attack" action, for example. addWhitelistItemFilter(<item/block name>, <useNBT>, <useModSimilarity>)/$ Acts as an Item Filter/$ widget on the right of another widget. The item/block name is the registry name, e.g. pneumaticcraft:pressure_tube/$. The 'useXXX' are all booleans that determine what filters will be used (as in the Item Filter widget GUI). addWhitelistLiquidFilter(<liquid name>)/$ Acts as you've put a $l(:programming/liquid_filter)Liquid Filter/$ piece on the right of a piece. You must supply the fluid's registry name (e.g. minecraft:water/$). addWhitelistText(<text>)/$ Adds a text to the whitelisted text list. This would be used to specify an entity filter for the "entity_attack" action, for example. clearArea()/$ Clears the current stored area. clearBlacklistItemFilter()/$ Clears all stored blacklisted item filters. clearBlacklistLiquidFilter()/$ Clears all stored blacklisted liquid filters. clearBlacklistText()/$ Clears all stored blacklisted texts. clearWhitelistItemFilter()/$ Clears all stored whitelisted item filters. clearWhitelistLiquidFilter()/$ Clears all stored whitelisted liquid filters. clearWhitelistText()/$ Clears all stored whitelisted texts. evaluateCondition()/$ Returns true/false. Used in conditions/$ only. Will return true/false depending on whether or not the condition is satisfied. Drone Conditions can be checked right after setting setAction()/$, but non-Drone conditions require that you wait until isActionDone()/$ returns true before the result of evaluateCondition()/$ is useful. exitPiece()/$ Stops the Computer Control/$ piece in the Drone, and allows the Drone's program to proceed to the next puzzle piece in its program. forgetTarget()/$ When the Drone is targeting any entity (from using the "entity_attack" action), this will stop attacking that target. getAction()/$ Returns a string that represents the last action set by setAction()/$. Will return nil/$ when no action is set. Can be used to make sure to only call isActionDone()/$ when this method does not return nil. getAllActions()/$ Returns a table of all the current selectable actions (like pneumaticcraft:dig/$ or pneumaticcraft:place'/$. Each of these actions corresponds directly to a programming widget available in the Programmer/$ GUI. Note: for actions which start with pneumaticcraft:/$ (which is all default actions), the pneumaticcraft:/$ prefix is optional. getAreaTypes()/$ Returns a table of all the possible area types (filled, frame, sphere...) getDronePosition()/$ Returns the x/y/z position of the Drone. This method is here for historic compatibility, and it's recommended to use the new getDronePositionVec()/$ method instead. getDronePosition()/$ Returns a table of the x/y/z coordinates of the Drone. Individual values can be easily extracted with the .x, .y and .z fields, e.g. xpos = getDronePosition().x/$. getUpgrades(<upgrade>)/$ Get the number of inserted upgrades of the given type. The upgrade name can be found by mousing over any PneumaticCraft upgrade item with advanced info enabled (F3+H) and taking the item name with the '_upgrade' part removed. e.g for pneumaticcraft:speed_upgrade/$, the name is "speed". getVariable(<variable name>)/$ Returns the value of the variable from this Drone (x, y and z). It is possible to get global/$ (# prefix) and special/$ variables ($ prefix) too. hideArea()/$ Stops in-world highlighting of the area stored in the Drone, as shown by showArea()/$. isActionDone()/$ Returns true if the current action is done (e.g. "goto" has arrived at the target location, "inventory import" can't import anymore, "dig" has dug every possible block...) isConnectedToDrone()/$ Returns true if a Drone has connected with this Drone Interface (when the Drone's program has arrived at the ComputerCraft piece and made a connection). removeArea(<x1>,<y1>,<z1>,<x2>,<y2>,<z2>,<areaType>)/$ Removes an area from the current stored area (equivalent to blacklisting the area). setAction(<action>)/$ Set an action for the Drone to do. This should be one of the actions returned by getAllActions()/$; these correspond directly to programming widgets in the Programmer/$ GUI, which shows the action name in widget tooltips when F3+H is toggled. Note that when the prefix is pneumaticcraft:/$, that prefix is optional. setBlockOrder(<"closest"/"highToLow"/"lowToHigh">)/$ Sets the place/dig order of the Drone. setCanSteal(<true/false>)/$ When the "pickup_item" action is used, this controls whether drones are allowed to steal items they normally should leave alone, e.g. items on an Immersive Engineering/$ conveyor belt. The default is 'false': drones will not try to steal items. setCheckLineOfSight(<true/false>)/$ When the "entity_attack" action is used, this controls whether drones will attack any target in their area, or only targets they have a direct line of sight to. The default is 'false'; line of sight is not checked. setCount(<amount>)/$ This configures the maximum number of items processed by import / export / drop actions, and is also used for the amount that's checked against in condition checks. setCraftingGrid(<item/block name>, <item/block name>, ...(9x))/$ Sets up the crafting grid so when the "crafting" action is used, this recipe will be used. You need to specify all 9 items making up the recipe; for empty spaces supply nil/$. The item naming format is the same as for item filters. setDropStraight(<true/false>)/$ When the "drop_item" action is the current action, this determines whether or not the item will be dropped with a random velocity (like a vanilla Dropper), or straight down. setEmittingRedstone(<strength>)/$ Sets the strength of redstone signal to emit when the "emit_redstone" action is the current action. setIsAndFunction(<true/false>)/$ Used in conditions only. When true, all checked blocks must satisfy the condition requirements (>=10 etc). setMaxActions(<amount>)/$ This sets the maximum number of actions performed on blocks before the action is considered 'done'. This applies to the "place", "dig" and "block_right_click" actions. Be sure to also call setUseMaxActions(true)/$ to enable usage of this. setOperator(<"=" / ">=" / "<=">)/$ Used in conditions only. Says whether or not the condition is checking for an equal amount (=), an equal or greater than amount (>=), or an equal or lesser than amount (<=). The amount can be set using setCount()/$. setPlaceFluidBlocks(<true/false>)/$ Only used in the "liquid_export" action; when set to true the Drone will be allowed to place down fluid blocks in the world. Default of 'false' only allows fluids to be exported to fluid tanks. setRenameString(<name>)/$ Sets the name the Drone will be named to when the "rename" action is used. setRequiresTool(<true/false>)/$ This configures whether or not the Drone requires a tool when executing the "dig" and "harvest" actions. With no tool, the Drone will not attempt to carry out these actions. setRightClickType("click_item" / "click_block")/$ When the current action is "block_right_click", this controls whether the drone should use the click logic of its held item (e.g. use a Flint and Steel/$), or try to activate the targeted block (e.g. flip a Lever/$). The default is "click_item". setSide(<side>, <accessible>)/$ Sets the specific side to be accessible or not. Used in the "inventory_import" and "inventory_export" actions to set which side of the inventory the Drone can access. It is also used for the "place" action to determine how to place the block. setSides(<down>, <up>, <north>, <south>, <east>, <west>)/$ Same as above, but in a single method to set all sides at once; this method takes six boolean parameters. setSignText(<line1>, <line2>, ..., <lineN>)/$ Sets the text that will be sent to Signs and Aphorism Tiles when the edit_sign/$ action is used. setSneaking(<true/false>)/$ Only used in the "block_right_click" action; this will set whether or not the fake player is sneaking while right clicking. setUseCount(<true/false>)/$ Sets whether or not the Drone has a maximum number of imported /exported / dropped items. If true, be sure to also call setCount()/$. setUseMaxActions(<true/false>)/$ Sets whether or not the Drone has a maximum number of actions performed on one block at a time before the command is considered 'done'. Applies to the "place", "dig" and "block_right_click" actions. If true, be sure to also call setMaxActions()/$. setVariable(<variable name>, <x>, <y>, <z>)/$ Sets a variable/$ for this Drone to given X/Y/Z coordinates. It is possible to set global variables/$. setVariable(<variable name>, <boolean>)/$ Sets a variable/$ for this Drone. 'true' is equivalent to passing (1,0,0), and 'false' is equivalent to passing (0,0,0). showArea()/$ Will show the current stored area using the same area renderer used if you click Show Area/$ in a programming widget options GUI. hideArea()/$ can be used to hide any such areas.

How it is made

1 recipe
Crafting table
Range Upgrade iconWireless Modem Normal iconFinished PCB iconCompressed Iron Ingot iconCompressed Iron Ingot iconCompressed Iron Ingot icon
Drone Interface icon

What it takes

The path

Depth123456

Tick what you already have.

What it is for

Nothing in this pack is made from it.

Play ATM10 To The Sky on our server

Everything on this page is read from the ATM10 To The Sky server we run. Your first week there is free, with no card.

Cookies

One keeps you signed in. Accept, and this browser also remembers what you opened from the search. No analytics, no ads.