Crying Ghasts (Forge)

Crying Ghasts (Forge)

273k Downloads

Configurable Extra Mob Drops: Setting a range for drops possible solution/workaround.

Airos-the-Tiger opened this issue ยท 0 comments

commented

Information

Minecraft version: 1.20.4
Modloader: Fabric 0.96.4+1.20.4
Fabric loader version: 0.15.7
Environment: Singleplayer

Mod name: Configurable Extra Mob Drops
Mod version: 3.3

See also: [Issue #610] [Issue #904] [Issue #1316] [Issue #1956]

Comment

Hello! I'm a big fan of your mods, and I have a small comment in regards to a requested feature for Configurable Extra Mob Drops - that being the ability to set a range for how many of an item drops when the mob is killed. With a little testing, I've discovered this can be achieved through "stacking" extra mob drops.

For example, using the in-game console I use /cemd addhand <cow> <.5> while holding one (1) bone, then again while holding two (2) bones. When the cow is killed, the game "rolls the dice" on both of those drops, resulting in anywhere from 0-3 bones dropping.

Here's how that looks in \.minecraft\config\configurableextramobdrops\mobdropconfig.txt:

'minecraft:cow' : '{Count:1b,id:"minecraft:bone",tag:{dropchance:0.5d}}|||{Count:2b,id:"minecraft:bone",tag:{dropchance:0.5d}}',

The extra drops do not need to be unique, either. 'minecraft:cow' : '{Count:1b,id:"minecraft:bone",tag:{dropchance:0.5d}}|||{Count:1b,id:"minecraft:bone",tag:{dropchance:0.5d}}', is also valid, and results in 0-2 bones dropping.

While it's not an elegant method on the user end, it does appear to be functional based on my very limited testing*, and most any desired range and percentage chance should be achievable if the user knows what they're doing. As further example, you can have three drops of 1 bone each, with the first drop set to 100%, the second to 25%, and a third 10%. This will weigh the dice more heavily towards the low end while still guaranteeing at least one drop, but the math behind all that can get complex pretty quickly.

Hopefully this information can be useful to at least a few other users to tinker with and expand their usage of your mod.

Thank you for the hard work you put into developing your mods, it's really appreciated.


*The total extent of my testing was going into a creative mode/superflat testing environment, giving myself a cow spawn egg, bones, and a diamond sword, running the commands, and whacking cows until they dropped the expected number of bones at least once. This took about a minute or so.