MinionCore logoMinionCore

Block filter

Let players choose which blocks each miner, farmer and lumberjack breaks, from a menu on the minion itself.

The block filter lets a player decide, per minion, which blocks it breaks. A miner can skip coal and keep to iron, a farmer can leave the pumpkins alone, and a lumberjack can cut only oak. It is set from the minion menu, so players need no config access.

It works on miners, farmers and lumberjacks. The other types have nothing to break and never show it.

The block filter decides what a minion breaks. The item filter decides which drops it keeps. They are separate and both can be used on the same minion.

The three modes

ModeWhat the minion breaks
OffEvery block it normally would. This is how a new minion starts
BlacklistEverything it normally would, except the listed blocks
WhitelistOnly the listed blocks. An empty whitelist breaks nothing

The filter can only narrow down what the minion does. A block still has to be one the type breaks: in settings.blocks for a miner, a crop in settings.crops for a farmer, or a log in settings.logs for a lumberjack. Adding diamond ore to a farmer's whitelist does not make it mine.

On a farmer the filter decides which crops it harvests. Tilling and planting are not limited by it. A lumberjack checks it on every log of a tree, so a whitelist with only OAK_LOG cuts oak trees and leaves the rest.

Opening it

Open the minion menu and click Block filter in slot 39. The button shows the mode and how many blocks are listed, such as 3/27.

The player needs block filter access. The owner and admins with minioncore.admin.bypass always have it. Trusted players only have it when the type file says trusted.block-filter: true, which is off in every shipped file. See Trust and access.

Using the menu

What you doWhat happens
Click the Mode button, slot 48Switches Off, then Blacklist, then Whitelist, then back to Off
Click or shift click a block in your own inventoryAdds that block to the list
Click a listed blockTakes it off the list
Click BackReturns to the minion menu

The list keeps its blocks when you switch the mode, so you can build a list while the filter is Off and switch it on when it is ready. It shows 36 blocks to a page, with page buttons when there are more.

Every change applies at once. The minion looks over its area again and starts working straight away, so a block that was just allowed is picked up on its next action.

What can be added

  • Any block item, such as IRON_ORE or OAK_LOG.
  • Seeds and crop items, which add the crop they grow into. Wheat seeds add wheat, a carrot adds carrots, a potato adds potatoes, beetroot seeds or a beetroot add beetroots, cocoa beans add cocoa, sweet berries add the berry bush, glow berries add cave vines, torchflower seeds and a pitcher pod add their crops, and melon or pumpkin seeds and a melon slice add the melon or pumpkin block.
  • ItemsAdder blocks, when ItemsAdder is installed. Click the ItemsAdder item and it is listed as itemsadder:namespace:id.

Anything else is refused:

Refused whenMessage key
The item is not a block and has no cropblock-filter.not-a-block
The block is already listedblock-filter.already
The list already holds max-entries blocksblock-filter.full
The type file has block-filter.enabled: false, for example after a reloadblock-filter.disabled

A successful change sends block-filter.added or block-filter.removed.

In the type file

minions/miner.yml
block-filter:
  enabled: true
  max-entries: 27

trusted:
  block-filter: false
KeyShipped valueWhat it does
block-filter.enabledtrueWhether players can set a block filter on minions of this type. false hides the button. A miner, farmer or lumberjack file with no block-filter section counts as true
block-filter.max-entries27The most blocks one minion's list can hold. Never less than 1
trusted.block-filterfalseWhether trusted players may change the filter. Left out, it counts as false

Switching enabled off with /minion reload stops every filter of that type from being used, and hides the button. The lists are kept, and apply again when you switch it back on.

With the type's block list

Miners, farmers and lumberjacks also have settings.block-list in their type file, a blacklist or whitelist set by the server owner for every minion of that type. That list is checked first. The player's block filter is checked after it, so a player can narrow down what the server allows but never add a block the server's list leaves out. See Miner, Farmer and Lumberjack.

OrderListSet by
1settings.block-listThe server owner, in the type file
2The block filterThe player, in the minion menu
3settings.blocks, settings.crops or settings.logsThe server owner, in the type file

A block has to pass all three to be broken. Blocks that hold items, such as chests, are never broken whatever the lists say.

Kept with the minion

The mode and the list are saved with the minion. They stay after a restart, and when the minion is picked up and placed again. Each minion has its own filter, so two miners of the same player can have different lists.

The menu layout is block-filter in gui.yml, and the minion menu button is minion.items.block-filter. See Menus.

The mode words are menu.block-filter-off, menu.block-filter-blacklist and menu.block-filter-whitelist in the language file, and the chat messages are under block-filter. See Messages and language.

On this page