bedrock-oss / regolith-filters Goto Github PK
View Code? Open in Web Editor NEWThe standard library for Regolith filters.
Home Page: https://bedrock-oss.github.io/regolith/
License: MIT License
The standard library for Regolith filters.
Home Page: https://bedrock-oss.github.io/regolith/
License: MIT License
Also should bump format version of Reticulator.
When identifier
field is missing in entity, the filter crashes with error:
[ERROR] [Filter] Traceback (most recent call last):
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 90, in <module>
[ERROR] [Filter] main()
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 69, in main
[ERROR] [Filter] translations.extend(gather_translations(behavior_pack.entities, settings.get("entities", {}), "minecraft:entity/description/name", "entity.identifier.name", False))
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 31, in gather_translations
[ERROR] [Filter] identifier = asset.identifier
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\reticulator.py", line 1108, in identifier
[ERROR] [Filter] return self.get_value_at("minecraft:entity/description/identifier")
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\reticulator.py", line 326, in get_value_at
[ERROR] [Filter] return dpath.util.get(self.data, json_path)
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\venvs\0\lib\site-packages\dpath\util.py", line 178, in get
[ERROR] [Filter] raise KeyError(glob)
[ERROR] [Filter] KeyError: 'minecraft:entity/description/identifier'
[ERROR] name_ninja failed
When identifier
field has no namespace e.g. minecraft_pig
, it also crashes with a different error:
[ERROR] [Filter] Traceback (most recent call last):
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 38, in gather_translations
[ERROR] [Filter] name = asset.get_value_at(name_jsonpath)
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\reticulator.py", line 326, in get_value_at
[ERROR] [Filter] return dpath.util.get(self.data, json_path)
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\venvs\0\lib\site-packages\dpath\util.py", line 178, in get
[ERROR] [Filter] raise KeyError(glob)
[ERROR] [Filter] KeyError: 'minecraft:entity/description/name'
[ERROR] [Filter]
[ERROR] [Filter] During handling of the above exception, another exception occurred:
[ERROR] [Filter]
[ERROR] [Filter] Traceback (most recent call last):
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 90, in <module>
[ERROR] [Filter] main()
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 69, in main
[ERROR] [Filter] translations.extend(gather_translations(behavior_pack.entities, settings.get("entities", {}), "minecraft:entity/description/name", "entity.identifier.name", False))
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 41, in gather_translations
[ERROR] [Filter] name = prefix + format_name(identifier) + postfix
[ERROR] [Filter] File "D:\Dokumenty\GitHub\bedrock\<omitted>\.regolith\cache\filters\github.com\Bedrock-OSS\regolith-filters\name_ninja\name_ninja.py", line 17, in format_name
[ERROR] [Filter] return name.split(":")[1].replace("_", " ").title()
[ERROR] [Filter] IndexError: list index out of range
[ERROR] name_ninja failed
I'd like to see an error type message along the lines of
[ERROR] [Filter] File x.json has invalid identifier! The namespace is missing.
[ERROR] [Filter] File y.json has missing identifier!
Please have it create the lang file if it does not exist or add to the read.me that it needs to exist (along with needed python installed)
regolith install
causes Regolith to get stuck in infinite loop probably due to a bad npm module setup.
Explain in light-terms what regolith is, and how the standard-library works, in relationship to regolith. Include links back to regolith.
Then, provide the json for each filter, with a small explanation, and then a link to each filters readme.md
.
Right now, it doesn't do anything: https://github.com/Bedrock-OSS/regolith-filters/blob/master/flat_features.json/flat_features.py
We need to do a better job preserving the language files on edit.
Needs clarification. Atm it's not clear whether every subpack folder should get their own texture_list.json
file, or whether the main texture_list.json
file should simply include subpack
textures inside.
Should use settings to pick packaging details.
settings:
Write new filter to convert xcf
files into PNG. xcf
is a file format used by Gimp.
This should not have any bad effects, right? In theory 1.0.1002
is a valid manifest version.
This would be useful to always force a new download of the packs, when testing online.
I encountered an error, that was caused by json_cleaner using system encoding for opening files (cp1252) and files being encoded in UTF-8.
[INFO] Running filter json_cleaner
[ERROR] [json_cleaner] Traceback (most recent call last):
[ERROR] [json_cleaner] File "<project>\.regolith\cache\filters\json_cleaner\json_cleaner.py", line 32, in <mod
ule>
[ERROR] [json_cleaner] main()
[ERROR] [json_cleaner] File "<project>\.regolith\cache\filters\json_cleaner\json_cleaner.py", line 27, in main
[ERROR] [json_cleaner] json_data = get_json_from_file(fh.read())
[ERROR] [json_cleaner] File "C:\Python310\lib\encodings\cp1252.py", line 23, i
n decode
[ERROR] [json_cleaner] return codecs.charmap_decode(input,self.errors,decodi
ng_table)[0]
[ERROR] [json_cleaner] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8
1 in position 567: character maps to <undefined>
[ERROR] Failed to run profile "dev"
[+]: Failed to run filter.
[+]: Failed to run the 1st subfilter of "json_cleaner" filter.
[+]: Failed to run Python script.
[+]: exit status 1
I think it should use utf-8 by default (maybe add an option to change that?). Also it should report which file caused the error.
Should handle json comments (please use fast solution)
Should handle language file comments/blank lines. Keep the inline comments however.
Should handle blank lines and comments in MCFunctions.
It would be awesome if we could create some kind of pipeline that allows us to bundle those markdown pages into the docs-page for Regolith.
I had a couple of problems trying to use the gametests filter.
I found that the outfile has to be specified in my settings as "out": "scripts/main.js" instead of the readme that specifies a default of "outfile": "scripts/main.js", as otherwise it will save to the file BP/undefined instead of BP/scripts/main.js due to the line settings.buildOptions.outfile = "../../BP/" + settings.out;
reproducible by just not specifying any settings in the profiles.dev.filters, or specifying an outfile
the readme says in the changelog "customizing buildOptions will now overwrite each individual property, rather than overwriting buildOptions as a whole", however this isn't true as the const settings = ... line will replace any options in the defSettings, so the following line that should be merging them does nothing as they are the same, so you do have to specify all the buildOptions
reproducible by just specifying in the settings "buildOptions": {}; this throws an error when trying to push to buildOptions.external as it doesn't exist
not sure if I explained those well or if this is the correct channel for this, I tried to work out why they happened as best I could, I can give some example configs and errors if you want
Will fill in details later
When the user has the regolith config use_project_app_data_storage true
setting enabled. The gametest filter won't be able to build the files. This is most likely because it uses a relative path to access regolith's config.json
file.
This is most likely the source of the problem:
regolith-filters/gametests/setup.js
Line 8 in 6ea215b
It should use the ROOT_DIR
environment variable to get the path instead:
https://bedrock-oss.github.io/regolith/guide/custom-filters.html#filter-environment-variables
Large entities (60kb) take around 0.3 seconds each. This is too long.
Like psd and kra convert
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.