COWMODSКаталог модов

CircuitSim

CircuitSim is a Minecraft Forge mod for version 1.20.1 that lets you build and simulate real electronic circuits inside the game. Place component blocks in the world, connect them with wires, and run a full SPICE simulation powered by ngspice.

Автор: Dankov2652обновлён 7 июл. 2026 г.
Технологии

Описание

CircuitSim — A Minecraft Circuit Simulation Mod

This mod was built entirely with AI assistance.

CircuitSim is a Minecraft Forge mod for version 1.20.1 that lets you build and simulate real electronic circuits inside the game. Place component blocks in the world, connect them with wires, and right-click the Simulate Block to run a full SPICE simulation powered by ngspice.

Non-inverting amplifier

Miller amplifier

MOSFET output characteristics


Features

Passive & basic components

  • Resistor, Capacitor, Inductor
  • Voltage sources: DC, sinusoidal (SIN), pulse (PULSE)
  • Current source
  • Diode
  • Wire and Ground

Controlled (dependent) sources

  • VCVS — voltage-controlled voltage source (E)
  • VCCS — voltage-controlled current source (G)
  • CCVS — current-controlled voltage source (H)
  • CCCS — current-controlled current source (F)

IC / PDK components

  • IC Resistor, IC Capacitor
  • IC NMOS4, IC PMOS4 (4-terminal MOSFETs)
  • SKY130A PDK support with .lib path configuration, plus a generic placeholder PDK and a free-form .include mode for custom libraries

Multi-cell blocks

  • Amplifier — 5×5 op-amp subcircuit with selectable 5-pin or 7-pin (offset-null) variants and a vertical-mirror toggle for swapping inverting/non-inverting inputs and supply rails

Measurement

  • Voltage Probe — labelled, measures node voltage
  • Current Probe — placed in series to measure branch current

Simulation control

  • Simulate Block — runs the analysis. Supported types:
    • .OP — DC operating point
    • .AC — frequency sweep (start/stop/points-per-decade, log-frequency axis)
    • .TRAN — transient analysis (time step, stop time)
  • Temperature — single value (e.g. 27) or sweep spec (e.g. 20:40:5 or 20,30,40) for one run per temperature
  • ngspice compat modes: hsa, psa, lt, ki, va
  • Parametric Block — sweeps a target component's parameter (value, W, L, mult, nf) across runs
  • Commands Block — multi-line block of raw ngspice commands injected verbatim into the netlist .control section
  • Sim Link Block — bridges two physically-disconnected sub-circuits into the same netlist without unioning their nodes (useful for routing a CCVS/CCCS controlling source from a remote region)

Output

  • Graph screen — plot up to two probes simultaneously (stacked), with hover tooltips showing exact values; log10 X axis for AC sweeps
  • SPICE simulation via ngspice as a subprocess — real node voltages and branch currents
  • .OP results printed to the in-game chat
  • In-game GUI for every component to configure values with SI-suffix parsing (p, n, u, m, k, M, …)

Requirements

  • Minecraft 1.20.1
  • Minecraft Forge 47.3.0
  • Java 17
  • ngspice installed and available on your system PATH

Installation

Method 1: Just take it

  1. Install Java 17 and Minecraft Forge 47.3.0 for Minecraft 1.20.1.
  2. Install ngspice and make sure ngspice_con (Windows) or ngspice (Linux/Mac) is accessible from your terminal.
  3. Grab the Latest Release
  4. Put the mod into your Minecraft mods/ folder

Method 2: Build it yourself

  1. Install Java 17 and Minecraft Forge 47.3.0 for Minecraft 1.20.1.
  2. Install ngspice and make sure ngspice_con (Windows) or ngspice (Linux/Mac) is accessible from your terminal.
  3. Clone this repository:
    git clone https://github.com/Dank0v/circuitsim.git
    cd circuitsim
    
  4. Build the mod using the Gradle wrapper:
    # Windows
    gradlew.bat build
    
    # Linux / Mac
    ./gradlew build
    
  5. Find the compiled .jar in build/libs/ — it will be named something like circuitsim-x.x.x.jar.
  6. Drop that .jar into your Minecraft mods/ folder.
  7. Launch the game.

How to Use

  1. Open the Circuit Simulator creative tab to find all blocks.
  2. Place component blocks and connect them with Wire blocks. Every circuit needs at least one Ground block.
  3. Right-click any component to open its configuration GUI and set its value.
  4. Place a Simulate Block anywhere connected to the circuit.
  5. Right-click the Simulate Block to run the simulation. Results appear in chat.

