#custom drops mobs

26 messages · Page 1 of 1 (latest)

robust latch
#

Is it possible to modify the items that hostile mobs drop? I have a mod that sometimes when you kill zombies or something like that, it drops an item to get their cosmetics. The mod is Simple Hats and I don't want it to be able to be obtained like that, but I don't see an explanation on their page.
Kragnoth

rigid otterBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

robust latch
#

@hearty shell We should chat here, sorry about that topic tag

#

I know that they don't recommend doing these things with AI, but since I don't know much and it's for a server with about 6 friends I did it, first I tested the code and it works because I made it drop minerals to see if it worked and it did, but when I put the objects that the mod drops I put them and set the probability to 0 but they still keep dropping them, so I don't know what to do haha
This is the code

tiny jungleBOT
#

Paste version of custom_loot.js from @robust latch

hearty shell
#

let me see if I can find my old code

#

I had made some custom loot items using abstraction and had them spawn in all loot pools

#

I use this to add loot to the chimera boss ```js

LootJS.modifiers((event) => {
    event.addEntityLootModifier("minecraft:wither")
        .addLoot("minecraft:nether_star");
    // Targeting the WildenChimera boss (WILDEN_BOSS)
    event.addEntityLootModifier("ars_nouveau:wilden_boss")
        .addLoot("ars_nouveau:wilden_tribute") // Always drops a Wilden Tribute
        .addLoot(LootEntry.of("ars_nouveau:manaweave_cloth").when((c) => c.randomChance(0.7))) // 70% chance to drop Manaweave Cloth
        .addLoot(LootEntry.of("ars_nouveau:infused_gemstone").when((c) => c.randomChance(0.5))) // 50% chance to drop Infused Gemstone
});
#

and the wither

#

(this makes it so you can farm them with the ... bearded dude

#

oh you want to remove..
well look up the lootjs wiki they have removals in this style

robust latch
#

I have to add the names of each item and set it to 0, right?

#

I honestly don't know how to do it very well.

#

LootJS.modifiers((event) => {
event.addEntityLootModifier("minecraft:zombie")
event.addEntityLootModifier("minecraft:skeleton")
event.addEntityLootModifier("minecraft:creeper")
event.addEntityLootModifier("minecraft:spider")
// Targeting the WildenChimera boss (WILDEN_BOSS)
event.addEntityLootModifier("ars_nouveau:wilden_boss")
.addLoot("ars_nouveau:wilden_tribute") // Always drops a Wilden Tribute
.addLoot(LootEntry.of("simplehats:hatbag_common").when((c) => c.randomChance(0.0))) // 70% chance to drop Manaweave Cloth
.addLoot(LootEntry.of("simplehats:hatbag_uncommon").when((c) => c.randomChance(0.0))) // 50% chance to drop Infused Gemstone
.addLoot(LootEntry.of("simplehats:hatbag_rare").when((c) => c.randomChance(0.0))) // 50% chance to drop Infused Gemstone
.addLoot(LootEntry.of("simplehats:hatbag_epic").when((c) => c.randomChance(0.0))) // 50% chance to drop Infused Gemstone
});

#

something like that?

#

I don't know what I should put in event.addEntityLootModifier("ars_nouveau:wilden_boss")

hearty shell
#

the wildenboss was an example

#

I think you need remove loot or whatever methods lootjs uses

robust latch
#

Should I delete it?

#

okay

hearty shell
robust latch
#

thanks

robust latch
#

I have tried it, it doesn't give errors but they keep dropping what I want them not to drop, I think it's something related to the mod but there are no configs where I can remove that!

hidden steeple
#

if i understand it correct you will remove all hatbag loot from the entities: zombie, skeleton, creeper and spider?

robust latch