The Vanilla Experience (Mod) (Forge)

The Vanilla Experience (Mod) (Forge)

118k Downloads

Just Mob Heads: Allow 0% Chance in Config/Maybe I'm a Dummy

ValokAsura opened this issue ยท 2 comments

commented

Information

Minecraft version: 1.21
Modloader: Fabric 0.100.4+1.21

Mod name: Just Mob Heads 1.21.0-8.1-fabric+forge+neo (Modrinth)

Feature description

Could you add a check for 0 chance in the config files? If it already can, could you point out what I might be doing wrong when trying to set them at 0? I've confirmed that 0.01 and 1 work after changing the config and executing "/jmh reload."

I've enabled "Mob Specific Drop Chances" and set all of the mob head drops to 0.01 in the config, but I would like to reduce some to 0. For example, I've tested reducing cow and enderman to 0.00 since those are usually my first farms, but it's still just heads everywhere given the quantity that get killed.

Thank you for your time!

commented

I also ran into this and was annoyed. I looked at the code to see if it was an easy fix I could open a PR for...

The problem is this: the chance of a drop rate has an "extra chance" added to it, due to looting effect on sword (and maybe other stuff, don't recall), so even if you set the chance to 0, the actual change will be slightly positive and you will get head drops anyway.

Fixing this requires a design decision: should 0.0 be treated specifically as "disable drops"? Or should there be another mechanism to disable drops? Note that if you decide that 0.0 means "no drops at all" as a special value, raising it to e.g. 0.000001 will suddenly make a huge difference, since then the extra chance is added. So I'm not convinced that is a good idea. That leaves enabling/disabling per mob as the best alternative, but that is much harder to implement. (Maybe this is why this bug has not been fixed).

In the meantime, a workaround is to set the value not to 0.0, but to a sufficiently low value, so it stays below 0 even with the extra chance added. I tested it with -10 and it is probably of greater magnitude than what's strictly needed, but it worked.

commented

Or, maybe this bug should be interpreted as "please document how to use the config file to properly disable all mob head drops for certain mobs".