Probes

  • Voltage Probe — place adjacent to a wire node. Right-click to give it a label. The simulation will report the voltage at that node.
  • Current Probe — place in series (between two wires) to measure current through that branch.

Known Issues / TODO


License

GPL-3.0 — see LICENSE.

Галерея

Voltage Divider ExampleNon-Inverting Amplifier Example (PSpice)MOSFET Output Characteristic (HSPICE)

Последние версии

Все версии →
release

CircuitSim 1.5.0

1.5.0
7 июл. 2026 г.149Minecraft: 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6forge
Скачать
Что нового
## CircuitSim 1.5.0 The 1.5.0 release adds two new analysis capabilities — loop-gain stability (.STB) and Monte Carlo — plus in-world operating-point annotation on the K key, three new component blocks (Transformer, Transmission Line, Loop Probe), and direct support for KiCad and LTspice model libraries. It also brings an LTspice-style Measurement Builder, a pre-simulation circuit linter, and a netlist viewer. ### New Components **Transformer** — a 2×3 coupled-inductor block with one primary and one secondary winding (west pins = primary +/−, east pins = secondary +/−). The edit screen sets the coupling factor k (0 < k ≤ 1), primary inductance Lp, and secondary inductance Ls — all three sweepable with Param-block expressions. Each winding has an editable series resistance (default 1 mΩ; set 0 for a fully ideal winding). Note: the windings are galvanically isolated, so the secondary side needs its own DC path to ground (a resistor is enough) or ngspice will refuse to solve. **Transmission Line** — a 2×3 two-port block with two modes selected in its edit screen: *lossless* (characteristic impedance Z0 plus either a delay TD or a frequency F with normalized length NL; a freshly placed line defaults to Z0=50, TD=10ns) and *lossy LTRA* (per-length R, L, G, C plus the line length LEN; valid parameter combinations are RLC, RC, LC, and RG). All parameters accept `{param}` expressions for parametric sweeps. **Loop Probe** — a 2-pin block you drop in series inside a feedback loop. In every normal analysis it behaves as a transparent 0 V short and changes nothing; its purpose is the new .STB analysis. Orientation matters: the front face points toward the amplifier output — if your loop-gain plot looks inverted (tiny or negative dB where you expect gain), rotate the probe 180°. **Inductor series resistance** — standalone Inductor blocks gained an optional series-resistance field. Existing inductors stay ideal, but an ideal inductor straight across an ideal voltage source makes the DC operating point unsolvable ("singular matrix"), and a small Rser is the cure. ### New Analyses **.STB stability (loop-gain) analysis** — a new STB tab in the Simulate block, equivalent to Cadence Spectre's `stb` analysis. Place a Loop Probe in the feedback path, set the frequency range (same fields as AC), and run. The mod performs full Tian dual-injection — two AC runs (voltage and current injection) combined into the true loop gain — so the result is correct even at low- or high-impedance breaking points. You get Bode plots of loop-gain magnitude (dB) and phase (degrees) with phase unwrapping so the −180° crossing is visible, plus DC loop gain, unity-gain frequency (GBW), phase margin, and gain margin reported directly. **Monte Carlo** — a new "Monte Carlo runs" + "seed" row in the Simulate dialog, available for OP, AC, DC, and TRAN. Randomness comes from ngspice statistical distributions in Param blocks (`Rv = gauss(10k, 0.05, 3)`, plus agauss, unif, aunif, limit) and/or the new per-component tolerances below; every run re-rolls the values. AC/TRAN/DC runs overlay all iterations in the graph screen, OP runs plot each probe against run number, and every measured scalar (phase margin, GBW, ...) gets a mean / standard deviation / min / max summary in chat. A fixed seed makes runs reproducible; a blank seed picks a random one and tells you what it was. Capped at 300 runs. **Component tolerances** — ideal resistors, capacitors, and inductors now have a "Tolerance (%)" field in their edit screens, shown on the floating label (e.g. "1kΩ ±5%"). During Monte Carlo each toleranced device gets its own independent Gaussian draw with ±tolerance = 3σ; outside Monte Carlo the nominal value is used, so normal simulations stay deterministic. **Histograms** — graph screens gained a "Hist" toggle that re-bins the active curves' values into overlaid histograms — the natural way to look at Monte Carlo spreads. ### Operating-Point Annotation **K-key annotation** — after an .OP run, press K to float up to 4 chosen parameters over every device in the world: node voltages, currents, and for MOSFETs the full internal parameter set. "Edit Shown OP" picks which parameters are shown, per device type, from a grid of everything ngspice reports (IC MOSFETs expose ~65 parameters). Derived MOSFET figures of merit are computed for you and listed next to gm: gm/id, gm/gds (intrinsic gain), and fT = gm/(2π·cgg). Parametric and temperature OP sweeps produce one annotation frame per swept value, with `<` / `>` arrows to step through them and watch the bias points move. **Subcircuit OP projection** — while K annotation is active, any Subcircuit chip with .OP data floats a shrunk 3D copy of its inner circuit above the block, with each internal device's operating point annotated — you can see the bias of every transistor inside a chip without unpacking it. Note: chips converted before 1.5.0 don't carry the required device map; re-convert them once. **Subcircuit 3D preview** — the Subcircuit screen itself now renders a 3D preview of the chip's inner circuit, so you can see what a chip contains before placing it. ### Model Library Support Two new compatibility modes in the Simulate block make real vendor models usable directly: **KiCad mode (`ki`)** — point the paths box at KiCad's model libraries; it pre-fills the installed KiCad's built-in `Simulation_SPICE.sp` automatically, and the runner enables the same PSpice+LTspice translation KiCad itself uses. Discrete MOSFET/BJT/diode blocks auto-detect whether the library defines a `.model` card (e.g. VDMOS power FETs) or a `.subckt` macromodel (e.g. KiCad's BJTs) and emit the right SPICE device either way. The Amplifier block's pin order matches KiCad's 5-pin op-amp convention (IN+ IN− VCC VEE OUT) directly. **LTspice mode (`lt`)** — pre-fills the installed LTspice's component databases (`standard.dio` / `standard.bjt` / `standard.mos` — thousands of diode, BJT, and VDMOS cards) and reads vendor `.sub`/`.lib` macromodels. UTF-16 library files — which ngspice otherwise *silently* loads zero models from — are transcoded automatically, and LTspice `TABLE(...)` B-sources are rewritten to ngspice `pwl(...)`. Known limits: ADI-encrypted models (`<Binary File>`) and OTA-based macromodels (UniversalOpAmp2, newer ADI op-amps) only run inside LTspice itself. Also fixed in this area: ngspice's XSPICE code models (used by translated PSpice switches) now load reliably when ngspice is found via PATH. ### Simulation Workflow **Measurement Builder** — a "Measure…" button in the Commands block opens an LTspice-style editor with three tabs: Measure (build a single `meas` line from a form), Functions (expression palette for derived plots), and Presets (rise/fall time, propagation delay, period, overshoot, THD, slope-at-point, and a full AC amplifier report). Signal fields have a picker listing your live probes, sources, and plot names, and a Test button runs your configured analysis right there and shows the measured values before you save. **View Netlist** — a button in the Simulate block generates and displays the complete SPICE netlist without running the simulation, with one-click Copy. Useful for debugging or moving a circuit to desktop ngspice. **Circuit linter** — before each run the mod now checks for the classic silent killers and explains them in plain language: no Ground block placed, floating nodes (a wire to nowhere), and nodes with no DC path to ground (reachable only through capacitors or current sources). **Dual-waveform plots** — a plot screen can now show two different waveforms together on one plot. ### Other Changes - Simulations no longer hand you a written book with raw output after every run; results go to chat and the graph screens. - Fixed the Simulate block forgetting analysis parameters when switching between analysis types in its edit screen. - The separate subcircuit-projection key was removed — projections now ride along with the K annotation automatically. - New inventory item icons for the VCVS, VCCS, Amplifier, and Subcircuit blocks.
release

