AutoPickup
AutoPickup 是一款高度可配置的服务端模组,用于自动化收集物品和经验球。它具有会话追踪、多级权限系统和广泛的模组兼容性,以确保掉落物正确归属给相应的玩家,即使在使用高速挖掘模组或参与团队战斗时也是如此。
✨ 功能
核心功能
- ? 无缝收集: 破坏方块和击杀怪物掉落的物品会立即添加到你的背包中
- ⭐ 智能经验处理: 经验会被缓存并在短暂延迟后应用,确保工具在“经验修补”激活前先承受耐久度损耗
- ? 无卡顿: 防止物品和经验球实体的生成,从而降低服务器负载
- ? 溢出保护: 如果背包已满,物品会安全地掉落至你的脚下
- ? 精细控制: 通过命令或配置 GUI 独立切换各个功能
高级功能
- ? 怪物战利品分配: 与附近参与击杀的玩家分享怪物掉落物和经验值
- ? 按玩家权限: 服务器管理员可以为特定玩家强制覆盖设置
- ? 客户端配置文件: 自动为每个服务器/世界创建配置档案,实现无缝切换服务器
- ? 广泛的模组兼容: 自动兼容 VeinMiner、LiteMiner、TreeHarvester、Traveler's Backpack、FallingTree、Panda's Falling Trees 等模组
- ? 农场安全: 仅拾取你自己行动破坏的物品。附近的自动化农场(活塞、水流、骨粉/苔藓、发射器)绝不会将掉落物吸入你的背包

⚙️ 配置
AutoPickup 使用灵活的三级权限系统:
- 服务器默认值 - 全局回退设置
- 管理员覆盖 - 针对单个玩家的强制设置(优先级最高)
- 客户端偏好 - 单个玩家的选择(仅在服务器允许且玩家的客户端已发送设置后才生效;未安装该模组的玩家从服务器默认值开始)
?️ 配置菜单(客户端)
你可以通过菜单配置个人偏好。在 Fabric 上使用 Mod Menu 可以方便访问。
否则,请使用 /autopickup gui 命令。
可用设置:
- 总开关 (Master Toggle)
- 方块物品拾取
- 方块经验拾取
- 怪物战利品拾取
- 怪物经验拾取
- 分割怪物战利品(与附近的攻击者分享掉落物)
- 分割怪物经验(与附近的攻击者分享经验值)
注意: 只有当服务器管理员为该功能启用了相应的“允许”设置时,你的客户端设置才会生效。

