diff --git a/build.gradle b/build.gradle index 563a64c..62df22a 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,7 @@ repositories { includeGroup("appeng") includeGroup("vazkii.botania") includeGroup("vazkii.patchouli") + includeGroup("mezz.jei") } } @@ -88,6 +89,21 @@ repositories { includeGroup("maven.modrinth") } } + + exclusiveContent { + forRepository { + maven { + name = "shedaniel" + url = uri("https://maven.shedaniel.me/") + } + } + + filter { + includeGroup("dev.architectury") + includeGroup("me.shedaniel") + includeGroup("me.shedaniel.cloth") + } + } } dependencies { @@ -97,6 +113,14 @@ dependencies { modImplementation("appeng:appliedenergistics2-fabric:${ae2_version}") modImplementation("vazkii.botania:Botania:${minecraft_version}-${botania_version}") + + modCompileOnly("mezz.jei:jei-${minecraft_version}-fabric:${jei_version}") { + transitive = false + } + + modCompileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}") { + exclude(group: "net.fabricmc.fabric-api") + } } sourceSets { diff --git a/gradle.properties b/gradle.properties index 82480e0..db2d3ad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,8 @@ minecraft_version=1.19.2 loader_version=0.14.11 ae2_version=12.9.1 botania_version=436-FABRIC-SNAPSHOT +jei_version=11.3.0.260 +rei_version=10.0.578 # Temp fix for Spotless / Remove Unused Imports: # https://github.com/diffplug/spotless/issues/834 diff --git a/src/main/java/appbot/integration/emi/ABEMIPlugin.java b/src/main/java/appbot/integration/emi/ABEMIPlugin.java new file mode 100644 index 0000000..2ece914 --- /dev/null +++ b/src/main/java/appbot/integration/emi/ABEMIPlugin.java @@ -0,0 +1,15 @@ +package appbot.integration.emi; + +import appbot.ABItems; +import dev.emi.emi.api.EmiPlugin; +import dev.emi.emi.api.EmiRegistry; +import dev.emi.emi.api.stack.EmiStack; +import vazkii.botania.fabric.integration.emi.BotaniaEmiPlugin; + +public class ABEMIPlugin implements EmiPlugin { + + @Override + public void register(EmiRegistry registry) { + registry.addWorkstation(BotaniaEmiPlugin.MANA_INFUSION, EmiStack.of(ABItems.FLUIX_MANA_POOL)); + } +} diff --git a/src/main/java/appbot/ae2/ABTooltipProvider.java b/src/main/java/appbot/integration/igtooltip/ABTooltipProvider.java similarity index 92% rename from src/main/java/appbot/ae2/ABTooltipProvider.java rename to src/main/java/appbot/integration/igtooltip/ABTooltipProvider.java index bb9dfc2..9d51aa4 100644 --- a/src/main/java/appbot/ae2/ABTooltipProvider.java +++ b/src/main/java/appbot/integration/igtooltip/ABTooltipProvider.java @@ -1,4 +1,4 @@ -package appbot.ae2; +package appbot.integration.igtooltip; import appbot.block.FluixPool; import appbot.block.FluixPoolBlockEntity; diff --git a/src/main/java/appbot/integration/jei/ABJEIPlugin.java b/src/main/java/appbot/integration/jei/ABJEIPlugin.java new file mode 100644 index 0000000..9bf4a40 --- /dev/null +++ b/src/main/java/appbot/integration/jei/ABJEIPlugin.java @@ -0,0 +1,27 @@ +package appbot.integration.jei; + +import org.jetbrains.annotations.NotNull; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; + +import appbot.ABItems; +import appbot.AppliedBotanics; +import mezz.jei.api.IModPlugin; +import mezz.jei.api.JeiPlugin; +import mezz.jei.api.registration.IRecipeCatalystRegistration; +import vazkii.botania.client.integration.jei.ManaPoolRecipeCategory; + +@JeiPlugin +public class ABJEIPlugin implements IModPlugin { + + @Override + public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) { + registration.addRecipeCatalyst(new ItemStack(ABItems.FLUIX_MANA_POOL), ManaPoolRecipeCategory.TYPE); + } + + @Override + public @NotNull ResourceLocation getPluginUid() { + return AppliedBotanics.id("main"); + } +} diff --git a/src/main/java/appbot/integration/rei/ABREIPlugin.java b/src/main/java/appbot/integration/rei/ABREIPlugin.java new file mode 100644 index 0000000..025cce3 --- /dev/null +++ b/src/main/java/appbot/integration/rei/ABREIPlugin.java @@ -0,0 +1,20 @@ +package appbot.integration.rei; + +import appbot.ABItems; +import me.shedaniel.rei.api.client.plugins.REIClientPlugin; +import me.shedaniel.rei.api.client.registry.category.CategoryRegistry; +import me.shedaniel.rei.api.common.util.EntryStacks; +import vazkii.botania.fabric.integration.rei.BotaniaREICategoryIdentifiers; + +public class ABREIPlugin implements REIClientPlugin { + + @Override + public void registerCategories(CategoryRegistry registry) { + registry.addWorkstations(BotaniaREICategoryIdentifiers.MANA_INFUSION, EntryStacks.of(ABItems.FLUIX_MANA_POOL)); + } + + @Override + public String getPluginProviderName() { + return "Applied Botanics"; + } +} diff --git a/src/main/resources/META-INF/services/appeng.api.integrations.igtooltip.TooltipProvider b/src/main/resources/META-INF/services/appeng.api.integrations.igtooltip.TooltipProvider index 1d71277..97a359b 100644 --- a/src/main/resources/META-INF/services/appeng.api.integrations.igtooltip.TooltipProvider +++ b/src/main/resources/META-INF/services/appeng.api.integrations.igtooltip.TooltipProvider @@ -1 +1 @@ -appbot.ae2.ABTooltipProvider +appbot.integration.igtooltip.ABTooltipProvider diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 185c990..5760bf9 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -11,7 +11,10 @@ "entrypoints": { "ae2": ["appbot.AppliedBotanics::initialize"], "ae2:client": ["appbot.client.AppliedBotanicsClient::initialize"], - "fabric-datagen": ["appbot.data.ABDataGenerator"] + "fabric-datagen": ["appbot.data.ABDataGenerator"], + "rei_client": ["appbot.integration.rei.ABREIPlugin"], + "jei_mod_plugin": ["appbot.integration.jei.ABJEIPlugin"], + "emi": ["appbot.integration.emi.ABEMIPlugin"] }, "name": "Applied Botanics", "description": "mana through ae2, what could go wrong",