LTDV10Test/packet/kubejs/server_scripts/Improved Mobs/loot.js
3944Realms 67a395b765
Some checks failed
Deploy to Remote Server / deploy (push) Failing after 1m11s
初始化
2026-04-14 18:20:56 +08:00

12 lines
450 B
JavaScript

//根据难度增加怪物掉落
let difficultyLoots = global.difficultyLoots
LootJS.modifiers(e => {
for (const key in difficultyLoots) {
let element = difficultyLoots[key]
element.forEach(val => {
e.addEntityLootModifier(val.entity)
.playerPredicate(player => GetPlayerDifficulty(player) >= val.difficulty)
.addLoot(LootEntry.of(key).when(c => c.randomChance(val.chance)))
})
}
})