OpenComputers · Addon guide · Intermediate

How to Automate Smelteries and Networks with OC Addon Drivers

Taking control of a Tinkers' Construct Smeltery and an XNet logistics network usually requires a tangled mess of redstone clocks and manual intervention to prevent accidental alloying. By combining OpenComputers with specialized addon drivers, you can write a single Lua script that reads fluid levels directly from the Smeltery, dynamically moves the exact molten metal you need to the bottom of the tank, and commands XNet to pour and route the finished ingots. This guide will walk you through setting up the hardware and writing the logic to create a smart, zero-waste metallurgy facility.

What you need

  • OpenComputers setup (Computer Case Tier 2 or higher, CPU, Memory, Graphics Card, Hard Disk Drive, Lua BIOS EEPROM, OpenOS Floppy Disk, Screen, Keyboard, and a Power Converter if playing with power enabled)
  • OpenComputers Adapter blocks (at least 3) and plenty of OpenComputers Cable
  • Tinkers' Construct Smeltery (fully built with a Smeltery Controller, Seared Tank, Seared Drain, Seared Faucet, and Casting Table or Casting Basin)
  • XNet Controller, XNet Network Cables, and Connectors attached to your Smeltery input/output chests and Seared Drain
  • The addon mods installed: OpenComputers Drivers for Tinkers Construct and OC XNet Driver

Step by step

  1. 1Assemble and Boot the Control Computer

    Place your Computer Case, Screen, and Keyboard in a safe spot near your Smeltery and XNet Controller. Insert your CPU, Memory, Graphics Card, Hard Disk Drive, and Lua BIOS EEPROM into the case, then temporarily insert the OpenOS floppy disk to install the operating system onto your hard drive using the install command. Make sure the case is connected to your base's energy grid via an OpenComputers Power Converter so it never shuts down mid-pour.

    Tip: Use at least Tier 2 components so your computer has enough component bus capacity to talk to multiple Adapters simultaneously.

  2. 2Wire the Smeltery and Casting Setup with Adapters

    Place one OpenComputers Adapter directly touching the Smeltery Controller, and another Adapter touching either your Casting Table or your Seared Drain depending on which block you want to inspect. Run OpenComputers Cables from both Adapters back to your Computer Case. When the addon driver for Tinkers' Construct is installed, these Adapters translate the Smeltery's internal fluid tanks and casting states into readable Lua components.

    Tip: You can place the Adapter behind or underneath the Smeltery Controller to keep the front of your multi-block structure clean and accessible.

  3. 3Bridge the XNet Controller to OpenComputers

    Place a third OpenComputers Adapter directly adjacent to your XNet Controller and connect it to the main OpenComputers Cable line. Set up your XNet network normally by connecting standard XNet Connectors to your ore input chest, the Smeltery Controller, the Seared Drain, the Casting Table, and your finished ingot output chest. Within the XNet Controller GUI, create the channels for items, fluids, or redstone pulses that you plan to toggle or control via Lua.

    Tip: Label your XNet connectors and keep track of which channel number handles fluid extraction versus item routing, as your Lua script will reference these indices.

  4. 4Discover Your Component Addresses and Methods

    Boot up the computer and run the 'components' command in the OpenOS shell to verify that your Smeltery, Drain, and XNet Controller are recognized on the network. Launch the interactive Lua prompt by typing 'lua', then require the component library using 'component = require("component")'. Inspect the exact method names exposed by your specific driver versions by looping over the proxy table, for example by running 'for k,v in pairs(component.smeltery) do print(k,v) end' (replace 'smeltery' with the exact component name shown in your list).

    Tip: Write down the first three or four characters of each block's unique UUID address if you plan to hook up multiple Smelteries to the same computer later.

  5. 5Script the Fluid Inspection and Bottom-Swapping Logic

    Exit the Lua prompt and create a new script file using 'edit foundry.lua'. At the top of your script, load the component proxy for the Smeltery Controller and write a function that queries the current list of molten fluids inside the tank. Because a Tinkers' Construct Smeltery only pours whichever liquid is currently sitting at index 1 (the very bottom layer), use the driver's fluid movement function (typically named moveFluidToBottom or selectFluid depending on your addon version) to bring your desired metal to the bottom slot before initiating a cast.

    Tip: Always check the fluid amount returned by the table in millibuckets (mB) against standard ingot or block values in JEI (usually 144 mB per ingot) before allowing the script to trigger a pour.

  6. 6Automate Pouring and Routing via the XNet Driver

    In the same script, load the XNet Controller component proxy to coordinate item and fluid flow with your Smeltery state. Instead of leaving an external redstone clock pulsing your Seared Faucet endlessly, use the XNet driver's methods—or an XNet redstone/fluid channel controlled by the computer—to trigger a pour or transfer fluid into the Casting Table only after your bottom-fluid check passes and the Casting Table reports that it is empty and holds the correct cast. Once the Casting Table cools and solidifies the item, have the script keep the XNet item extraction channel active to pull the finished ingot into storage.

    Tip: If your XNet setup directly pipes molten metal from the Seared Drain into the Casting Table using an XNet fluid channel, disabling and enabling that specific XNet channel via Lua gives you instant, lossless flow control without waiting for Seared Faucet animation ticks.

  7. 7Add an Anti-Alloy Safety Interlock Loop

    Wrap your main control logic inside a 'while true do' loop that ends with an 'os.sleep(2)' call so the computer checks the Smeltery state every two seconds. Add a conditional table inside your script that pairs reactive metals together (such as Copper and Tin, or Iron and Nickel) and scans both the current molten fluids and the queued smelting slots. If a conflicting metal is already molten inside the tank, command the XNet Controller to pause the ore-insertion channel until the current metal has been completely poured out and the tank is clear.

    Tip: Take advantage of OpenComputers' persistent execution across world saves; as long as the chunk stays loaded or loads symmetrically, your safety loop will pick up right where it left off.

