LootJS.modifiers((event) => {
event
.addEntityLootModifier("minecraft:creeper", "minecraft:skeleton")
[Item.of("jackseconomy:penny").withChance(50), Item.of("jackseconomy:nickel").withChance(25),
Item.of("jackseconomy:dime").withChance(10),
Item.of("jackseconomy:quarter").withChance(5)];
});
```js
This is my starter script to see if I can add the items indicated to all hostile mobs . Vanilla only would be easier , modded can come later.
I'm not sure how to do it efficiently/ correctly.
Basically making all hostile mobs drop coins from a mod jacks economy . With higher coin value = lower % chance to get
Any help be greatly appreciated. Thanks.
#apply loot to all hostile vanilla mobs using lootjs
3 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
LootJS.modifiers((event) => {
event
.addEntityLootModifier("minecraft:skeleton")
.addWeightedLoot(
[
Item.of("jackseconomy:penny").withChance(50),
Item.of("jackseconomy:nickel").withChance(25),
Item.of("jackseconomy:dime").withChance(10),
Item.of("jackseconomy:quarter").withChance(5)
]);
});
i may have this figured out after all. .... gonna create a const for hostile mobs.. have all mob names in it that i want dropping these coins.. and let it rip.. 🙂