Closed Insane96 closed 5 years ago
Ok, thank you I will check into this.
Ahh I see what you did now, it uses regex, not wildcards
So what you typed was minecraft:golden_axe:*
this means it will match minecraft:golden_axe
or minecraft:golden_axe:
or minecraft:golden_axe::
etc.
*
in regex means match the previous character or set 0 or more times.
So you are matching :
0 or more times.
If you look at the tinkers example it is tconstruct:lumberaxe:.*
, the .
is a special character for regex that means any character. So this will match tconstruct:lumberaxe:
and then anything else after it also.
To conclude, use minecraft:wooden_axe:.*
and minecraft:golden_axe:.*
Awesome, thanks
Tried adding
minecraft:wooden_axe
orminecraft:golden_axe
but trees still get chopped down with those tools. Even tried withminecraft:wooden_axe:*
andminecraft:golden_axe:*
I might be thinking that the problem is here: https://github.com/Shovinus/ChopDownUpdated/blob/master/src/main/java/com/shovinus/chopdownupdated/tree/Tree.java#L341 And here: https://github.com/Shovinus/ChopDownUpdated/blob/master/src/main/java/com/shovinus/chopdownupdated/config/Config.java#L145
I'm thinking that the
Tree.stackName(ItemStack)
method returns even the metadata of the item so e.g. with a newly crafted golden axe you getminecraft:golden_axe:0
and instead in the config you check forminecraft:golden_axe(:*)
so it doesn't match. Infact, settingminecraft:golden_axe:0
in the config works if the golden axe is and not damaged.