MinionCore logoMinionCore

Chunk Collector

Pair minions with a collector so their items gather in one storage, or sweep up the items lying on the ground.

A chunk collector gathers items into one place. Instead of emptying five minions one by one, players empty one collector. Players choose which minions feed it by pairing them, and the collector can also pick up items lying on the ground.

Modes

ModeTakes items from paired minionsPicks up ground items
PAIREDYesNo
GROUNDNoYes
BOTHYesYes

Each collector remembers its own mode. The owner switches it with the Collecting button in the collector's menu, so two collectors of the same type can do different jobs.

minions/chunkcollector.yml
settings:
  mode: PAIRED
  modes:
    - PAIRED
    - GROUND
KeyShipped valueWhat it does
settings.modePAIREDThe mode a newly placed collector starts in. An unknown value falls back to PAIRED
settings.modesPAIRED, GROUNDThe modes the owner can switch between. Add BOTH to offer it, or list one mode to lock every collector of this type to it
  • Each click on the Collecting button moves to the next mode in settings.modes, in the order they are listed, and starts again from the top after the last one. Only the owner and players with minioncore.admin.bypass can use it.
  • When settings.mode is not in settings.modes, it is added to the front of the list.
  • A collector whose saved mode is no longer in settings.modes goes back to settings.mode.
  • MINION, the mode name from 1.0.0-1, is read as PAIRED, so older type files keep working.

The collector's area

Like the chunk loader, the area is a square of chunks centred on the collector's chunk, set per level with chunk-radius. 1 is its own chunk, 2 is 3 by 3, and 3 is 5 by 5. The Chunk area item in its menu shows the size and how many other minions stand inside.

A paired minion counts as in range while the block it stands on is inside that square. How far the minion itself works does not matter.

A collector does not keep chunks loaded. Pair it with a chunk loader if the area should keep working while players are away.

Pairing

A collector only takes items from minions that are paired with it and stand inside its area. Players pair minions from the Pair a minion button or with /minion pair, and the number of pairs is capped by the collector's connections. See Collector pairing for how it works.

Ground pickup

In GROUND and BOTH mode, the collector sweeps its area on every action and picks up dropped items. It only looks in chunks that are loaded.

A newly placed collector starts in PAIRED mode, the shipped settings.mode, and picks up nothing from the ground. Switch it to GROUND or BOTH with the Collecting button first.

KeyShipped valueWhat it does
settings.ground-pickup-delay-seconds5How long an item must have been on the ground first
settings.ignore-player-drop-seconds30How long an item a player threw is left alone

An item is left where it is when any of these is true:

  • It has been on the ground for less than ground-pickup-delay-seconds.
  • A player threw it less than ignore-player-drop-seconds ago.
  • It still has a pickup delay, the short wait before anyone can pick an item up.
  • It is set so only one player can pick it up.
  • It carries a scoreboard tag listed in ground-items.protected-tags in config.yml, see below.
  • It carries data from a plugin listed in ground-items.protected-plugins in config.yml, see below.
  • The collector's filter does not accept it.

Items with data from other plugins

Many plugins store their own data on items, and some, such as ItemsAdder, tag every item a player drops. Data like that no longer stops an item being collected. Only data from the plugins you name, and scoreboard tags you name, keep an item on the ground:

ground-items:
  protected-plugins: []
  protected-tags: []

Write each plugin by name, for example [ItemsAdder, MyDungeons]. The names are matched against the namespace of the item's data without caring about capitals, which is the plugin's name in lower case for nearly every plugin. The shipped list is empty, so every item is collectable as far as other plugins' data goes. The same list is used by lumberjacks when they pick up saplings.

Up to 1.0.0-2 any item carrying data from another plugin was skipped. On a server with ItemsAdder that meant a ground collector picked up nothing a player dropped. If a plugin of yours drops items that must stay on the ground, such as quest items or loot another plugin tracks, add it to the list.

protected-tags works the same way for scoreboard tags, the plain text tags some plugins put on an item entity. Write each tag exactly as the item carries it, for example [QuestLoot]. Tags are matched with capitals as written, and spaces around a tag are ignored. Tags not on the list are ignored, and the shipped list is empty. To find out which tags an item carries, stand next to it and run /minion admin debug ground, which prints them under the item's line.

Up to 1.0.0-4 any scoreboard tag kept an item on the ground, whichever plugin put it there. On a server where another plugin tags dropped items, a ground collector left those items behind.

Items stacked by RoseStacker

RoseStacker merges dropped items into one item entity and keeps the real size of the stack itself. The item entity holds at most one full stack, 64 for most items, while RoseStacker counts the rest. When RoseStacker is installed, ground collectors and lumberjacks read the real size. They take as much as fits in storage and leave the rest in the same stack on the ground, with its size lowered. Nothing is lost when storage runs out part way.