CircuitSim 1.4.0

1.4.0
17 июн. 2026 г.33Minecraft: 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6forge
Скачать
Что нового
## CircuitSim 1.4.0 The 1.4.0 release lets you turn any circuit you build into a reusable subcircuit — convert a schematic into a portable chip and drop it into a new 5×5 Subcircuit block, exactly like the built-in Amplifier but defined entirely by you. It also adds behavioral (arbitrary) sources and a voltage-controlled switch, and reworks how IC/PDK parameters are configured. ### User-Defined Subcircuits **Subcircuit block** — a 5×5 block (like the Amplifier) that instantiates your own saved schematic as a single black-box component. It exposes 12 pins around its perimeter — two on each corner cell and one in the middle of each edge — numbered clockwise from the top-left. Wires connect only to the live pins; the top texture reflects the pin count and a floating name tag shows the loaded subcircuit. **Subcircuit Converter + Subcircuit Chip** — place the Converter block on a finished circuit, give it a name, and convert: the schematic is replaced by a portable Chip item. Right-click the ground with a chip to rebuild the entire circuit block-for-block, or insert it into a Subcircuit block to use it. **Probe "Subcircuit pin" toggle** — the voltage probe edit screen gains a checkbox (plus a pin-order number) that marks a net as an external terminal of the subcircuit. The probe's label becomes the pin name. **Under the hood** — conversion generates a self-contained `.subckt … .ends` definition and instantiates it with an `X` line, so subcircuits work across OP, AC, DC, TRAN, and NOISE analyses as well as parameter sweeps. The Subcircuit block's GUI has a chip slot and a scrollable, read-only netlist view. ### New Components **Behavioral (arbitrary) sources** — B-source blocks driven by a free-form expression (`V = …` for a voltage source, `I = …` for a current source). **VC Switch** — a voltage-controlled switch (ngspice `S` device / `SW` model) with configurable threshold, hysteresis, on/off resistances, and an optional initial state. Switches with identical parameters share one `.model` line. ### PDK / IC Components - The PDK choice (model prefix and MOSFET geometry) now lives on each IC component instead of the Simulate block. `none` / `placeholder` emit a bare `W/L/m` instance, while `sky130A` keeps the full geometry via a per-PDK formula table. - W/L are read as microns under `sky130A` and as SI meters otherwise; editor labels, field parsing, and in-world callouts were updated to match. NF is editable only under `sky130A`. - The device multiplier is emitted as ngspice's built-in `m=` for all IC devices. - The `hsa` compatibility mode now accepts multiple `.lib` paths in a single multi-line box, like `psa`. ### Example World - Updated with additional pre-built circuits. - **Note:** some examples reference `.lib` files by absolute path; update those to match your own PDK install before simulating them. ### Other Changes - README updated with a User-Defined Subcircuits guide and captions above the preview GIFs. - Removed leftover texture-fix helper scripts; minor texture fixes.
release

CircuitSim 1.3.0

1.3.0
8 июн. 2026 г.44Minecraft: 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6forge
Скачать
Что нового
# CircuitSim 1.3.0 The 1.3.0 release adds discrete (single-package) transistors, BJT support, configurable diode models, and a big upgrade to the graph screen with measurement cursors. It also ships a playable example world so you can see working circuits without wiring anything yourself. ## New Components ### Discrete Transistors - **Discrete NMOS / PMOS** — single-block MOSFETs as an alternative to the multi-block IC MOSFETs, each with its own edit screen. - **Discrete NPN / PNP BJTs** — bipolar junction transistors. All four come with their own block, item, creative-tab entry, loot table, block model, edit screen, and network sync packet. ## Component Improvements - **Diode models** — the diode edit screen now has an optional `.MODEL` field. Leave it blank for the built-in basic SPICE diode, or enter a model name (e.g. `D1N4148_1`) to use a model from your library (PSpice). - **Voltage probe "name only" mode** — a new checkbox lets a voltage probe name and merge its net **without** plotting/printing it, useful for naming nodes you don't want cluttering the output. ## Graph Screen - **Measurement cursors** — toggle a pair of OrCAD-style vertical cursors per plot. Drag cursor 1 with the left mouse button and cursor 2 with the right; the readout shows X/Y at each cursor plus the dx/dy between them. - Independent cursor and log-axis toggles for the top and bottom plots. ## Simulation - **"None" compatibility mode** — you can now pick `none` when choosing the simulator compatibility mode. - Various netlist-builder and circuit-extractor updates to support the new components and diode models. ## Example World - The repo now ships a ready-to-play save in `example_world/` ("Zaza The Creator") with a set of pre-built example circuits — from simple passives up to controlled sources, the Amplifier block, and IC/PDK components. Copy the folder into your `saves/` directory to load it. - **Note:** some examples reference `.lib` files by absolute path; update those paths to match your own PDK install/OrCAD libraries before simulating them. ## Other Changes - New **Simulate Block edit screen** layout. - Mod icon changed to the amplifier texture. - README updated with animated GIF previews (non-inverting amp, Miller amp, MOSFET output characteristics) and an Example World section.
release

CircuitSim 1.2.0

1.2.0
24 мая 2026 г.39Minecraft: 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6forge
Скачать