Makes the Blood Altar behave predictably when items are moved in and out by hoppers, pipes, or any other automation.
The Blood Altar has a single slot. It continuously pumps LP into whatever sits there until the item finishes infusing and turns into its product.
That design works fine when a player is operating the altar by hand. It falls apart the moment automation gets involved:
| What happens | What goes wrong |
|---|---|
| A pipe or hopper pulls an item out before infusion has started | The insertion was wasted, and the item just gets shoved back in again |
| An item that is already finished — or was already infused once — is still in the slot, or gets reinserted | The altar keeps doing work on it |
There is a deeper issue underneath. The altar stores infusion progress on itself, not on the item (BloodAltar.progress). So when an item is pulled out, the progress stays behind in the altar — and if a different item is then inserted, the altar carries on from that leftover progress. The semantics are simply in the wrong place.
This mod gives each item a mark of its own, tying the semantics back to the item.
| # | Rule |
|---|---|
| 1 | Once an item has been fully infused, the altar leaves it alone |
| 2 | An item that leaves the altar has its mark cleared — inserting it again counts as a new visit |
| 3 | An item that has an altar recipe and has not been infused yet cannot be pulled out by hoppers or pipes |
These are intentional. If you are reading the source, do not delete them thinking they are redundant checks.
① It blocks automation, not players. The only path that gets filtered is Forge's item handler (IItemHandler) — the one hoppers and pipes use. A player right-clicking an item out goes through the block's own interaction code and can always take it. Locking players out as well would be a worse trap than the original problem.
② It only locks items the altar can actually process. The condition requires both:
The second half cannot be dropped. If the altar's tier is too low, the item simply cannot be processed — locking it would make it permanently unextractable and jam the pipe. There is an easy mistake here worth spelling out: AltarTier.toInt() returns ordinal() + 1, while the altar's own check uses ordinal() — they are off by one, and getting it wrong locks items the altar cannot even work on.
By the same token, an item with no altar recipe at all (dirt, cobblestone, and so on) can be extracted as normal and is never locked.
File: config/bloodmagicaltarautomationoptimization-common.toml
| Option | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch. Set to false to restore Blood Magic's original behaviour — identical to not having the mod installed |
wayoftime.bloodmagic.*. It does not inject into vanilla Minecraft classes, Forge classes, or any other mod's classes.Tested against Blood Magic 3.3.8-50 on 1.20.1.
If Blood Magic ever renames or moves the two methods this hooks into, the mod simply does nothing rather than crashing — the mixin config is declared as not required.
Released under Apache-2.0 (SPDX-License-Identifier: Apache-2.0). Full text in [LICENSE], third-party attribution in [NOTICE].
This mod modifies Blood Magic's classes at runtime through Mixin. It does not copy or redistribute any of Blood Magic's source code or assets — the jar contains none of it. Blood Magic is published under Creative Commons Attribution 4.0 International (CC BY 4.0), which permits modification and redistribution and carries no ShareAlike clause — which is why this mod is able to ship under Apache-2.0. See NOTICE for the full reasoning.
This is an unofficial third-party add-on. It is not affiliated with, and not endorsed by, WayofTime or the Blood Magic team. Thanks to WayofTime and every Blood Magic contributor.
要我把这份也存成桌面上的 .md 吗?另外你另外两个带 "Blood Magic" 名字的 mod 我还没动 —— 需要的话一起处理。
只讲对我们有益的
Stop your hoppers and pipes from fighting the Blood Altar.
The altar keeps infusion progress on itself rather than on the item, so automation has no way to tell "already done" from "not started yet". The result is wasted LP, items pulled out mid-infusion, and finished products being worked on again.
| # | Rule |
|---|---|
| 1 | Once an item has been fully infused, the altar leaves it alone — no more LP burned on a finished product |
| 2 | An item that leaves the altar has its mark cleared, so inserting it again counts as a new visit and it can be infused again |
| 3 | An item that has an altar recipe and has not been infused yet cannot be pulled out — automation can no longer yank it away mid-infusion |
wayoftime.bloodmagic.* — nothing in vanilla, nothing in Forge, nothing in anyone else's mod.Tested against Blood Magic 3.3.8-50 on 1.20.1.
config/bloodmagicaltarautomationoptimization-common.toml
| Option | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch. Set to false to restore Blood Magic's original behaviour |