Edit Mob Drops

Edit Mob Drops

221k Downloads

1.16.1 Chance is out of order in example config

jengendler opened this issue ยท 1 comments

commented

The example config gives this sequence:
modid:itemName:[nbtfile]:[minStackSize]:[maxStackSize]:[universalChance]:[monsterChance]:[bossChance]:[group1Chance]:[group2Chance]...

However, I'm experiencing the following arrangement to actually work properly:
#modid:itemName:[nbtfile]:[minStackSize]:[maxStackSize]:[universalChance]:[monsterChance]:[group1Chance]:[group2Chance]

group1Chance only appears to work when in the bossChance slot. Then group2Chance, but group3Chance does not appear to register (even triple-checking my code and in a color-formatted TOML editor to ensure proper termination characters and commas between groups). Not sure how to target Boss, but I haven't actually tested it.

Also, universalChance and monsterChance appear to have no difference. I tested it with universal with 0% chance and monster with 100% chance, and everything else at 0% chance, but when I killed a Chicken, it dropped my added loot. Unless Chicken is somehow counted as a monster mob? Killing other monsters worked with that test. I then made everything 0% except for universal, and zombies, skeletons, and chicken mobs dropped everything (monster and friendly).

Please let me know if you'd prefer my exact copy/pasted code from any of the tests, but for now, this appears to be working for me:

#If debug mode is active, the mod will print the name of any mob killed by the player to console, and will log when items are dropped debugMode = true #Items to add, in the form FROM EXAMPLE modid:itemName:[nbtfile]:[minStackSize]:[maxStackSize]:[universalChance]:[monsterChance]:[bossChance]:[group1Chance]:[group2Chance]... #Items to add, in the form ACCORDING TO MY TEST RESULTS #modid:itemName:[nbtfile]:[minStackSize]:[maxStackSize]:[universalChance]:[monsterChance]:[group1Chance]:[group2Chance]... #Chances are % #NBT File is a json file in the "editmobdrops" folder here in config (leave blank for none) itemsToAdd = [ "coins:coin_copper::1:6:0:0:40:0", "coins:coin_iron::1:3:0:0:25:0", "coins:coin_gold::1:3:0:0:10:40", "coins:coin_platinum::1:6:0:0:0:0:25", "coins:coin_diamond::1:3:0:0:0:0:2"] #Mob groups, in the form [EntityName]:[EntityName]... mobGroups = [ "ZombieEntity:SkeletonEntity:StrayEntity:HuskEntity:SpiderEntity:CaveSpiderEntity:DrownedEntity", "WitchEntity:PillagerEntity"] #Mobs to clear existing drops from mobsToClear = [] #Single mob items, in the form EntityName:modid:itemName:[nbtfile]:[minStackSize]:[maxStackSize]:[chance] singleMobItems = [ "CreeperEntity:coins:coin_diamond::1:1:50", "VindicatorEntity:coins:coin_gold::1:6:30", "VindicatorEntity:coins:coin_platinum::1:3:40", "VindicatorEntity:coins:coin_diamond::1:1:20", "EvokerEntity:coins:coin_gold::1:9:20", "EvokerEntity:coins:coin_platinum::1:6:40", "EvokerEntity:coins:coin_diamond::1:3:30", ]

My first mob group properly drops copper, iron, and gold coins, but not platinum and diamond coins at the various percentage changes supplied. My second mob group drops gold, platinum, and diamond coins at various percentage chances. Because I couldn't add a third group successfully (even trying simple mobs like "ChickenEntity), I added a series of singleMobItems to Vindicators and Evokers that drop the configured items appropriately.

Thanks.

commented

I'll have a look at this as soon as I can