Slimefun

Slimefun

3M Downloads

Talismen of the Miner and Talismen of the Hunter sending the "doubled drops" message too often.

ProfDWard opened this issue ยท 2 comments

commented

Description (Required)

If you are holding a Talismen of the Miner in your inventory, mining an ore block will gives the message "Your Talismen has just doubled your drops" message nearly every time. After some in-game testing, the message seems to appear approximately 90% of time time when mining an ore, which is much larger than the 20% occurrence rate the Talismen says should happen in the item's description.
The Talismen of the Hunter has a similar issue, with the same 90% occurrence rate of the "doubled drops" message when killing a mob.
Note that this issue also occurs for the Ender versions of these Talismens as well.

Steps to reproduce the Issue (Required)

Demonstration Video for Talismen of the Miner: Screenshot from Gyazo
Steps for the Talismen of the Miner:

  1. Obtain a pickaxe and Talismen of the Miner
  2. Find an ore and mine it
    Steps for Talismen of the Hunter:
  3. Obtain a Talismen of the Hunter
  4. Kill a mob
    The only items used in the demonstration video are a diamond pickaxe enchanted with Efficiency 4, Unbreaking 3, Fortune 3, and Mending, and a Talismen of the Miner. Of the 9 coal ore blocks that were broken in the video, 8 of them gave the "doubled drops" message.
    It's unreasonable to believe that this occurring is statistically plausible, since even with the small sample size shown in the video we can determine that the odds of this happening are less than 0.002%.
    image

Expected behavior (Required)

The "doubled drops" message should appear roughly 20% of the time and only when the drops have actually been doubled.

Server Log / Error Report

N/A

Environment (Required)

Versions are available in the below screenshot as well as being written below:
image

  • Minecraft Version: 1.14.4
  • Slimefun Version: vDEV - 328
  • CS-CoreLib Version: vDEV - 77
commented

The bug appears to have been introduced in 87ff5fd
It looks like a simple missing negation flipped the chance from 20% to 80%.
That's an easy fix on its own, but does the miner talisman even double the drops? It didn't in my testing, and it looks like it should've stopped working in 9760fc7 I have a little trouble believing it's been totally broken for 2 years, though, so I'm a bit confused. I might be missing something here

commented

Ah yeah, I don't think @TheBusyBiscuit looked much into the code. Nor did I just then, it is checking if it's not 20% chance not if it is. Bit dumb the way it was done originally but hey ho.