? 命令
任何人都可以运行 /autopickup 和 /autopickup gui。更改全局配置或其他玩家的设置需要拥有服务器操作者权限。
状态和菜单
| 命令 |
描述 |
/autopickup |
显示服务器的设置,以及(对于玩家而言)他们自己的设置(见下文) |
/autopickup gui |
打开配置菜单(需要安装客户端模组) |
玩家会看到三列;控制台只能看到前两列:
功能 | 服务器 | 你
总开关 | CLIENT DECIDE (默认: ON) | ON (服务器默认)
怪物经验 | CLIENT DECIDE (默认: OFF) | OFF (服务器默认)
怪物战利品 | OFF | ON (管理员覆盖)
CLIENT DECIDE 表示玩家可以自行选择该设置;默认值是他们在做出选择前获得的值。
You 是应用于你的值及其来源:admin override(管理员覆盖)、your setting(你的设置)
或 server default(服务器默认)。
全局配置(操作者)
/autopickup global <key> <true|false> [silent] 设置一个全局值。键名不区分大小写;
silent 参数用于抑制确认消息。
| 键 |
描述 |
默认值 |
master |
总开关:如果为 false 则完全禁用模组 |
true |
blocks |
自动拾取被破坏方块掉落的物品 |
true |
blockXp |
自动拾取被破坏方块掉落的经验值 |
true |
mobLoot |
自动拾取被击杀怪物掉落的战利品 |
false |
mobXp |
自动拾取被击杀怪物掉落的经验值 |
false |
splitMobLoot |
在附近的攻击者之间分享怪物战利品 |
false |
splitMobXp |
在附近的攻击者之间分享怪物经验值 |
false |
allow_master |
让玩家自行选择总开关 |
true |
allow_blocks |
让玩家选择是否拾取方块物品 |
true |
allow_blockXp |
让玩家选择是否拾取方块经验 |
true |
allow_mobLoot |
让玩家选择是否拾取怪物战利品 |
true |
allow_mobXp |
让玩家选择是否拾取怪物经验 |
true |
allow_splitMobLoot |
让玩家选择是否分割怪物战利品 |
true |
allow_splitMobXp |
让玩家选择是否分割怪物经验 |
true |
当 allow_* 键为 false 时,服务器值适用于所有没有覆盖设置的玩家。
玩家个人设置
/autopickup setPlayerConfig <targets> <key|all> <true|false|reset> [silent]
- 操作员可以为任何玩家设置覆盖,该覆盖优先于服务器值和玩家自己的偏好。使用
reset 可移除覆盖。
- 其他玩家只能针对自己进行设置,且仅限于
allow_* 键为 true 的设置。这会设置他们自己的偏好,而非覆盖。偏好设置会被保存,因此重启后依然有效;这是无模组玩家的选择方式。玩家的偏好 simply 是他们通过此命令或模组配置菜单设置的最后一个值。当菜单中的设置替换了由命令设置的值时,系统会提示“您的 AutoPickup 设置已从客户端更新”。
键与上文相同,但不包含 allow_ 开头的键;all 表示一次性应用于所有设置。
模组的客户端还使用一些内部命令(ap_config_sync、check_perm、query_global、query_player)与服务器同步。这些命令不应手动输入。
? 配置文件
服务器配置: config/AutoPickup/global_config.json
{
"autoPickup": true,
"autoPickupBlocks": true,
"autoPickupBlockXp": true,
"autoPickupMobLoot": false,
"autoPickupMobXp": false,
"autoPickupSplitMobLoot": false,
"autoPickupSplitMobXp": false,
"allowMaster": true,
"allowBlocks": true,
"allowBlockXp": true,
"allowMobLoot": true,
"allowMobXp": true,
"allowSplitMobLoot": true,
"allowSplitMobXp": true
}
客户端配置: config/AutoPickup/client_default.toml(或在 presets/ 中按服务器分开的配置文件)
# AutoPickup Client Configuration
master = true
blocks = true
blockXp = true
mobLoot = false
mobXp = false
splitMobLoot = false
splitMobXp = false
玩家偏好: config/AutoPickup/preferences/<player-uuid>.json,每位玩家一个文件
(在单人模式中,路径为 config/AutoPickup/worlds/<world>/preferences/)。仅包含玩家通过模组配置菜单或对自身使用 setPlayerConfig 命令选择的设置:
{
"mobXp": true
}
玩家覆盖: config/AutoPickup/player_overrides.json
{
"player-uuid-here": {
"overrideMaster": true,
"overrideBlocks": null,
...
}
}
1.12.2 版本必需依赖
- MixinBooter (11.0 或更高版本) - 为 Forge 1.12.2 提供 Mixin 支持
可选但推荐的客户端依赖
- Mod Menu - 在游戏内访问配置界面
- YetAnotherConfigLib (YACL) - YACL 配置 GUI 所需(Vanilla GUI 作为备选)
✅ 兼容性
AutoPickup 挂钩到 Minecraft 核心机制,开箱即用即可与大多数模组无缝协作。
? 明确支持的模组
| Mod |
状态 |
备注 |
| VeinMiner |
完全兼容 |
整条矿脉链连同经验值一起收集,无论长度如何(见下方说明) |
| TreeHarvester |
完全兼容 |
收集原木/树叶;如果启用,会自动重新种植树苗 |
| Traveler's Backpack |
完全兼容 |
物品首先路由到背包过滤器(如果存在自动拾取升级,则正常工作) |
| FallingTree |
完全兼容 |
树木物品处理不同的破坏模式 |
| Panda's Falling Trees |
完全兼容 |
下落动画结束后,树木物品由 AutoPickup 处理 |
| RightClickHarvest |
完全兼容 |
右键收获作物(包括高甘蔗)自动拾取 |
| LiteMiner |
完全兼容 |
整条矿脉链连同经验值一起收集,无论长度如何 |
| FTB Ultimine |
完全兼容 |
终极挖掘的方块、合并掉落物以及右键收获的作物均连同经验值一起收集 |
| Butchery |
完全兼容 |
由玩家击杀的生物掉落的 carcasses 作为生物掉落物归击杀者所有 |
| General Block Breakers |
兼容 |
任何打破方块并将破坏行为归属于玩家的模组或机制 |
VeinMiner 的处理方式取决于 Minecraft 版本。VeinMiner 2.12.1+ 通过原版玩家路径(ServerPlayerGameMode.destroyBlock)破坏每条矿脉的每个方块,因此 AutoPickup 像处理通用方块破坏器一样自动捕获它,无需专用代码。当前版本的 AutoPickup 基于 2.12.1+ 运行并依赖这种隐式支持,因此专用的兼容性 mixin 已被移除以替代之。对于较旧的 Minecraft 版本(其中 VeinMiner 最高仅更新至 2.12.0),保留了 AutoPickup 专用的 VeinMiner 兼容性 mixin。无论如何,整条矿脉链都会连同经验值一起收集。
? 技术细节
AutoPickup 在这些注入点拦截掉落物:
Block.dropResources() - 主要的方块掉落处理
ServerPlayerGameMode.destroyBlock() - 追踪玩家自身的方块破坏行为,并将其标记为“堆栈内”,因此由该破坏同步引起的掉落(如连锁挖掘、植物柱倒塌)会被归因,而独立的农场掉落则不会
Level.destroyBlock() - 非玩家触发的破坏,来自模组或原版内容(如 LiteMiner 等连锁挖矿器,以及竹子/甘蔗/仙人掌柱在基座被破坏后倒塌)
ServerLevel.addFreshEntity() - 物品实体生成和下落方块实体的追踪(FallingTree 及任何直接生成掉落的模组)
LivingEntity.dropFromLootTable() - 生物战利品生成
LivingEntity.die() - 界定玩家击杀范围,使得在死亡过程中直接生成的掉落物(装备、Butchery 等模组从死亡事件生成的尸体)计入生物战利品。尸体随后会被追踪直到下一个刻,因此拴绳生物掉落的拴绳也会被收集
LivingEntity.dropExperience() - 生物经验球
Block.popExperience() - 方块经验球
ExperienceOrb.award() - 捕获由绕过原版经验流程的方块破坏模组直接生成的经验
ServerPlayerGameMode.useItemOn() - 右键收割(甜浆果、唱片机弹出、通过 RightClickHarvest 模组收割作物等)
ItemFrame.hurt() / hurtServer() - 左击移除物品展示框中的物品
Mob.interact() / ShearsItem.interactLivingEntity() - 剪毛掉落(羊毛、雪傀儡南瓜、哞菇蘑菇)
BrushableBlockEntity.dropContent() - 刷可疑的沙/砾石
LivingEntity.dropFromEntityInteractLootTable() - 刷犰狳获取鳞甲
在 1.12.2 中,方块和生物掉落来自 Forge 的 HarvestDropsEvent、LivingDropsEvent 和 LivingExperienceDropEvent,其余部分来自上述钩子的 1.12.2 对应版本(PlayerInteractionManager.tryHarvestBlock() / processRightClickBlock()、World.destroyBlock()、WorldServer.spawnEntity()、Block.dropXpOnBlockBreak()、EntityItemFrame.attackEntityFrom()、ItemShears.itemInteractionForEntity())。EntityLivingBase.onDeath() 的作用域源自其在 attackEntityFrom() 中的调用,因此马、驴、羊驼和猪在掉落事件之后产生的掉落物(库存、箱子、鞍)也计入生物战利品,且尸体在下一个刻掉落的拴绳也以相同方式收集。上述模组兼容性不适用于此版本。
这种广泛的兼容性意味着大多数模组无需显式支持即可自动工作。

