Mineuniverse
Log in Register
Mods

Thaumcraft: Golem Batch Guard

Lets Thaumcraft golems safely insert smaller item batches into inventories that reject oversized carried stacks, preserving leftovers instead of losing or blocking them.
by itzDatRat
Download Claim this project
44 downloads
0 likes
Updated Jul 6, 2026
0 hypes
Addons Bug Fixes Utility & QoL

Thaumcraft: Golem Batch Guard

A Minecraft 1.7.10 Forge addon that lets Thaumcraft golems retry rejected item placement with smaller carried-stack batches while preserving the carried remainder.

Features

  • Golem Stack Preservation: Keeps the uninserted part of a golem's carried stack instead of requiring the target inventory to accept or reject the whole stack.
  • Smaller Batch Retry: When a full carried stack is rejected unchanged, retries copied stacks to find a safe smaller insertion amount.
  • Thaumcraft AI Patch: Targets Thaumcraft golem item-placement AI instead of changing target inventories.
  • All Inventory Targets: Works through Thaumcraft's normal IInventory insertion path, not only HQM Quest Delivery Systems.
  • QDS Compatibility: Explicitly supports hqm-dontvoidmyitems all-or-nothing QDS item validation behavior.
  • Scoped Behavior: Leaves golem carry limits, movement, marker colors, sorting checks, home checks, and inventory open/close behavior under Thaumcraft's normal control.
  • Configurable Guard: Provides a generated Forge config for enabling the guard, setting the minimum batch size, and optional debug logging.

Coremod Approach

This mod uses a small coremod patch because Thaumcraft golem insertion behavior is implemented inside Thaumcraft's golem AI classes.

  • Late Mixin Loading: Registers the mixins as late UniMixins mixins so Thaumcraft classes are available before the targets are prepared.
  • AI Placement Redirects: Redirects Thaumcraft calls to InventoryUtils.placeItemStackIntoInventory(...) in AIHomePlace, AIEmptyPlace, AISortingPlace, and AIHomeReplace.
  • Source Filter Redirects: Redirects GolemHelper.getContainersWithRoom(...) simulations so golems can pick up a larger source stack when only a smaller batch is currently insertable at the destination.
  • Original Helper Reuse: The guarded hook calls Thaumcraft's original inventory helper internally with copied stacks.
  • Simulation and Insertion Coverage: Redirects both simulated checks and real insertions so golems can choose a target and then insert the same accepted batch size safely.
  • Scoped Patch: The patch is limited to Thaumcraft golem item placement into inventories; item pickup, extraction, fluids, essentia, and HQM internals are not changed.
  • Compatibility Target: Built against Minecraft 1.7.10, Forge 10.13.4.1614, UniMixins 0.3.0, and Thaumcraft 4.2.3.5.

Golem Batch Insertion

Thaumcraft's original insertion is always attempted first. If the target accepts the full carried stack, behavior is unchanged.

If the full stack is rejected unchanged, the guard searches for a smaller fully accepted batch:

  • A copied stack is offered to the target inventory.
  • Binary search finds the largest fully accepted batch at or above the configured minimum.
  • If no batch is found, a single-item offer is tried as a final fallback.
  • Real insertion uses the accepted batch size.
  • The hook returns a copied carried remainder, or null when the whole carried stack has been inserted.

For example, if a golem carries 8 items and a guarded QDS can safely accept only 2, the golem inserts 2 and keeps 6 carried. If the target accepts none of the item, the golem keeps the full carried stack.

This also applies before pickup for sorting-style flows. If a QDS is at 46/50 stone and the source inventory contains 10 stone, the golem can still take the stack because the destination simulation sees that 4 can be accepted. The placement step then inserts 4 and preserves the remaining 6 for normal Thaumcraft handling.

The generated config contains:

enableBatchGuard=true
minBatchSize=1
debugLogging=false

Limits

  • The mod depends on Thaumcraft's original InventoryUtils.placeItemStackIntoInventory(...) return contract.
  • The guard only runs at redirected Thaumcraft golem AI call sites.
  • Inventories that report successful insertion but internally discard items cannot be repaired by this addon.
  • hqm-dontvoidmyitems is optional, but QDS overfill protection still depends on that addon rejecting unsafe oversized QDS item stacks.
  • Manual in-pack testing is still recommended for automation-heavy modpacks because inventories can implement insertion rules differently.
Thaumcraft: Golem Batch Guard 1.0.0 for 1.7.10
MC Client, Forge, 1.7.10, Server
Release 2026-05-15 Get

More from itzDatRat

Time in a Bottle: Rewinded
98
OpenBlocks: Inert Elevator
78
Hardcore Questing Mode: Quest Rewarding System
77
Cuscuz
67
Hardcore Questing Mode: Don't Void My Items
36
Hardcore Questing Mode: Moveable Quest Gates
21

You Might Also Like

SI: Scriptified [DISCONTINUED]
DISCONTINUED
99,868
FTB Quests Entity Visualization
Adds entity visualization to FTB Quests
99,525
JEI / REI WorldGen
JEI/REI Addon for World Gen Information with universal compatibility for all mods ores by utilizing biome generation data
99,419
Pixel Blocks
Pokemon Lucky Block! When mining the pixel block a random pokemon spawns.
9,988
TFC Bonsai
Add TFC Trees to bonsai pots
9,988
Laser Eyes
A "laser eyes" addon for the Viltrumite mod.
9,968