A Minecraft Fabric mod (1.21.1) that allows you to program iron golems with custom behaviors using a visual programming interface.
Programmable Golems introduces a behavior-tree-style programming system for iron golems. Using the Lithograph workstation, you can create programs on Neural Network Chips that define how golems should behave—patrolling, guarding, following, attacking threats, and more.
Each instruction in a program can have:
- An action (what the golem does)
- A condition (when to do it)
- A priority (which behavior takes precedence)
This creates a powerful priority-based behavior system where golems dynamically respond to their environment.
| Item | Description |
|---|---|
| Redstone Neural Chip | Craftable chip that stores golem programs. Can be copied by combining with a blank chip. |
| Soldering Iron | Tool for installing/removing chips from golems. Right-click to install, Shift+right-click to extract. |
| Block | Description |
|---|---|
| Lithograph | Programming workstation where you create and edit golem programs. Insert a chip to begin. |
| Instruction | Description | Parameters |
|---|---|---|
| Idle | Do nothing (vanilla passive behavior) | — |
| Wait | Pause execution | Duration (ticks) |
| Move To | Pathfind to coordinates | X, Y, Z |
| Follow | Follow a target at distance | Target, Distance |
| Attack | Engage and attack target | Target |
| Patrol | Cycle through waypoints | Waypoints (comma-separated coords) |
| Guard | Stay near and protect an entity | Target, Distance |
| Wander | Random movement within area | Radius |
| Look At | Face toward target | Target |
| Return Home | Go back to assigned home position | — |
| Condition | Description | Parameters |
|---|---|---|
| Always | Always true (fallback) | — |
| Hostile In Range | Hostile mob within distance | Range |
| Health Below | Golem health is below percentage | Percentage |
| Time Is | Time of day check | Day/Night/Dusk/Dawn |
| Recently Damaged | Took damage within time | Ticks |
| Owner Online | Owner player is connected | — |
| Distance From Target | Distance check with operators | Target, Operator, Distance |
Conditions can be combined with AND, OR, and NOT logic operators.
| Selector | Description |
|---|---|
| Nearest Player | Closest player |
| Nearest Hostile | Closest hostile mob |
| Owner | The golem's owner (who installed the chip) |
| Named Player | Player by username |
| Specific Entity | Entity by UUID |
| Entity Selector | Minecraft-style selectors (@p, @e[type=zombie], etc.) |
- Install Fabric Loader for Minecraft 1.21.1
- Install Fabric API
- Download the latest release of Programmable Golems
- Place the
.jarfile in yourmodsfolder
- Minecraft 1.21.1
- Fabric Loader ≥0.16.14
- Fabric API ≥0.114.0
- Cardinal Components API (bundled)
- Craft a Lithograph (stone slabs + redstone + gold ingot)
- Craft a Redstone Neural Chip (redstone + copper ingot + gold nugget)
- Place the chip in the Lithograph's slot
- Click "+ Add" to add behaviors
- For each behavior, set:
- The action (what to do)
- The condition (when to do it, optional)
- The priority (higher = checked first)
- Click Save to write the program to the chip
- Craft a Soldering Iron (iron ingots + copper ingot)
- Hold the programmed chip in your off-hand
- Right-click on an iron golem with the soldering iron
- Hold the soldering iron
- Shift+right-click on the golem to extract the chip
A golem that follows and protects you:
| Priority | Action | Condition |
|---|---|---|
| 100 | Attack nearest hostile | Hostile within 10 blocks |
| 75 | Return to owner | Owner beyond 20 blocks |
| 0 | Follow owner at 4 blocks | Always (fallback) |
The golem will:
- Attack any hostile that gets close (highest priority)
- Run back to you if you get too far away
- Otherwise follow you at a comfortable distance
Shapeless: Redstone + Copper Ingot + Gold Nugget
I
I
C
(I = Iron Ingot, C = Copper Ingot)
S S
SRS
SGS
(S = Stone Slab, R = Redstone, G = Gold Ingot)
- v0.1.0 (Current) - Core mechanics, Lithograph editor, iron golem support
- v0.2.0 - Ender Neural Chips, wireless control, Golem Controller item
- v0.3.0 - Visual programming editor (flowchart/behavior tree style)
- v0.4.0 - CC:Tweaked integration for Lua programming
See ROADMAP.md for detailed technical plans.
# Clone the repository
git clone https://github.com/yourusername/programmable-golems.git
cd programmable-golems
# Build the mod
./gradlew build
# The compiled jar will be in build/libs/# Run the Minecraft client with the mod
./gradlew runClient
# Run the dedicated server
./gradlew runServerSee DEVELOPMENT.md for detailed development documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit issues and pull requests.
- Built with Fabric
- Uses Cardinal Components API for entity data storage