How it works

In OpenComputers, machines from other mods cannot normally talk to your Lua environment unless they have native integration or a bridge. The Adapter block acts as a hardware translator: when placed next to a supported tile entity like the Tinkers' Construct Smeltery Controller or an XNet Controller, the installed addon drivers hook into the Adapter and expose that block's internal Java methods as a network component on the OpenComputers cable bus.

A Tinkers' Construct Smeltery stores its contents as an ordered stack of fluid layers, where only the bottom-most fluid can exit through a Seared Drain. Normally, a player has to open the GUI and click a fluid layer to move it to the bottom. The Tinkers' Construct driver exposes this exact internal index-swapping capability to Lua, allowing a script to inspect the fluid array, verify that enough millibuckets exist for a clean cast (preventing partially filled Casting Tables that lock up automation), and programmatically shift the target metal to the extraction layer.

Meanwhile, the OC XNet Driver exposes the XNet Controller's routing logic to the same computer. By letting one central Lua loop control both the Smeltery's active fluid layer and XNet's channel states, you eliminate timing mismatches. The system becomes event-driven and state-aware: XNet only feeds raw ores or drains fluids when the Smeltery driver confirms it is safe to do so.

Common mistakes

  • Pouring partial ingots that jam the Casting Table: Always write an explicit math check in Lua (for example, checking that fluid.amount >= 144) before triggering a pour; otherwise a leftover puddle of metal will sit inside the Casting Table and block all other metals from being cast.
  • Connecting XNet cables and OpenComputers cables together: Even though both are tech cables, they carry completely different data and will not connect to each other; you must use an OpenComputers Adapter block touching the XNet Controller to bridge the two networks.
  • Guessing method names without checking the Lua prompt: Different versions of addon drivers sometimes rename functions (such as getFluids versus getContainedFluids); always inspect the component table in the interactive Lua shell first so your script does not crash with a nil value error.
  • Starving the Computer or XNet Controller of energy: Both OpenComputers (by default) and XNet require continuous power to operate; if your computer browns out while a fluid channel is left open, the Smeltery will continue draining uncontrollably until it empties or jams.
  • Placing the Smeltery Adapter on a regular Seared Brick block: While Seared Bricks form the walls of the multi-block, only functional tile entities like the Smeltery Controller, Seared Drain, or Casting Table actually expose component data to an adjacent Adapter.