? 生物战利品分配
当启用分割生物战利品或分割生物经验时,击杀生物获得的奖励将在参与者之间共享:
工作原理
- 伤害追踪: 模组会追踪对每个生物造成最后 10 次伤害的唯一玩家
- 资格检查: 在生物死亡时,只有满足以下条件的玩家才有资格获得奖励:
- 在线且未处于旁观模式
- 启用了大师模式 (Master)
- 启用了特定的生物拾取 (Mob Pickup) 功能
- 启用了特定的分割 (Split) 功能
- 与击杀者位于同一世界
- 分配方式:
- 物品平均分配;击杀者获得剩余部分
- 经验平均分配;击杀者获得剩余部分
- 无法放入背包的物品会在生物所在位置掉落
示例
玩家 A(击杀者)、B 和 C 都对一只僵尸造成了伤害。设置如下:
- 玩家 A: 大师模式 ✅,生物战利品 ✅,分割生物战利品 ✅
- 玩家 B: 大师模式 ✅,生物战利品 ✅,分割生物战利品 ✅
- 玩家 C: 大师模式 ✅,生物战利品 ✅,分割生物战利品 ❌
结果: 只有 A 和 B 获得分割后的战利品。玩家 C 什么都得不到,因为他们禁用了分割功能。
?? 开发者 API
添加依赖
Gradle:
dependencies {
compileOnly(files("libs/autopickup-platform-x.x.x.jar"))
}
使用 API
import com.lukarbonite.autopickup.AutoPickupApi;
public class QuestRewards {
public void giveReward(Player player, List<ItemStack> items, int xp) {
if (!isModLoaded("autopickup")) {
// 回退方案:手动掉落
items.forEach(stack -> player.dropItem(stack, false));
player.addExperience(xp);
return;
}
// AutoPickup 负责处理:
// - 插入背包
// - 旅行者背包路由
// - 配置检查(大师模式、方块列表等)
List<ItemStack> remaining = AutoPickupApi.tryPickup(player, items);
// 掉落未能装入的物品
remaining.forEach(stack -> player.dropItem(stack, false));
// AutoPickup 负责处理:
// - 修补计算
// - 配置检查
AutoPickupApi.tryPickupBlockExperience(player, xp);
}
// 用于生物相关奖励
public void giveMobReward(Player player, List<ItemStack> loot, int xp) {
List<ItemStack> remaining = AutoPickupApi.tryPickupFromMob(player, loot);
remaining.forEach(stack -> player.dropItem(stack, false));
AutoPickupApi.tryPickupMobExperience(player, xp);
}
}
API 方法
| 方法 |
描述 |
tryPickup(PlayerEntity, List<ItemStack>) |
从方块拾取物品(遵循主设置 + 方块设置) |
tryPickupFromMob(PlayerEntity, List<ItemStack>) |
从生物拾取物品(遵循主设置 + 生物掉落设置) |
tryPickupBlockExperience(PlayerEntity, int) |
获取方块经验值(遵循主设置 + 方块经验设置) |
tryPickupMobExperience(PlayerEntity, int) |
获取生物经验值(遵循主设置 + 生物经验设置) |
isMasterEnabled(PlayerEntity) |
检查玩家是否启用了自动拾取功能 |
isBlocksEnabled(PlayerEntity) |
检查方块物品拾取设置 |
isBlockXpEnabled(PlayerEntity) |
检查方块经验值拾取设置 |
isMobLootEnabled(PlayerEntity) |
检查生物掉落物拾取设置 |
isMobXpEnabled(PlayerEntity) |
检查生物经验值拾取设置 |
注意: 所有 try* 方法均返回无法拾取的物品列表(即背包已满)。
? 许可证
本项目采用 GNU Affero 通用公共许可证 v3.0 (AGPL-3.0) 授权。
您可以自由:
- ✅ 在整合包中使用
- ✅ 修改以用于个人用途
- ✅ 分发修改后的版本(也必须使用 AGPL-3.0)
请参阅 LICENSE 文件以获取详细信息。
AutoPickup
AutoPickup is a highly configurable server-side mod that automates the collection of items and experience orbs. It features session tracking, a multi-tier permission system, and extensive mod compatibility to ensure drops are attributed to the correct players, even when using high-speed mining mods or engaging in group combat.
✨ Features
Core Functionality
- ? Seamless Collection: Items from broken blocks and mob kills are instantly added to your inventory
- ⭐ Smart Experience Handling: Experience is cached and applied after a short delay, ensuring tools take durability damage before Mending activates
- ? Lag-Free: Prevents item and experience orb entities from spawning, reducing server load
- ? Overflow Protection: If your inventory is full, items safely drop at your feet
- ? Granular Control: Toggle individual features independently via commands or config GUI
Advanced Features
- ? Mob Loot Splitting: Share mob drops and XP with nearby players who participated in the kill
- ? Per-Player Permissions: Server admins can override settings for specific players
- ? Client Profiles: Automatic per-server/world configuration profiles for seamless server switching
- ? Extensive Mod Compatibility: Works automatically with VeinMiner, LiteMiner, TreeHarvester, Traveler's Backpack, FallingTree, Panda's Falling Trees and more
- ? Farm-Safe: Only picks up what your own actions break. Automated farms (pistons, water, bonemeal/moss, droppers) running nearby are never siphoned into your inventory

