feat: adding beet.contrib.snapshot - #502
Conversation
|
Hello? |
|
@Stoupy51 Please don't spam comments on PR's |
Sorry, that wasn't my intention |
rx-dev
left a comment
There was a problem hiding this comment.
couple of thoughts but i think it would be chill
| resolved = search_version(version) | ||
| try: | ||
| version = split_version(resolved) | ||
| except ValueError: |
There was a problem hiding this comment.
is the best way to determine whether we can use a specific version to chk for a ValueError, this feels wrong to me. esp since LATEST_MINECRAFT_VERSION is also the default here?
There was a problem hiding this comment.
i see, this was sorta how it was previously done...
There was a problem hiding this comment.
I don't really know how to do better, because if someone wants to develop in old snapshot schema, the split_version function raise a ValueError
Should i delete this try catch block or keep it that way ?
| ResourcePack.pack_format_registry.add_format(pack_format) | ||
|
|
||
| path = cache.download(opts.url_command_tree.format(version=ctx.minecraft_version)) | ||
| ctx.meta.setdefault("mecha", {}).setdefault("commands", []).insert(0, path) |
There was a problem hiding this comment.
hmm, i wonder if the best way for the contrib to enact the new tree is by setting it via the config. shouldn't it like just require a plugin or something? this feels odd to me.
There was a problem hiding this comment.
I was doing it that way, because if someone adds a custom command tree, i don't want to interfer with it and all instances of the Mecha class can use it by default.
I based this implementation on this example by Fizzy on discord : https://discord.com/channels/900530660677156924/1407893565601742909/1408164150336815184
Co-authored-by: rx <20506548+rx-dev@users.noreply.github.com>
Co-authored-by: rx <20506548+rx-dev@users.noreply.github.com>
|
@edayot I'm happy to re-review and get this merged once u can rebase on main i think |
Theses PR implement the plugin that adds at require time a new minecraft version, it uses misode/mcmeta repo as a default source but it can be customized.
This PR also comes with a fix for
1.21.xsyntax handling in mecha, and adds the ability to resolve a minecraft version by calling a function to resolve a specific minecraft_version if necessary.