拾荒生物
你是否注意到,僵尸虽然能捡起物品,却很少会做出什么有用的操作?Scavenger Mobs 修复了这个问题,赋予敌对生物主动寻找并装备更好装备的智能。
当你把一把钻石剑掉落在僵尸附近时,它不会只是无视它——僵尸会走过来,将它与手中那把生锈的铁剑进行比较,然后进行升级。护甲也是如此,而且这种比较并非表面功夫。生物在决定是否捡起某件物品之前,会评估附魔、耐久度和材料等级。你不小心掉落的那把锋利 V 的下界合金剑?是的,僵尸想要它,而且它清楚为什么。
不同生物有不同的优先级。骷髅痴迷于弓,在决定是否更换时会重点权衡力量(Power)和火焰(Flame)等附魔。凋零骷髅则更偏好近战武器。掠夺者和卫道士会抓起盾牌和弩来增强他们的袭击能力,而唤魔者只想找个东西躲起来。溺尸则会像普通僵尸一样,额外寻找三叉戟。
猪灵享有特殊待遇。当猪灵捡起任何一件金色装备时,它会暂时变得友好——这不是因为你穿着金制品,而是因为你用一件闪亮的新玩具贿赂了它。这种安抚状态默认持续 30 秒,给你留出通过或建立更永久关系的窗口期。
当生物装备了新物品时,它会丢弃之前持有的物品。这创造了有趣的战场动态,战斗中装备多次易手,你可能会发现一个僵尸穿着你阵亡好友的全部装备。
捡起装备的生物不会带着它们逃跑。任何捡起物品的生物都会变得持久存在且永不消失,只要它手持这些物品;并且当它死亡时,它捡起的物品保证会掉落,无论杀死它的是什么(消失诅咒仍然适用,如原版)。这两个行为都可以在配置文件中关闭。
模组生物与数据包
可以通过配置文件或数据包中的实体类型标签教会任何生物拾荒。选择适合的行为配置文件:
| 配置文件 |
标签 |
捡起 |
| 僵尸 |
scavengermobs:zombie_like |
武器和护甲 |
| 骷髅 |
scavengermobs:skeleton_like |
弓和弩 |
| 凋零骷髅 |
scavengermobs:wither_skeleton_like |
近战武器 |
| 掠夺者 |
scavengermobs:pillager_like |
弩和盾牌 |
| 卫道士 |
scavengermobs:vindicator_like |
斧头和盾牌 |
| 灾厄村民 |
scavengermobs:illager_like |
盾牌 |
| 猪灵 |
scavengermobs:piglin_like |
金色装备 |
示例 data/scavengermobs/tags/entity_types/zombie_like.json:
{
"replace": false,
"values": ["examplemod:cave_zombie", "#examplemod:undead"]
}
以此方式添加的生物始终会拾荒,不受“生物开关”的影响。继承自原版僵尸、骷髅、灾厄村民或猪灵的生物会自动被拾取。
物品黑名单
列在 itemBlacklist(配置文件)或 scavengermobs:blacklist 物品标签(数据包)中的物品永远不会被任何生物捡起。
配置
所有设置都位于 scavengermobs-common.toml 中:
[General Settings]
# 生物搜索物品的范围(以方块为单位,1.0 到 32.0)
scavengeRange = 8.0
# 拾荒尝试之间的间隔刻数,20 刻 = 1 秒(10 到 200)
scavengeCooldown = 40
# 每次冷却期间尝试拾荒的概率(0.0 到 1.0)
scavengeChance = 0.5
[Mob Toggles]
zombiesScavenge = true
skeletonsScavenge = true
illagersScavenge = true
piglinsScavenge = true
witherSkeletonsScavenge = true
drownedScavenge = true
husksScavenge = true
straysScavenge = true
[Piglin Settings]
# 猪灵在捡起金色装备时会变得友好
piglinsPacifyGold = true
# 友好状态的持续时间(以刻为单位,100 到 6000)
piglinPacifyDuration = 600
[Pickup Safety]
# 捡起装备的生物永不消失
persistentOnPickup = true
# 生物死亡时总是掉落其捡起的装备
guaranteedDrops = true
[Custom Mobs]
# 每个行为配置文件的实体 ID 或 #entity_type_tags(默认均为空)
zombieLike = []
skeletonLike = []
witherSkeletonLike = []
pillagerLike = []
vindicatorLike = []
illagerLike = []
piglinLike = []
[Item Blacklist]
# 生物永远不会捡起的物品 ID 或 #item_tags
# 示例:["minecraft:golden_sword", "#forge:tools/axes"]
itemBlacklist = []
Scavenger Mobs
Ever noticed how zombies can pick up items but rarely do anything useful with them? Scavenger Mobs fixes that by giving hostile mobs the intelligence to actively seek out and equip better gear.
When you drop a diamond sword near a zombie, it won't just ignore it - the zombie will walk over, compare it against whatever rusty iron sword it's currently holding, and make the upgrade. The same goes for armor, and the comparison isn't just surface level. Mobs evaluate enchantments, durability, and material tier before deciding whether an item is worth picking up. That Sharpness V netherite sword you accidentally dropped? Yeah, the zombie wants it, and it knows exactly why.
Different mobs have different priorities. Skeletons obsess over bows, heavily weighing enchantments like Power and Flame when deciding whether to swap. Wither skeletons prefer melee weapons instead. Pillagers and vindicators will grab shields and crossbows to bolster their raids, while evokers just want something to hide behind. Drowned seek out tridents alongside the usual zombie fare.
Piglins get special treatment. When a piglin picks up any piece of gold equipment, it becomes temporarily friendly - not because you're wearing gold, but because you've essentially bribed it with a shiny new toy. This pacification lasts 30 seconds by default, giving you a window to pass through or set up a more permanent arrangement.
When a mob equips something new, it drops whatever it was previously holding. This creates interesting battlefield dynamics where gear changes hands multiple times during a fight, and you might find a zombie wearing your fallen friend's entire loadout.
Mobs that pick up gear won't run off with it. Any mob that picks something up becomes persistent and never despawns while holding it, and the items it picked up are guaranteed to drop when it dies, whatever killed it (Curse of Vanishing still applies, as in vanilla). Both behaviors can be turned off in the config.
Modded Mobs & Datapacks
Any mob can be taught to scavenge, from the config or with entity type tags in a datapack. Pick the behavior profile that fits:
| Profile |
Tag |
Picks up |
| Zombie |
scavengermobs:zombie_like |
Weapons and armor |
| Skeleton |
scavengermobs:skeleton_like |
Bows and crossbows |
| Wither Skeleton |
scavengermobs:wither_skeleton_like |
Melee weapons |
| Pillager |
scavengermobs:pillager_like |
Crossbows and shields |
| Vindicator |
scavengermobs:vindicator_like |
Axes and shields |
| Illager |
scavengermobs:illager_like |
Shields |
| Piglin |
scavengermobs:piglin_like |
Gold gear |
Example data/scavengermobs/tags/entity_types/zombie_like.json:
{
"replace": false,
"values": ["examplemod:cave_zombie", "#examplemod:undead"]
}
Mobs added this way always scavenge, regardless of the Mob Toggles. Mobs that extend a vanilla zombie, skeleton, illager or piglin are picked up automatically.
Item Blacklist
Items listed in itemBlacklist (config) or in the scavengermobs:blacklist item tag (datapack) are never picked up by any mob.
Configuration
All settings are found in scavengermobs-common.toml:
[General Settings]
# Range in blocks that mobs search for items (1.0 to 32.0)
scavengeRange = 8.0
# Ticks between scavenge attempts, 20 ticks = 1 second (10 to 200)
scavengeCooldown = 40
# Chance per cooldown to attempt scavenging (0.0 to 1.0)
scavengeChance = 0.5
[Mob Toggles]
zombiesScavenge = true
skeletonsScavenge = true
illagersScavenge = true
piglinsScavenge = true
witherSkeletonsScavenge = true
drownedScavenge = true
husksScavenge = true
straysScavenge = true
[Piglin Settings]
# Piglins become friendly when picking up gold gear
piglinsPacifyGold = true
# Duration of friendliness in ticks (100 to 6000)
piglinPacifyDuration = 600
[Pickup Safety]
# Mobs that pick up gear never despawn
persistentOnPickup = true
# Mobs always drop the gear they picked up when they die
guaranteedDrops = true
[Custom Mobs]
# Entity ids or #entity_type_tags for each behavior profile (all default to empty)
zombieLike = []
skeletonLike = []
witherSkeletonLike = []
pillagerLike = []
vindicatorLike = []
illagerLike = []
piglinLike = []
[Item Blacklist]
# Item ids or #item_tags that mobs never pick up
# Example: ["minecraft:golden_sword", "#forge:tools/axes"]
itemBlacklist = []
评论 0
登录后参与评分
还没有评论,来抢沙发吧