AutoBlockRefiller features
The core loop
When you right-click to place a block, the mod notes which hand you used and what you were holding. Two ticks later, once the game has finished resolving the placement, it looks at that slot: if placing the block emptied it, and more of the same block sit in your inventory, a full stack slides into the empty slot. The short delay is on purpose. Loader hooks fire before the block is placed, so checking immediately would see a slot that is not empty yet.
Only blocks, only empty slots
- Block items only. Eating the last carrot or throwing the last snowball does nothing. If it is not placeable, the mod ignores it.
- Empty means empty. If anything is in the slot two ticks later (the placement failed, you switched items, you picked something up), the slot is respected and nothing happens. The mod never overwrites your stuff.
Where refills come from
- Main inventory first. Slots 9-35 are always searched, in order.
- Other hotbar slots only if you opt in with
searchHotbar(off by default). Your other hotbar stacks are left alone otherwise. - Never from armour, the offhand, or crafting slots. Worn and held gear is never touched as a source.
Both hands covered
Placing from the selected hotbar slot refills that slot; placing from the offhand refills the offhand. Each hand is handled independently.
Performance
The mod does nothing until you place a block, then one small inventory scan two ticks later. There are no per-tick loops and nothing runs on the client.