Tree Detection
A felled tree scatters logs, leaves, saplings and fruit well beyond the block you hit. Tree detection gives those breaks a wider pickup radius, so the whole tree ends up in your inventory without widening the radius for every other block.
How it works
When a player breaks a block, AutoPickup checks the block ID against tree-blocks. A block counts
as a tree block when its ID contains any entry, ignoring case: Oak matches any block with
oak in its ID, Leaf matches every leaf block.
When an item spawns and nothing is found within pickup-radius, AutoPickup searches again out to
tree-pickup-radius, but only among tree breaks. Normal blocks never get the wider radius.
The wider search only runs when tree-pickup-radius is bigger than pickup-radius.
Settings
yaml
autopickup:
tree-detection-enabled: true
tree-pickup-radius: 15
tree-blocks:
- "Log"
- "Leaf"
- "Leaves"
- "Branch"
- "Palm"
- "Oak"
- "Birch"
- "Spruce"
- "Pine"
- "Bamboo"
- "Acacia"
- "Fruit"
- "Sapling"
- "Seed"
- "Wood"
- "Apple"
- "Camphor"
- "Spiral"
- "Frostwood"
- "Willow"
- "Cherry"
- "Redwood"
| Key | Default | What it does |
|---|---|---|
tree-detection-enabled |
true |
Turn tree detection on or off |
tree-pickup-radius |
15 |
Search radius (blocks) for drops from tree blocks |
tree-blocks |
list above | Partial, case-insensitive matches against the broken block's ID |
Things to know
- On startup, AutoPickup adds
Willow,CherryandRedwoodback totree-blocksif they're missing and saves the file, so removing them from the list won't stick. - If you delete the
tree-blockskey entirely, it's recreated with a built-in list:Log,Leaf,Leaves,Branch,Trunk,Stump,Wood,Sapling,Seed,Fruit,Apple,Oak,Birch,Willow,Spruce,Pine,Redwood,Palm,Acacia,Thorntree,Bamboo,Cherry,Frostwood,Deadwood. - Broad entries like
Woodalso match crafted wood blocks. A wider radius around those is usually harmless, but trim the list if players pick up items they didn't expect. - The radius is a sphere around the broken block, measured in blocks.