aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-10-14 17:53:21 +0800
committershedaniel <daniel@shedaniel.me>2021-10-14 18:31:38 +0800
commit81f07b79c7560c4b0aba0d6dd3c1cac781fad68a (patch)
tree01a163dea539410c45a6dc53bf346d5832330e63 /forge
parent423f31a81e7c0933c8e5571efb748b8a11f1774b (diff)
downloadRoughlyEnoughItems-81f07b79c7560c4b0aba0d6dd3c1cac781fad68a.tar.gz
RoughlyEnoughItems-81f07b79c7560c4b0aba0d6dd3c1cac781fad68a.tar.bz2
RoughlyEnoughItems-81f07b79c7560c4b0aba0d6dd3c1cac781fad68a.zip
Remove LBA compatibility, Add Fabric API compatibility
Update buildscripts and README Update buildscripts and README
Diffstat (limited to 'forge')
-rw-r--r--forge/build.gradle48
-rw-r--r--forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java8
2 files changed, 29 insertions, 27 deletions
diff --git a/forge/build.gradle b/forge/build.gradle
index 0cd53cc9b..94be9b025 100644
--- a/forge/build.gradle
+++ b/forge/build.gradle
@@ -2,15 +2,19 @@ plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
}
-configurations {
- shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
-}
-
architectury {
platformSetupLoomIde()
forge()
}
+configurations {
+ common
+ shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
+ compileClasspath.extendsFrom common
+ runtimeClasspath.extendsFrom common
+ developmentForge.extendsFrom common
+}
+
processResources {
filesMatching("META-INF/mods.toml") {
expand "version": project.version
@@ -37,8 +41,10 @@ loom {
}
}
- localMods {
- // it.add(project(":jei-internals-workaround").sourceSets.main)
+ forge {
+ localMods {
+ // it.add(project(":jei-internals-workaround").sourceSets.main)
+ }
}
}
@@ -49,17 +55,13 @@ dependencies {
modApi("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}")
modApi("dev.architectury:architectury-forge:${architectury_version}")
- implementation(project(path: ":jei-compatibility-layer")) { transitive = false }
- // implementation(project(path: ":jei-internals-workaround")) { transitive = false }
- developmentForge(project(path: ":jei-compatibility-layer")) { transitive = false }
- // developmentForge(project(path: ":jei-internals-workaround")) { transitive = false }
-
- shadowCommon(project(path: ":jei-compatibility-layer")) { transitive = false }
+ common(project(path: ":jei-compatibility-layer", configuration: "dev")) { transitive false }
+ shadowCommon(project(path: ":jei-compatibility-layer", configuration: "dev")) { transitive false }
+ // common(project(path: ":jei-internals-workaround")) { transitive = false }
depProjects.forEach {
- implementation(project(path: it)) { transitive = false }
- developmentForge(project(path: it)) { transitive = false }
- shadowCommon(project(path: it, configuration: "transformProductionForge")) { transitive = false }
+ common(project(path: it, configuration: "dev")) { transitive false }
+ shadowCommon(project(path: it, configuration: "transformProductionForge")) { transitive false }
}
// modRuntime("curse.maven:chiselsbits-231095:3176033")
@@ -90,7 +92,7 @@ shadowJar {
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
- classifier "forge"
+ classifier null
}
jar {
@@ -111,17 +113,17 @@ sourcesJar {
}
}
+components.java {
+ withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
+ skip()
+ }
+}
+
publishing {
publications {
mavenFabric(MavenPublication) {
artifactId = rootProject.name + "-" + project.name
- artifact(remapJar) { classifier null }
- afterEvaluate {
- artifact(remapSourcesJar.output) {
- builtBy remapSourcesJar
- classifier "sources"
- }
- }
+ from components.java
}
["api", "default-plugin"].forEach { projectName ->
create(projectName + "Fabric", MavenPublication.class) { publication ->
diff --git a/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java b/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java
index 9ad85f452..7c47d1c84 100644
--- a/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java
+++ b/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java
@@ -42,9 +42,9 @@ public class DefaultClientPluginImpl {
Set<Potion> potions = Sets.newLinkedHashSet();
for (Ingredient container : PotionBrewing.ALLOWED_CONTAINERS) {
for (PotionBrewing.Mix<Potion> mix : PotionBrewing.POTION_MIXES) {
- IRegistryDelegate<Potion> from = mix.f_43532_;
+ IRegistryDelegate<Potion> from = mix.from;
Ingredient ingredient = mix.ingredient;
- IRegistryDelegate<Potion> to = mix.f_43534_;
+ IRegistryDelegate<Potion> to = mix.to;
Ingredient base = Ingredient.of(Arrays.stream(container.getItems())
.map(ItemStack::copy)
.map(stack -> PotionUtils.setPotion(stack, from.get())));
@@ -59,9 +59,9 @@ public class DefaultClientPluginImpl {
}
for (Potion potion : potions) {
for (PotionBrewing.Mix<Item> mix : PotionBrewing.CONTAINER_MIXES) {
- IRegistryDelegate<Item> from = mix.f_43532_;
+ IRegistryDelegate<Item> from = mix.from;
Ingredient ingredient = mix.ingredient;
- IRegistryDelegate<Item> to = mix.f_43534_;
+ IRegistryDelegate<Item> to = mix.to;
Ingredient base = Ingredient.of(PotionUtils.setPotion(new ItemStack(from.get()), potion));
ItemStack output = PotionUtils.setPotion(new ItemStack(to.get()), potion);
clientPlugin.registerBrewingRecipe(base, ingredient, output);