⚙️ Configuration
AutoPickup uses a flexible three-tier permission system:
- Server Defaults - Global fallback settings
- Admin Overrides - Per-player forced settings (highest priority)
- Client Preferences - Individual player choices (only if the server allows them, and only once
the player's client has sent them; players without the mod start with the server defaults)
?️ Configuration Menu (Client)
You can configure your personal preferences via the menu. Use Mod Menu for a easy access on Fabric.
Otherwise, use /autopickup gui
Settings available:
- Master Toggle
- Block Item Pickup
- Block Experience Pickup
- Mob Loot Pickup
- Mob Experience Pickup
- Split Mob Loot (share drops with nearby attackers)
- Split Mob XP (share experience with nearby attackers)
Note: Your client settings only apply if the server admin has enabled the corresponding "Allow" setting for that feature.

? Commands
Everyone can run /autopickup and /autopickup gui. Changing the global configuration, or another
player's settings, requires being a server operator.
Status and Menu
| Command |
Description |
/autopickup |
Display the server's settings and, for a player, their own (see below) |
/autopickup gui |
Open the configuration menu (needs the client mod) |
A player sees three columns; the console sees only the first two:
Feature | Server | You
Master Toggle | CLIENT DECIDE (default: ON) | ON (server default)
Mob XP | CLIENT DECIDE (default: OFF) | OFF (server default)
Mob Loot | OFF | ON (admin override)
CLIENT DECIDE means players may choose that setting; the default is what they get until they do.
You is the value that applies to you and where it comes from: admin override, your setting
or server default.
Global Configuration (operators)
/autopickup global <key> <true|false> [silent] sets one global value. Keys are not case sensitive;
silent suppresses the confirmation message.
| Key |
Description |
Default |
master |
Master toggle: disables the mod entirely if false |
true |
blocks |
Autopickup items from broken blocks |
true |
blockXp |
Autopickup experience from broken blocks |
true |
mobLoot |
Autopickup loot from killed mobs |
false |
mobXp |
Autopickup experience from killed mobs |
false |
splitMobLoot |
Share mob loot among nearby attackers |
false |
splitMobXp |
Share mob XP among nearby attackers |
false |
allow_master |
Let players choose the master toggle themselves |
true |
allow_blocks |
Let players choose block item pickup |
true |
allow_blockXp |
Let players choose block XP pickup |
true |
allow_mobLoot |
Let players choose mob loot pickup |
true |
allow_mobXp |
Let players choose mob XP pickup |
true |
allow_splitMobLoot |
Let players choose mob loot splitting |
true |
allow_splitMobXp |
Let players choose mob XP splitting |
true |
When an allow_* key is false, the server value applies to every player who has no override.
Per-Player Settings
/autopickup setPlayerConfig <targets> <key|all> <true|false|reset> [silent]
- Operators set an override for any player, which beats both the server value and the player's
own preference.
reset removes it.
- Other players may target only themselves, and only for settings whose
allow_* key is true.
This sets their own preference, never an override. It is saved, so it lasts across restarts;
this is how players without the mod choose. A player's preference is simply the last value they
set, by this command or with the mod's config menu. When the menu's settings replace one set by
command, the player is told "Your AutoPickup settings were updated from your client".
Keys are the same as above without the allow_ ones; all applies to every setting at once.
The mod's client also uses a few internal commands (ap_config_sync, check_perm, query_global,
query_player) to sync with the server. They are not meant to be typed.
? Configuration Files
Server Config: config/AutoPickup/global_config.json
{
"autoPickup": true,
"autoPickupBlocks": true,
"autoPickupBlockXp": true,
"autoPickupMobLoot": false,
"autoPickupMobXp": false,
"autoPickupSplitMobLoot": false,
"autoPickupSplitMobXp": false,
"allowMaster": true,
"allowBlocks": true,
"allowBlockXp": true,
"allowMobLoot": true,
"allowMobXp": true,
"allowSplitMobLoot": true,
"allowSplitMobXp": true
}
Client Config: config/AutoPickup/client_default.toml (or per-server profiles in presets/)
# AutoPickup Client Configuration
master = true
blocks = true
blockXp = true
mobLoot = false
mobXp = false
splitMobLoot = false
splitMobXp = false
Player Preferences: config/AutoPickup/preferences/<player-uuid>.json, one file per player
(in singleplayer, config/AutoPickup/worlds/<world>/preferences/). Holds only the settings that
player chose, with the mod's config menu or setPlayerConfig on themselves:
{
"mobXp": true
}
Player Overrides: config/AutoPickup/player_overrides.json
{
"player-uuid-here": {
"overrideMaster": true,
"overrideBlocks": null,
...
}
}
Required on 1.12.2
- MixinBooter (11.0 or newer) - Provides Mixin on Forge 1.12.2
Optional But Recommended Client Dependencies
- Mod Menu - Access config screen in-game
- YetAnotherConfigLib (YACL) - Required for YACL config GUI (Vanilla GUI fallback)
✅ Compatibility
AutoPickup hooks into core Minecraft mechanics and works seamlessly with most mods out of the box.
? Explicitly Supported Mods
| Mod |
Status |
Notes |
| VeinMiner |
Full |
Whole vein chain collected with XP, at any length (see note below) |
| TreeHarvester |
Full |
Logs/leaves collected; saplings auto-replanted if enabled |
| Traveler's Backpack |
Full |
Items route to backpack filter first (If the Auto Pickup upgrade is there it works) |
| FallingTree |
Full |
Tree items handle the different break modes |
| Panda's Falling Trees |
Full |
Tree items are handled by AutoPickup after fall animation |
| RightClickHarvest |
Full |
Right-click crop harvests (including tall sugarcane) picked up automatically |
| LiteMiner |
Full |
Whole vein chain collected with XP, at any length |
| FTB Ultimine |
Full |
Ultimined blocks, merged drops and right-click crop harvests collected with XP |
| Butchery |
Full |
Carcasses dropped by player-killed mobs go to the killer as mob loot |
| General Block Breakers |
Compatible |
Any mod or mechanic that breaks blocks and attributes the break to the player |
VeinMiner is handled in one of two ways depending on the Minecraft version. VeinMiner 2.12.1+ breaks each vein block through the vanilla player path (ServerPlayerGameMode.destroyBlock), so AutoPickup catches it automatically like any general block breaker, so no dedicated code needed. Current Minecraft versions of AutoPickup run against 2.12.1+ and rely on this implicit support, so the explicit compatibility mixin has been removed in favor of it. Older Minecraft versions, where VeinMiner has only been updated up to 2.12.0, keep AutoPickup's dedicated VeinMiner compatibility mixin. Either way, whole vein chains are collected with XP.
? Technical Details
AutoPickup intercepts drops at these injection points:
Block.dropResources() - Primary block drop handling
ServerPlayerGameMode.destroyBlock() - Tracks the player's own block break and marks their break as "on the stack," so drops caused synchronously by that break (chain-mining, plant-column collapse) are attributed while independent farm drops are not
Level.destroyBlock() - Non-player breaks from mods/vanilla (chain-miners like LiteMiner, and bamboo/sugarcane/cactus columns collapsing after their base is broken)
ServerLevel.addFreshEntity() - Item entity spawning and falling-block entity tracking (FallingTree and any mod that spawns drops directly)
LivingEntity.dropFromLootTable() - Mob loot generation
LivingEntity.die() - Scopes a player kill so drops spawned directly during the death (equipment, mods like Butchery spawning carcasses from the death event) count as mob loot. The corpse is then tracked until its next tick, so the lead a leashed mob drops then is collected too
LivingEntity.dropExperience() - Mob XP orbs
Block.popExperience() - Block XP orbs
ExperienceOrb.award() - Captures XP spawned directly by block-breaking mods that bypass the vanilla XP pipeline
ServerPlayerGameMode.useItemOn() - Right-click harvesting (sweet berries, jukebox disc ejection, crops via the RightClickHarvest mod, etc.)
ItemFrame.hurt() / hurtServer() - Items removed from item frames by left-clicking
Mob.interact() / ShearsItem.interactLivingEntity() - Shearing drops (wool, snow golem pumpkins, mooshroom mushrooms)
BrushableBlockEntity.dropContent() - Brushing suspicious sand/gravel
LivingEntity.dropFromEntityInteractLootTable() - Brushing armadillos for scutes
On 1.12.2, block and mob drops come from Forge's HarvestDropsEvent, LivingDropsEvent and LivingExperienceDropEvent, and the rest from the 1.12.2 equivalents of the hooks above (PlayerInteractionManager.tryHarvestBlock() / processRightClickBlock(), World.destroyBlock(), WorldServer.spawnEntity(), Block.dropXpOnBlockBreak(), EntityItemFrame.attackEntityFrom(), ItemShears.itemInteractionForEntity()). EntityLivingBase.onDeath() is scoped from its call in attackEntityFrom(), so drops that horses, donkeys, llamas and pigs make after the drops event (inventory, chests, saddles) count as mob loot too, and leads dropped by the corpse on its next tick are collected the same way. The mod compatibility above does not apply there.
This broad compatibility means most mods work automatically without explicit support.

