codetaylor / dropt-1.12

Flexible block drop strategies.
https://minecraft.curseforge.com/projects/dropt
Other
6 stars 2 forks source link

Meta is ignored in matching #10

Closed ghost closed 6 years ago

ghost commented 6 years ago

Minecraft Version: 1.12.2 Forge Version: 2611 Mod Version: 1.6.5

The following rule causes all instances of "minecraft:stone" to drop "minecraft:stone:1":

{
    "match": {
        "blocks": {
            "blocks": ["minecraft:stone:2"]
        }
    },
    "replaceStrategy": REPLACE_ALL_IF_SELECTED,
    "drops": [
        {
            "selector": {
                "silktouch": EXCLUDED
            },
            "item": {
                "items": ["minecraft:stone:1"]
            }
        }
    ]
}
codetaylor commented 6 years ago

It works fine for me.

I broke many stone blocks and got the expected results. I recorded the debug output of breaking minecraft:stone:3 and minecraft:stone:2.

Here is the script I used to test: issue10.json Here is the debug log output: log output

Are you testing this with only the Dropt mod installed or are there other mods installed?

Can you enable the debug output and post a link to your debug output? Please use gist or pastebin and link to that.

codetaylor commented 6 years ago

Ok, I think I reproduced what you might be experiencing.

I noticed this in the log: https://gist.github.com/codetaylor/c4a580648ec37b9c972f43b0eb87bbe7#file-gistfile1-txt-L18

It should only be matching against meta 2, but it's also matching against meta 0.

I tested the same JSON and when mining minecraft:stone:0, the result was minecraft:stone:1.

I'm pretty sure I've found the problem and I'm fixing and testing it now.

codetaylor commented 6 years ago

Fixed in 1.12.2-1.6.6.

Thanks for reporting this!