pdinklag / MinecraftStats

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

Question about dyes #66

Closed lukeeexd closed 5 years ago

lukeeexd commented 5 years ago

Would this track light_blue_dye too? Since its "minecraft:*_dye" but light blue has 2 underscores

Also difference between +_dye and *_dye?

And finally. Below code will it track furnace made dyes? if not any idea how to add that?



mcstats.registry.append(
    mcstats.MinecraftStat(
        'craft_dye',
        {
            'title': 'Chemist',
            'desc': 'Dyes crafted',
            'unit': 'int',
        },
        mcstats.StatSumMatchReader(
            ['minecraft:crafted'],
            ['minecraft:.*_dye'])
    ))```
pdinklag commented 5 years ago

It matches regular expressions, the number of underscores doesn't matter. In this case, either + (at least one character) or * (any number of characters) would do the same. Anyway, read up on regular expressions concerning that.

Below code will it track furnace made dyes?

I don't know, you'll have to try. And if it works - does it also work if the furnace is attached to a hopper? Because that's the reason I didn't add these stats, afaik they're not considered, and many smelt with hoppers only.

lukeeexd commented 5 years ago

Ya doesnt track dyes made by smelting in furnace or if taken out by a hopper

pdinklag commented 5 years ago

OK, then it shouldn't be a statistic in my opinion until Mojang changes this.