Nothing needs setting up. The console says RoseStacker was found, collectors and lumberjacks take the full size of stacked items. on start.

If RoseStacker is installed but MinionCore cannot reach its API, for example after a RoseStacker update that changed it, the console logs a warning and collectors and lumberjacks leave every dropped item alone. Taking part of a stack without knowing its size could delete the rest. /minion admin debug ground then gives the reason RoseStacker stack sizes could not be read, items are left alone.

A player's own drops are left alone for 30 seconds with the shipped values, and every other item for 5, so a fresh drop staying where it is for a short while is normal.

Two collectors on one spot

When two ground collectors cover the same spot, the one nearest the item takes it, but only if it really would. A nearer collector that cannot take the item does not hold it back from the next one. That is the case when:

  • It is paused, broken, out of fuel, stopped by its owner's offline rules, or in a chunk that is not loaded.
  • It is full, or its filter does not accept the item.
  • Its own ground-pickup-delay-seconds or ignore-player-drop-seconds makes it wait longer.

If a stack only partly fits, the rest stays on the ground for the next action.

Up to 1.0.0-3 only a paused nearer collector was skipped. A nearer collector that was full, broken, out of fuel or filtering the item still kept the others away, so items close to it stayed on the ground for good.

Checking why an item stays on the ground

Stand next to the items and run:

/minion admin debug ground

It lists up to 20 dropped items within 16 blocks of you, nearest first, and for each one names the collector that takes it next, or the reason none does. A RoseStacker stack shows its real size, such as x150. When an item carries scoreboard tags, a tags: line under it lists them, so you can tell which plugin tagged it. It needs minioncore.admin.debug.

ReasonWhat to do
No collector covers this chunkPlace a collector closer, or level it up for a larger area
Not set to GROUND or BOTHSwitch it with the Collecting button
Not working, with its statusRepair it, unpause it, add fuel or load its chunk
Outside its areaThe item lies in a chunk the collector's level does not reach
Still has a pickup delay, belongs to one playerAnother plugin set this on the item. MinionCore leaves such items alone
Carries the protected scoreboard tag, with the tagThe tag is listed in ground-items.protected-tags
Carries data from a protected pluginThe plugin is listed in ground-items.protected-plugins
RoseStacker stack sizes could not be readMinionCore could not reach RoseStacker's API, see Items stacked by RoseStacker
Waits N more seconds on the groundground-pickup-delay-seconds has not passed yet
Dropped by a player, left alone for N more secondsignore-player-drop-seconds has not passed yet
The filter does not keep itChange the collector's filter
No room for itEmpty the collector or add storage upgrades

When several collectors cover the item, the line names the one that comes closest to taking it.

A ground collector does not check who dropped an item or whose land it is on. Anything in its area that passes the rules above is picked up.

Storage

Collected items go into the collector's storage. The shipped levels:

Levelchunk-radiusconnectionsdelaystoragefuel-efficiencyCost of the next level
1111090money: 20000
2228185money: 45000
33362710money: 90000
43443615Max level

max-storage: 90 caps the storage, storage upgrades included. The delay is how often the collector acts, which is when it sweeps the ground and pulls stored items from paired minions. Items made by a paired minion arrive the moment it works, whatever the delay.

Open the storage from the Storage button in the collector's menu:

  • Click an item to take the stack, or right click to take half.
  • Take everything (slot 48) moves everything that fits into your inventory.
  • Sell everything (slot 50) sells every item that has a price under sell.prices in config.yml. It only shows when sell.enabled is true and Vault has an economy. Items without a price stay.

All three need the take-storage access. See The minion menu and Menus.

Collector buttons

These buttons are only shown in a chunk collector's menu, set under minion.items in gui.yml.

ButtonSlotWho can use itWhat it does
pair19pair accessStarts pairing, then right click a minion
paired20open accessOpens the paired minions list
mode25Owner onlySwitches to the next mode in settings.modes
upgrade-connections34upgrade accessTakes a Connections upgrade

Their lore can use %connections% for the minions paired now, %connection_capacity% for how many can be paired, and %collector_mode% for the current mode, which comes from menu.collector-paired, menu.collector-ground or menu.collector-both in the language file.

Limits

KeyWhereShipped valueWhat it does
max-per-playerminions/chunkcollector.yml3How many collectors one player may place
limits.count-chunk-collectorsconfig.ymlfalseWhether collectors count towards the total limit in limits.default

The shipped collector does not use fuel (requires-fuel: false). Turn it on in the type file if you want it to. See Fuel.

On this page