mclangres module¶
Uses .minecraft/assets/indexes/[version].json. The version is the highest found by default.
-
mclangres.
buildResources
(version=None, lang=None)[source]¶ Loads the resource files and builds the resource dictionnaries. Four dictionnaries are built. Two for the refering language (English), and two for the language to be used. They are ‘reversed’ dictionnaries; the {foo: bar} pairs of one are the {bar: foo} of the other one.
-
mclangres.
search
(text, untranslate=False, capitalize=True, filters=[])[source]¶ Search for a text string in the resources entries. filters is a list of strings: they must be parts before the ‘=’ sign in the resource files, or parts of. filters may be regexes. Returns a sorted list of matching elements.