[1.10.2] Bad Looting drop calculation.
AfterRebelion opened this issue ยท 7 comments
Woot Version: 1.2.1
Forge Version: 12.18.3.2185
Only Woot Installed.
After testing with a Woot Blaze spawner, I come to the conclusion that Woot doesn't get looting enchantments loot very well.
As you can see, Woot gets a little over 90% drop rate, and then I tested with a vanilla diamond sword with a Looting 3 enchantment:
This was with 2 round of 10 blaze each.
This makes it into 200% drop rate, instead of the 90% drop rate that Woot is getting.
That is a bit strange, as when Woot is learning drops, it kills with a diamond sword and a looting I/II/III enchant.
I'll have to investigate this and see if I can identify the issue.
I had a bit of a dig and you will never see >100% drops from Woot's information.
The number you see in that debug message is the chance of a "blaze rod drop".
The detail version of the command shows you the range of stack sizes and their weight for that "blaze rod drop".
Each time that the blaze rod chance is hit, then there is a second check for which stack size. Woot learns not only the drops, but how many of each item was dropped.
eg.
/woot loot Woot:none:Blaze detail
Woot:none:Blaze/Looting III: 210 [ 194 x Blaze Rod @ 92.38% (s1:w52)(s3:w70)(s2:w65)(s4:w7)
So you have a 92.39% change of getting a Blaze Rod drop with Looting III, in the sampling that I did. That drop can then be a stack size of 1,2,3 or 4, where the weighting will decide on which one is chosen.
If you get you 92 drops from 100 kills and each of those drops are lucky enough to get a stack size of 4, then you get 368 blaze rods from 100 blaze.
Can you dump the fulll /woot loot Woot:none:Blaze detail so i can see the weights and I'll load up the configuration in my dev area.
Nevermind, I can see the same with some testing.
It looks like the stack size check is not working correctly.
I'll investigate and get back to you.
I can give you de loot.json config:
https://gist.github.com/AfterRebelion/28c65313c5b994d1362075dc96d7ddfe
Found the problem. It is not to do with the learning, it is when the items are being placed in the inventory.
Instead of placing all the drops into the inventory it is only placing a stack of size one for each entry.
So in my debug, I had 8 stacks of blaze rods of varying sizes.
However for each of those stacks it put one blaze rod in the chest and therefore I got 8 blaze rods.
So I need to fix the inventory code.
I've got a test fix in and it seems to solve the problem.
It will be part of the next release (1.10.2-1.2.3) which will be out, hopefully in the next few days.