FAQ

Why does my Adapter not show any component when placed next to the Smeltery?

Make sure the Adapter is touching the Smeltery Controller or Seared Drain directly rather than a plain Seared Brick wall block, and verify in your mod list that the OpenComputers Drivers for Tinkers Construct addon is properly installed.

How do I stop my Smeltery from accidentally creating bronze or invar when automating ore input?

In your Lua script, check the table of currently molten fluids inside the Smeltery before enabling the XNet item channel that inserts new ores; if Copper is already inside, instruct XNet to hold back Tin until Copper drops to zero millibuckets.

Should I use a Seared Faucet or an XNet Fluid Channel to fill the Casting Table?

Either works, but using an XNet Fluid Channel connected to the Seared Drain and Casting Table is much faster and lets you toggle fluid transfer directly through the XNet Controller without needing an extra Redstone I/O block or Redstone Card to pulse a Faucet.

What happens to my automation script when I log out or unload the chunk?

OpenComputers saves the exact execution state of your Lua machine across world saves and chunk unloads, though it is still good practice to structure your script as a state-checking loop so it immediately re-reads current fluid levels whenever it wakes up.

By bridging your Tinkers' Construct Smeltery and XNet Controller to an OpenComputers system via Adapters and addon drivers, you can automate complex metallurgy and lossless casting with a single intelligent Lua script.

More OpenComputers guides

OpenComputers · Getting startedHow to Build Your First Computer and Install OpenOSIn this guide, you will learn how to assemble your very first modular Tier 1 computer in OpenComputers and install the standard OpenOS operating system onto its hard drive. Mastering this initial setup is essential because it provides the foundational terminal required to write Lua scripts, control redstone, and automate complex factory systems.Beginner8 steps
OpenComputers · ProgressionOpenComputers Hardware Tiers and Progression GuideOpenComputers relies on a strict modular tier system where every component, from memory sticks to graphics cards, must be carefully matched to your computer case. This guide will walk you through the progression from a basic Tier 1 machine up to a fully loaded Tier 3 Server Rack. Mastering these hardware limits ensures you never waste valuable resources on incompatible parts or crash your scripts due to insufficient memory.Beginner7 steps
OpenComputers · PowerOpenComputers Power Converter and Networking ExplainedIn OpenComputers, a single Cable carries power, component connections, and network messages all at the same time. While convenient, this all-in-one behavior causes massive chaos when you try to power two computers from the same energy source, as they will accidentally hijack each other's screens and keyboards. This guide explains how to convert modded energy using the Power Converter and how to isolate your systems using Power Distributors and Relays.Beginner7 steps
OpenComputers · AutomationHow to Automate Other Mods with the OpenComputers AdapterIn this guide, you will learn how to use the OpenComputers Adapter and Redstone I/O blocks to read data from external tech mod machines and automatically control them using Lua scripts. Mastering this setup allows you to build smart power grids that toggle generators based on energy storage levels, prevent reactor meltdowns, and coordinate complex factory lines without manual intervention.Intermediate8 steps
OpenComputers · Setup guideOpenComputers 3D Printer and Hologram Projector Setup GuideTransform your OpenComputers network from a simple text terminal into an interactive architectural and visual suite. In this guide, you will learn how to configure a 3D Printer to fabricate custom multi-state decorative blocks, and set up a Hologram Projector to render real-time 3D voxel displays. Mastering these peripherals allows you to create custom doors, buttons, and dynamic base status displays that standard blocks cannot achieve.Intermediate7 steps
OpenComputers · Setup guideHow to Build a Wireless Network and Server Rack InfrastructureIn this advanced guide, you will learn how to construct a centralized server infrastructure and a multi-node wireless network in OpenComputers. Mastering Server Racks, Access Points, and Linked Cards allows you to centralize your Lua processing power and automate remote areas of your base without running endless lines of physical Cable.Advanced7 steps