Thaumcraft: Golem Batch Guard
No reviews yet
Lets Thaumcraft golems safely insert smaller item batches into inventories that reject oversized carried stacks, preserving leftovers instead of losing or blocking them.
Forge is a popular mod loader for versions 1.1+ of Minecraft.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
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
IInventoryinsertion path, not only HQM Quest Delivery Systems. - QDS Compatibility: Explicitly supports
hqm-dontvoidmyitemsall-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(...)inAIHomePlace,AIEmptyPlace,AISortingPlace, andAIHomeReplace. - 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, Forge10.13.4.1614, UniMixins0.3.0, and Thaumcraft4.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
nullwhen 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-dontvoidmyitemsis 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.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources