Closed SizableShrimp closed 3 years ago
There has been a related PR (#761: expanding the channel system to be more generic). I wonder SizableShrimp's stance on that PR. That is, is there any chance that two PRs can incorporate each other?
Ater has plans to close that PR once this one is merged I believe.
Anyways, just a update on this, due to some design decisions of parchment, this is still not in a state that can be pulled. We'll add support eventually but it still needs some work.
Alright, so this looks fine as a generic channel extension API. The main thing is I do not want to play favorites with data sources. Combined with not being a fan of Parchment's rolling archive scheme. They should be able to add a addon for this in one simple class. Hell it could be done via a include ('URL') style build script.
How do I add a custom channel? I tried
channelProviders.addProvider(new ChannelProvider() {
Set<String> getChannels() {
println "channels"
return ImmutableSet.of('yarn')
}
File getMappingsFile(MCPRepo mcpRepo, Project project, String channel, String version) {
String desc = "net.fabricmc:yarn:" + version + ":v2@zip";
println 'get' + desc
return MavenArtifactDownloader.manual(project, desc, false);
}
})
but it didn't work. It seems that channelProviders
get reset after I changed it. error says:
Error getting artifact: net.minecraft:mappings_yarn:1.0.1:null@zip from MCPRepo
java.lang.IllegalArgumentException: Unknown mapping provider: yarn_1, currently loaded: [stable_nodoc, snapshot_nodoc, stable, official, snapshot]
Please do not post in random issues for help questions, we have a forum, and a discord server where you can ask questions.
Parchment data is provided from the ParchmentMC team. This PR adds support to use Parchment mappings inside of ForgeGradle for modding development. Draft because it could probably be reworked to be better and simpler, but from testing it seems to work well in its current state.