? Mob Loot Splitting
When Split Mob Loot or Split Mob XP is enabled, rewards from mob kills are shared among participants:
How It Works
- Damage Tracking: The mod tracks the last 10 unique players who damaged each mob
- Eligibility Check: On mob death, only players who:
- Are online and not spectating
- Have Master enabled
- Have the specific Mob Pickup feature enabled
- Have the specific Split feature enabled
- Are in the same world as the killer
- Distribution:
- Items are split evenly; the killer receives any remainder
- Experience is split evenly; the killer receives any remainder
- Items that don't fit in inventories are dropped at the mob's location
Example
Player A (killer), B, and C all damaged a zombie. Settings:
- Player A: Master ✅, Mob Loot ✅, Split Mob Loot ✅
- Player B: Master ✅, Mob Loot ✅, Split Mob Loot ✅
- Player C: Master ✅, Mob Loot ✅, Split Mob Loot ❌
Result: Only A and B receive split loot. Player C gets nothing because they disabled splitting.
?? Developer API
Adding as a Dependency
Gradle:
dependencies {
compileOnly(files("libs/autopickup-platform-x.x.x.jar"))
}
Using the API
import com.lukarbonite.autopickup.AutoPickupApi;
public class QuestRewards {
public void giveReward(Player player, List<ItemStack> items, int xp) {
if (!isModLoaded("autopickup")) {
// Fallback: manual drops
items.forEach(stack -> player.dropItem(stack, false));
player.addExperience(xp);
return;
}
// AutoPickup handles:
// - Inventory insertion
// - Traveler's Backpack routing
// - Config checks (Master, Blocks, etc.)
List<ItemStack> remaining = AutoPickupApi.tryPickup(player, items);
// Drop items that didn't fit
remaining.forEach(stack -> player.dropItem(stack, false));
// AutoPickup handles:
// - Mending calculations
// - Config checks
AutoPickupApi.tryPickupBlockExperience(player, xp);
}
// For mob-related rewards
public void giveMobReward(Player player, List<ItemStack> loot, int xp) {
List<ItemStack> remaining = AutoPickupApi.tryPickupFromMob(player, loot);
remaining.forEach(stack -> player.dropItem(stack, false));
AutoPickupApi.tryPickupMobExperience(player, xp);
}
}
API Methods
| Method |
Description |
tryPickup(PlayerEntity, List<ItemStack>) |
Pickup items from blocks (respects Master + Blocks settings) |
tryPickupFromMob(PlayerEntity, List<ItemStack>) |
Pickup items from mobs (respects Master + MobLoot settings) |
tryPickupBlockExperience(PlayerEntity, int) |
Give block XP (respects Master + BlockXP settings) |
tryPickupMobExperience(PlayerEntity, int) |
Give mob XP (respects Master + MobXP settings) |
isMasterEnabled(PlayerEntity) |
Check if autopickup is enabled for player |
isBlocksEnabled(PlayerEntity) |
Check block item pickup setting |
isBlockXpEnabled(PlayerEntity) |
Check block XP pickup setting |
isMobLootEnabled(PlayerEntity) |
Check mob loot pickup setting |
isMobXpEnabled(PlayerEntity) |
Check mob XP pickup setting |
Note: All try* methods return lists of items that could not be picked up (full inventory).
? License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
You are free to:
- ✅ Use in modpacks
- ✅ Modify for personal use
- ✅ Distribute modified versions (must also be AGPL-3.0)
See the LICENSE file for full details.
评论 0
登录后参与评分
还没有评论,来抢沙发吧