Skip to content

Commit

Permalink
change 'build' parameter from int to string
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceWalkerRS committed Apr 5, 2024
1 parent 2ca2722 commit 15224ec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/ornithemc/ploceus/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ public static String calamusGen2Url(int generation) {

public static final String FEATHER_MAVEN_GROUP = "net.ornithemc";
public static final String FEATHER_GEN1_MAPPINGS = FEATHER_MAVEN_GROUP + ":feather:%s%s+build.%s";
public static String featherGen1Mappings(String mc, GameSide side, int build) {
public static String featherGen1Mappings(String mc, GameSide side, String build) {
return String.format(FEATHER_GEN1_MAPPINGS, mc, side.suffix(), build);
}
public static final String FEATHER_GEN2_MAPPINGS = FEATHER_MAVEN_GROUP + ":feather-gen%s:%s+build.%s";
public static String featherGen2Mappings(int generation, String mc, int build) {
public static String featherGen2Mappings(int generation, String mc, String build) {
return String.format(FEATHER_GEN2_MAPPINGS, generation, mc, build);
}

public static final String NESTS_MAVEN_GROUP = "net.ornithemc";
public static final String NESTS = NESTS_MAVEN_GROUP + ":nests:%s%s+build.%s";
public static String nests(String mc, GameSide side, int build) {
public static String nests(String mc, GameSide side, String build) {
return String.format(NESTS, mc, side.suffix(), build);
}

public static final String SPARROW_MAVEN_GROUP = "net.ornithemc";
public static final String SPARROW = SPARROW_MAVEN_GROUP + ":sparrow:%s%s+build.%s";
public static String sparrow(String mc, GameSide side, int build) {
public static String sparrow(String mc, GameSide side, String build) {
return String.format(SPARROW, mc, side.suffix(), build);
}

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/net/ornithemc/ploceus/PloceusGradleExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public SigsProvider getSigsProvider() {
}

@Override
public Dependency featherMappings(int build) {
public Dependency featherMappings(String build) {
return project.getDependencies().create(
getGeneration().get() == 1
? Constants.featherGen1Mappings(minecraftVersion(), side.get(), build)
Expand Down Expand Up @@ -180,32 +180,32 @@ public McpForgeMappingsSpec mcpForgeMappings(String mc, String version) {
}

@Override
public Dependency nests(int build) {
public Dependency nests(String build) {
return nests(build, getGeneration().get() == 1 ? side.get() : GameSide.MERGED);
}

@Override
public Dependency nests(int build, String side) {
public Dependency nests(String build, String side) {
return nests(build, GameSide.of(side));
}

@Override
public Dependency nests(int build, GameSide side) {
public Dependency nests(String build, GameSide side) {
return project.getDependencies().create(Constants.nests(minecraftVersion(), side, build));
}

@Override
public Dependency sparrow(int build) {
public Dependency sparrow(String build) {
return sparrow(build, getGeneration().get() == 1 ? side.get() : GameSide.MERGED);
}

@Override
public Dependency sparrow(int build, String side) {
public Dependency sparrow(String build, String side) {
return sparrow(build, GameSide.of(side));
}

@Override
public Dependency sparrow(int build, GameSide side) {
public Dependency sparrow(String build, GameSide side) {
return project.getDependencies().create(Constants.sparrow(minecraftVersion(), side, build));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public interface PloceusGradleExtensionApi {

Dependency featherMappings(int build);
Dependency featherMappings(String build);

McpModernMappingsSpec mcpMappings(String channel, String build);

Expand All @@ -17,17 +17,17 @@ public interface PloceusGradleExtensionApi {

McpForgeMappingsSpec mcpForgeMappings(String mc, String version);

Dependency nests(int build);
Dependency nests(String build);

Dependency nests(int build, String side);
Dependency nests(String build, String side);

Dependency nests(int build, GameSide side);
Dependency nests(String build, GameSide side);

Dependency sparrow(int build);
Dependency sparrow(String build);

Dependency sparrow(int build, String side);
Dependency sparrow(String build, String side);

Dependency sparrow(int build, GameSide side);
Dependency sparrow(String build, GameSide side);

void dependOsl(String version) throws Exception;

Expand Down

0 comments on commit 15224ec

Please sign in to comment.