parent
147af48879
commit
54d6ef7896
|
@ -117,7 +117,7 @@ public class LoomGradleExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dependency officialMojangMappings() {
|
public Dependency officialMojangMappings() {
|
||||||
return layered(LayeredMappingSpecBuilder::officalMojangMappings);
|
return layered(LayeredMappingSpecBuilder::officialMojangMappings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dependency layered(Action<LayeredMappingSpecBuilder> action) {
|
public Dependency layered(Action<LayeredMappingSpecBuilder> action) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ import net.fabricmc.loom.configuration.providers.mappings.parchment.ParchmentMap
|
||||||
public class LayeredMappingSpecBuilder {
|
public class LayeredMappingSpecBuilder {
|
||||||
private final List<MappingsSpec<?>> layers = new LinkedList<>();
|
private final List<MappingsSpec<?>> layers = new LinkedList<>();
|
||||||
|
|
||||||
public LayeredMappingSpecBuilder officalMojangMappings() {
|
public LayeredMappingSpecBuilder officialMojangMappings() {
|
||||||
layers.add(new MojangMappingsSpec());
|
layers.add(new MojangMappingsSpec());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class MigrateMappingsTask extends AbstractLoomTask {
|
||||||
throw new UnsupportedOperationException("Migrating Mojang mappings is currently only supported for the specified minecraft version");
|
throw new UnsupportedOperationException("Migrating Mojang mappings is currently only supported for the specified minecraft version");
|
||||||
}
|
}
|
||||||
|
|
||||||
LayeredMappingsDependency dep = (LayeredMappingsDependency) getExtension().layered(LayeredMappingSpecBuilder::officalMojangMappings);
|
LayeredMappingsDependency dep = (LayeredMappingsDependency) getExtension().layered(LayeredMappingSpecBuilder::officialMojangMappings);
|
||||||
files = dep.resolve();
|
files = dep.resolve();
|
||||||
} else {
|
} else {
|
||||||
Dependency dependency = project.getDependencies().create(mappings);
|
Dependency dependency = project.getDependencies().create(mappings);
|
||||||
|
|
|
@ -37,7 +37,7 @@ class LayeredMappingSpecBuilderTest extends Specification {
|
||||||
def "simple mojmap" () {
|
def "simple mojmap" () {
|
||||||
when:
|
when:
|
||||||
def spec = layered() {
|
def spec = layered() {
|
||||||
officalMojangMappings()
|
officialMojangMappings()
|
||||||
}
|
}
|
||||||
def layers = spec.layers()
|
def layers = spec.layers()
|
||||||
then:
|
then:
|
||||||
|
@ -50,7 +50,7 @@ class LayeredMappingSpecBuilderTest extends Specification {
|
||||||
def "simple mojmap with parchment" () {
|
def "simple mojmap with parchment" () {
|
||||||
when:
|
when:
|
||||||
def spec = layered() {
|
def spec = layered() {
|
||||||
officalMojangMappings()
|
officialMojangMappings()
|
||||||
parchment("I like cake")
|
parchment("I like cake")
|
||||||
}
|
}
|
||||||
def layers = spec.layers()
|
def layers = spec.layers()
|
||||||
|
@ -68,7 +68,7 @@ class LayeredMappingSpecBuilderTest extends Specification {
|
||||||
def "simple mojmap with parchment keep prefix" () {
|
def "simple mojmap with parchment keep prefix" () {
|
||||||
when:
|
when:
|
||||||
def spec = layered() {
|
def spec = layered() {
|
||||||
officalMojangMappings()
|
officialMojangMappings()
|
||||||
parchment("I like cake") {
|
parchment("I like cake") {
|
||||||
it.removePrefix = false
|
it.removePrefix = false
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ class LayeredMappingSpecBuilderTest extends Specification {
|
||||||
def "simple mojmap with parchment keep prefix alternate hash" () {
|
def "simple mojmap with parchment keep prefix alternate hash" () {
|
||||||
when:
|
when:
|
||||||
def spec = layered() {
|
def spec = layered() {
|
||||||
officalMojangMappings()
|
officialMojangMappings()
|
||||||
parchment("I really like cake") {
|
parchment("I really like cake") {
|
||||||
it.removePrefix = false
|
it.removePrefix = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue