Closed AidanSkerry closed 5 years ago
Hm. May be that I understand Python's matching the wrong way?
It does try to match minecraft:redstone
, which is a prefix of minecraft:redstone_ore
. This may be the issue here. Possibly something like minecraft:redstone$
is needed.
Not entirely sure, not well versed with python myself, but that does seem the most likely cause.
Aye, confirmed by this little test:
import re
def find_match(p, subjects):
print('"{}" matches ...'.format(p))
pc = re.compile(p)
for s in subjects:
if pc.match(s):
print('\t' + s)
subjects = ['redstone', 'redstone_ore']
find_match('redstone', subjects)
find_match('redstone$', subjects)
Result:
"redstone" matches ...
redstone
redstone_ore
"redstone$" matches ...
redstone
Will fix - probably by auto-inserting $
at the end of each pattern and even ^
at the beginning, because that's really what's intended. Might even sort out more issues like this that haven't been found yet.
Cheers mate, good stuff.
Unsure why, but this causes the award stat to go negative very quickly. Easy to replicate by modifying save data.