Skip to content

Commit

Permalink
Add native EMI support for Forge
Browse files Browse the repository at this point in the history
- moved EMI plugin classes to XPlat
- bumped compile-only EMI dependencies to version 1.0.12 (that's when "experimental" annotations were removed from some stable APIs)
- bumped local test run EMI versions to 1.1.4 (latest release; only enabled for Fabric by default, JEI stays default for Forge)
  • Loading branch information
TheRealWormbo committed Apr 2, 2024
1 parent f64f16c commit b5426b2
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 17 deletions.
4 changes: 3 additions & 1 deletion Fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ repositories {
url = "https://maven.blamejared.com/" // for JEI and Patchouli
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/" // for trinkets and emi
}
maven {
Expand Down Expand Up @@ -111,7 +112,8 @@ dependencies {

modCompileOnly "me.shedaniel:RoughlyEnoughItems-fabric:12.0.625"

modImplementation("dev.emi:emi-fabric:1.0.4+1.20.1") { transitive = false }
modCompileOnly "dev.emi:emi-fabric:1.0.12+${minecraft_version}:api"
modLocalRuntime "dev.emi:emi-fabric:1.1.4+${minecraft_version}"

modImplementation "me.zeroeightsix:fiber:0.23.0-2"
include "me.zeroeightsix:fiber:0.23.0-2"
Expand Down
2 changes: 1 addition & 1 deletion Fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"vazkii.botania.fabric.internal_caps.CCAInternalEntityComponents"
],
"emi": [
"vazkii.botania.fabric.integration.emi.BotaniaEmiPlugin"
"vazkii.botania.client.integration.emi.BotaniaEmiPlugin"
],
"rei_client": [
"vazkii.botania.fabric.integration.rei.BotaniaREIPlugin"
Expand Down
7 changes: 7 additions & 0 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ repositories {
name = "C4"
url = "https://maven.theillusivec4.top/"
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/" // for emi
}
maven {
name = "Unascribed"
url "https://repo.unascribed.com" // for ears
Expand Down Expand Up @@ -103,6 +107,9 @@ dependencies {
compileOnly fg.deobf("mezz.jei:jei-1.20.1-common-api:15.2.0.27")
runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-forge:15.2.0.27")

compileOnly fg.deobf("dev.emi:emi-forge:1.0.12+${minecraft_version}:api")
//runtimeOnly fg.deobf("dev.emi:emi-forge:1.1.4+${minecraft_version}")

compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:5.4.2+1.20.1:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:5.4.2+1.20.1")

Expand Down
5 changes: 5 additions & 0 deletions Xplat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ repositories {
name = "Jared" // Patchouli and JEI
url = "https://maven.blamejared.com/"
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/" // for emi
}
maven {
name = "Unascribed"
url "https://repo.unascribed.com" // for ears
Expand All @@ -40,6 +44,7 @@ dependencies {
compileOnly "com.unascribed:ears-api:1.4.5"

compileOnly "mezz.jei:jei-1.20.1-common-api:15.2.0.27"
compileOnly "dev.emi:emi-xplat-mojmap:1.0.12+${minecraft_version}:api"

// annotationProcessor 'com.blamejared.crafttweaker:Crafttweaker_Annotation_Processors-1.18.2:2.0.0.123'
// annotationProcessor 'com.blamejared.crafttweaker:CraftTweaker-common-1.18.2:9.1.123'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.recipe.EmiPatternCraftingRecipe;
import dev.emi.emi.api.stack.EmiIngredient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import com.mojang.blaze3d.systems.RenderSystem;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.EmiApi;
import dev.emi.emi.api.EmiEntrypoint;
import dev.emi.emi.api.EmiPlugin;
import dev.emi.emi.api.EmiRegistry;
import dev.emi.emi.api.recipe.EmiCraftingRecipe;
Expand Down Expand Up @@ -43,6 +44,7 @@

import static vazkii.botania.common.lib.ResourceLocationHelper.prefix;

@EmiEntrypoint
public class BotaniaEmiPlugin implements EmiPlugin {
private static final Comparator<EmiRecipe> BY_ID = Comparator.comparing(EmiRecipe::getId);
private static final Comparator<EmiRecipe> BY_GROUP =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.recipe.EmiRecipe;
import dev.emi.emi.api.recipe.EmiRecipeCategory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.recipe.EmiPatternCraftingRecipe;
import dev.emi.emi.api.stack.EmiIngredient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.widget.Bounds;
import dev.emi.emi.api.widget.Widget;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.stack.EmiIngredient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.recipe.EmiRecipeCategory;
import dev.emi.emi.api.stack.EmiIngredient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.recipe.EmiRecipe;
import dev.emi.emi.api.stack.EmiIngredient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.recipe.EmiRecipe;
import dev.emi.emi.api.stack.EmiIngredient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package vazkii.botania.fabric.integration.emi;
package vazkii.botania.client.integration.emi;

import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStack;
Expand Down

0 comments on commit b5426b2

Please sign in to comment.