Repository navigation
Codex Logic Computercraft
With CC: Tweaked installed, computers can read QNet blocks and order from the Factory Controller. Put a computer next to the block or connect it with a wired modem. Everything runs on the server.
The integration can be switched off with features.integration.computercraft (default true); then every call ends with the error "QNet: the computer integration is switched off on this server".
Every QNet block with a block entity is a peripheral of the type qnet:
| Function | Returns |
|---|---|
getInfo() |
every value and text of the block's screen, by name, plus type and, for plants, formed
|
getReadings() |
the named readings of a machine (temperature, power and so on) |
getCommands() |
the commands the block takes |
For the storage and logic area this means:
-
Bulk Tank Controller:
getInfo()givestype=large_gas_tank,formed,status,gas,contentsandcontentsMax,amount,capacity,volume,takenandgiven. -
Warehouse Controller:
getInfo()givestype=warehouse,formed,status,contentsandcontentsMax,racks,amount,capacity,kindsandkind_limit. -
Storage Controller, units, terminal, interfaces, Grid Monitor, Machine Interface: no screen values;
getInfo()returns an empty table. Use the Grid Monitor's redstone signal to bring its state to a computer.
The Factory Controller is also a peripheral of the type qnet_factory.
Reading (always allowed)
| Function | Returns |
|---|---|
getFactory() |
energy, energyCapacity, activeJobs, maxJobs, powered, linked, computerOrders
|
getCraftables() |
every item id the linked machines can make, sorted |
getOrders() |
orders and stock targets: id, kind (make or stock), item, amount, stock, problem
|
getJobs() |
jobs: order, recipe, output, expect, made, state, machine
|
getMachines() |
machines: block, types, tier, busy
|
plan(item, amount) |
the plan preview: complete, problem, steps (recipe, type, runs), fromStock and missing (kind, id, amount) |
Ordering (only while allowed)
| Function | Effect |
|---|---|
order(item, amount) |
places a Make order, returns its id |
setStockTarget(item, amount) |
sets a stock target with the machines as source, returns its id |
cancel(id) |
cancels an order or target, returns whether there was one |
Ordering works only while an admin has set "Computers may order: on" in the Machines tab of the controller's window. Otherwise these calls end with an error that says so. Other errors: "amount must be positive", "the linked machines cannot make …".
Amounts above 1,000,000 are cut. The lists are capped: 4,096 craftables, 256 orders, 512 jobs and 512 machines.
Tip
Example
local f = peripheral.find("qnet_factory") and then f.order("minecraft:iron_ingot", 64) orders 64 iron ingots, if the linked machines can make them.
Note
No rights check Computers are not players: a computer that may order can order everything, whatever its owner's role. Only switch computer orders on where you trust every computer that can reach the controller.
QNet Codex
Getting Started
- Welcome to QNet
- The First Machines
- Tiers and Components
- Energy, Fluids and Gases
- Building Plants
- The Quanta Linker
- Teams and Rights
- Upgrades and Plant Modules
Energy
- Energy Overview
- Basic Dynamo
- Thermoelectric Generator
- Stirling Generator
- Geothermal Heat Exchanger
- Solar Array
- Wind Turbine
- Solar Thermal Field
- Industrial Boiler
- Steam Turbine
- Gasifier
- Natural Gas and the Gas Derrick
- Gas Engine
- Gas Turbine
- Fission Reactor
- Nuclear Fuel Cycle
- Advanced Reactor Model
- Centrifuge Cascade
- Tokamak
- Little Star
- Micro Black Hole Plant
- Hawking Reactor
- Capacitor Bank
- Battery Hall
- Molten-Salt Store
- Gravity Store
- SMES
- Dimensional Store
- Process Heat
- Electric Heater and Heat Exchanger
- Incidents and Safety
- Radiation
Processing
- Crusher
- Induction Furnace
- Metal Former
- Assembler
- Plant Processor
- Farming Station
- Tree Harvester
- Electrolyzer
- Air Separator
- Chemical Reactor
- Industrial Centrifuge
- Crystallizer
- Tunnel Furnace
- Foundry
- Chemical Plant
- Assembly Complex
- Agricultural Facility
- Particle Facility
- Quantum Facility
- Matter Reconstructor
- Deep Core Extractor
- Plant Speed Modules
- Materials and Recipes
Rift
- The Rift
- Building the Complex
- Structure Parts
- Rift Gate Assembly
- Power Injection Array
- Stabilization Tower
- Coordinate Computation Array
- Dimensional Observatory
- Extraction Array
- Matter Receiving Facility
- Linking the Complex
- Running the Rift
- The Rift Console
- Research and Signals
- The Research Tree
- Mining
- Sectors and Diminishing Returns
- The Job Program
- Rift Map Table
- Command Terminal and Monitors
- Rift Materials
Storage
- The Storage Network
- Storage Controller
- Storage Units
- Storage Access Terminal
- Storage Interface
- External Storage Interface
- Bulk Tank
- Warehouse
- Linking Storage
Logic
Reference
Items and Blocks
- Advanced Circuit
- Ash
- Basic Circuit
- Bio Fertilizer
- Biomass
- Block Die
- Block Mold
- Casting Basin
- Charged Quantum Crystal
- Coal Dust
- Conductive Alloy Ingot
- Conveyor
- Copper Coil
- Copper Dust
- Copper Plate
- Copper Wire
- Creative Battery
- Creative Gas Tank
- Deepslate Lead Ore
- Deepslate Lithium Ore
- Deepslate Uranium Ore
- Efficiency Upgrade
- Emergency Vent
- Energy Cell
- Energy Transformer
- Exotic Matter
- Field Emitter
- Field Stabilizer
- Fluid Tank
- Gas Compressor
- Gas Tank
- Gear Die
- Gear Mold
- Generator Coil
- Gold Dust
- Gold Plate
- Heat Exchanger Tubes
- Induction Coil
- Industrial Frame
- Ingot Mold
- Iron Dust
- Iron Plate
- Irradiated Residue
- Laser Optic
- Block of Lead
- Lead Ingot
- Lead Ore
- Lithium Carbonate
- Lithium Dust
- Lithium Ore
- Machine Frame
- Nugget Mold
- Parallel Upgrade
- Pattern Card
- Plant Fiber
- Plate Die
- Plate Mold
- Polymer Sheet
- Precision Alloy Ingot
- Precision Frame
- Pump
- Quanta Linker
- Quantum Crystal
- Quantum Frame
- Quantum Processor
- Range Upgrade
- Raw Lead
- Raw Lithium
- Raw Uranium
- Refractory Bricks
- Rod Die
- Rod Mold
- Rotor Blade
- Rotor Shaft
- Sensor Module
- Servo Motor
- Silicon
- Silicon Boule
- Silicon Wafer
- Solidified Melt
- Speed Upgrade
- Stabilized Matter
- Steel Blend
- Steel Dust
- Steel Gear
- Steel Ingot
- Steel Plate
- Steel Rod
- Superconductor Wire
- Uranium Dust
- Uranium Ore
- Wire Die
- Yield Upgrade