Skip to content

tel-0s/programmable-golems

Repository files navigation

Programmable Golems

A Minecraft Fabric mod (1.21.1) that allows you to program iron golems with custom behaviors using a visual programming interface.

Minecraft Fabric License

Overview

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.

Features

Items

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.

Blocks

Block Description
Lithograph Programming workstation where you create and edit golem programs. Insert a chip to begin.

Instructions (Actions)

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

Conditions

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.

Target Selectors

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.)

Installation

  1. Install Fabric Loader for Minecraft 1.21.1
  2. Install Fabric API
  3. Download the latest release of Programmable Golems
  4. Place the .jar file in your mods folder

Dependencies

  • Minecraft 1.21.1
  • Fabric Loader ≥0.16.14
  • Fabric API ≥0.114.0
  • Cardinal Components API (bundled)

Usage

Creating a Program

  1. Craft a Lithograph (stone slabs + redstone + gold ingot)
  2. Craft a Redstone Neural Chip (redstone + copper ingot + gold nugget)
  3. Place the chip in the Lithograph's slot
  4. Click "+ Add" to add behaviors
  5. For each behavior, set:
    • The action (what to do)
    • The condition (when to do it, optional)
    • The priority (higher = checked first)
  6. Click Save to write the program to the chip

Installing a Chip

  1. Craft a Soldering Iron (iron ingots + copper ingot)
  2. Hold the programmed chip in your off-hand
  3. Right-click on an iron golem with the soldering iron

Removing a Chip

  1. Hold the soldering iron
  2. Shift+right-click on the golem to extract the chip

Example: Bodyguard Program

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

Crafting Recipes

Redstone Neural Chip

Shapeless: Redstone + Copper Ingot + Gold Nugget

Soldering Iron

  I
  I
  C
(I = Iron Ingot, C = Copper Ingot)

Lithograph

S S
SRS
SGS
(S = Stone Slab, R = Redstone, G = Gold Ingot)

Roadmap

  • 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.

Building from Source

# 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/

Development

# Run the Minecraft client with the mod
./gradlew runClient

# Run the dedicated server
./gradlew runServer

See DEVELOPMENT.md for detailed development documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Credits

About

Minecraft mod that enables the programming of iron & copper golems to do your bidding.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors