pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
227 stars 53 forks source link

Negative values are possible for 'Fun Guy' award #153

Closed DaMarine closed 2 years ago

DaMarine commented 2 years ago

Observe the "Fun Guy" statistic for this player: https://stats.slabserver.org/#player:e0a57633-2e22-4a35-8f23-5f922d8583ef and see that their score goes into the negatives. They therefore don't appear on the award page for 'Fun Guy'

This appears to be a similar issue to https://github.com/pdinklag/MinecraftStats/issues/126 and https://github.com/pdinklag/MinecraftStats/issues/17.

pdinklag commented 2 years ago

I can imagine this happens if mushrooms are collected from sources other than picking them up from forest floors or caves, e.g., via mushroom blocks or mooshrooms.

As far as I know, Minecraft doesn't count those, so maybe I can try to change this to picking up mushroom items rather than "mining" (small) mushroom blocks.

DaMarine commented 2 years ago

Our player reckons most of their mushrooms were collected this way, but that it dropped from -4 to -132 when they placed down 2 stacks of brown mushroom. Should this really be using StatDiffReader if it's trying to calculate total mushrooms mined? Sounds like something you'd want to be calculating as a cumulative thing, and would be more consistent with other similar awards imo.

pdinklag commented 2 years ago

Sounds like something you'd want to be calculating as a cumulative thing, and would be more consistent with other similar awards imo.

Yes. What I mean is that there are picked up stats too that count when items are picked up rather than blocks mined. That would be better, because mushrooms can be collected without breaking small mushroom blocks.

I agree that the StatDiffReader thing is a leftover here and should be removed.