AutoBlockRefiller features

Place, empty, refill. About 150 lines of feature code.

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

Where refills come from

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.