Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static OritechRecipeBuilder build() {
public void validate(ResourceLocation id) throws IllegalStateException {
if (inputs != null && inputs.size() > 1)
throw new IllegalStateException("too many inputs for recipe " + id + " (type " + type + ")");
if ((fluidInput == null || fluidInput.isEmpty()))
if ((fluidInput == null || fluidInput.isEmpty()) && fluidOutputs.isEmpty())
throw new IllegalStateException("fluid input or output required for recipe " + id + " (type " + type + ")");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public void export(RecipeOutput exporter, String suffix) {
super.export(exporter, suffix);

if (addToGrinder)
GrinderRecipeBuilder.build().input(inputs).result(results).export(exporter, suffix);
// Grinder defaults to 20% more time (rounded to the nearest half second) than pulverizer, but can have more addons and often gets better results
// To have a different time, build the grinder recipe separately instead of using the .addToGrinder() method on the pulverizer recipe builder
GrinderRecipeBuilder.build().input(inputs).result(results).time((int)(Math.round(this.time * 1.2 / 10.0) * 10)).export(exporter, suffix);
}
}
13 changes: 11 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,20 @@ curios_version_id = 6401872
applied_energistics_version_id = 6399563
guideme_version_id = 6381915
create_version_id = 6323264
registrate_version = MC1.21-1.3.0+62
registrate_version = MC1.21-1.3.0+67
energized_power_neo_version_id = 6341211
enderio_version = 7.1.8-alpha
endergy_version = 8.0.0-alpha
enderio_version = 8.2.5-beta
evilcraft_version_id = 7827720
cyclopscore_version_id = 7786075
extendedae_version_id = 7727948
geore_version_id = 7563411
glodium_version_id = 5821676
immersive_engineering_version_id = 6235316
industrial_foregoing_version_id = 6283758
irons_spells_version_id = 6054197
caelus_version_id = 5694215
player_animator_version_id = 7389814
titanium_version_id = 6337206
mekanism_version = 1.21.1-10.7.14.79
pneumaticcraft_version_id = 6288626
Expand Down
19 changes: 16 additions & 3 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,30 @@ dependencies {
dataRuntimeOnly "curse.maven:guideme-1173950:$guideme_version_id"
// Create
dataImplementation "curse.maven:create-328085:$create_version_id"
dataCompileOnly "com.tterrag.registrate:Registrate:MC1.21-1.3.0+67"
dataCompileOnly "com.tterrag.registrate:Registrate:$registrate_version"
// Endergy
dataImplementation "com.enderio:endergy:$endergy_version"
// EnderIO
dataImplementation "com.enderio:enderio-base:$enderio_version"
dataImplementation("com.enderio:enderio-machines:$enderio_version") { transitive = false }
dataImplementation "com.enderio:enderio:$enderio_version"
// Energized Power
dataImplementation "curse.maven:energized-power-782147:$energized_power_neo_version_id"
// EvilCraft
dataImplementation "curse.maven:evilcraft-74610:$evilcraft_version_id"
dataRuntimeOnly "curse.maven:cyclops-core-232758:$cyclopscore_version_id"
// Extended AE
dataImplementation "curse.maven:ex-pattern-provider-892005:$extendedae_version_id"
dataRuntimeOnly "curse.maven:glodium-957920:$glodium_version_id"
// GeOre
dataImplementation "curse.maven:geore-530544:$geore_version_id"
// Immersive Engineering
dataImplementation "curse.maven:immersive-engineering-231951:$immersive_engineering_version_id"
// Industrial Foregoing
dataImplementation "curse.maven:industrial-foregoing-266515:$industrial_foregoing_version_id"
dataImplementation "curse.maven:titanium-287342:$titanium_version_id"
// Iron's Spells 'n Spellbooks
dataImplementation "curse.maven:irons-spells-n-spellbooks-855414:$irons_spells_version_id"
dataRuntimeOnly "curse.maven:playeranimator-658587:$player_animator_version_id"
dataRuntimeOnly "curse.maven:caelus-308989:$caelus_version_id"
// Mekanism
dataImplementation "curse.maven:mekanism-268560:6486993"
dataImplementation "curse.maven:mekanism-generators-268566:6486996"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.neoforged.neoforge.data.event.GatherDataEvent;
import rearth.oritech.generator.DataMapGenerator;
import rearth.oritech.generator.RecipeGenerator;
import rearth.oritech.generator.loot.FireCraftingLootProvider;

import java.util.Collections;
import java.util.List;
Expand All @@ -27,6 +26,5 @@ public static void gatherData(GatherDataEvent event) {

generator.addProvider(event.includeServer(), new RecipeGenerator(packOutput, lookupProvider));
generator.addProvider(event.includeServer(), new DataMapGenerator(packOutput, lookupProvider));
generator.addProvider(event.includeServer(), new LootTableProvider(packOutput, Collections.emptySet(), List.of(new LootTableProvider.SubProviderEntry(FireCraftingLootProvider::new, LootContextParamSets.EMPTY)), lookupProvider));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

import appeng.api.ids.AEConstants;
import blusunrize.immersiveengineering.ImmersiveEngineering;
import com.buuz135.industrial.utils.Reference;
import com.enderio.core.EnderCore;
import com.enderio.endergy.common.EnderIOEndergy;
import com.enderio.enderio.EnderIO;
import com.glodblock.github.extendedae.ExtendedAE;
import com.simibubi.create.Create;
import cy.jdkdigital.productivemetalworks.ProductiveMetalworks;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import io.redspace.ironsspellbooks.IronsSpellbooks;
import me.desht.pneumaticcraft.api.lib.Names;
import me.jddev0.ep.api.EPAPI;
import mekanism.common.Mekanism;
Expand All @@ -30,10 +32,15 @@
import rearth.oritech.generator.compat.ActuallyAdditionsRecipeGenerator;
import rearth.oritech.generator.compat.AppliedEnergistics2RecipeGenerator;
import rearth.oritech.generator.compat.CreateRecipeGenerator;
import rearth.oritech.generator.compat.EndergyRecipeGenerator;
import rearth.oritech.generator.compat.EnderIORecipeGenerator;
import rearth.oritech.generator.compat.EnergizedPowerRecipeGenerator;
import rearth.oritech.generator.compat.EvilCraftRecipeGenerator;
import rearth.oritech.generator.compat.ExtendedAERecipeGenerator;
import rearth.oritech.generator.compat.GeOreRecipeGenerator;
import rearth.oritech.generator.compat.ImmersiveEngineeringRecipeGenerator;
import rearth.oritech.generator.compat.IndustrialForegoingRecipeGenerator;
import rearth.oritech.generator.compat.IronsSpellbooksRecipeGenerator;
import rearth.oritech.generator.compat.MekanismRecipeGenerator;
import rearth.oritech.generator.compat.MekanismGeneratorsRecipeGenerator;
import rearth.oritech.generator.compat.PneumaticcraftRecipeGenerator;
Expand Down Expand Up @@ -65,10 +72,15 @@ public void buildRecipes(RecipeOutput exporter) {
ActuallyAdditionsRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(ActuallyAdditions.MODID)));
AppliedEnergistics2RecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(AEConstants.MOD_ID)));
CreateRecipeGenerator.generateRecipes(this, packOutput, registries, exporter.withConditions(this.modLoaded(Create.ID)));
EnderIORecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(EnderCore.MOD_ID)), this);
EndergyRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(EnderIOEndergy.MOD_ID)));
EnderIORecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(EnderIO.MOD_ID)), this);
EnergizedPowerRecipeGenerator.generateRecipes(this, exporter.withConditions(this.modLoaded(EPAPI.MOD_ID)));
EvilCraftRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(org.cyclops.evilcraft.Reference.MOD_ID)));
ExtendedAERecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(ExtendedAE.MODID)));
GeOreRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(com.shynieke.geore.Reference.MOD_ID)));
ImmersiveEngineeringRecipeGenerator.generateRecipes(this, exporter.withConditions(this.modLoaded(ImmersiveEngineering.MODID)));
IndustrialForegoingRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(Reference.MOD_ID)));
IndustrialForegoingRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(com.buuz135.industrial.utils.Reference.MOD_ID)));
IronsSpellbooksRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(IronsSpellbooks.MODID)));
MekanismRecipeGenerator.generateRecipes(this, exporter.withConditions(this.modLoaded(Mekanism.MODID)));
MekanismGeneratorsRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(MekanismGenerators.MODID)));
PneumaticcraftRecipeGenerator.generateRecipes(exporter.withConditions(this.modLoaded(Names.MOD_ID)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.world.item.crafting.Ingredient;
import net.neoforged.neoforge.common.Tags;
import rearth.oritech.Oritech;
import rearth.oritech.api.recipe.CentrifugeRecipeBuilder;
import rearth.oritech.api.recipe.LaserRecipeBuilder;
import rearth.oritech.api.recipe.PulverizerRecipeBuilder;
import rearth.oritech.init.ItemContent;
Expand All @@ -23,7 +24,12 @@ public static void generateRecipes(RecipeOutput exporter) {

PulverizerRecipeBuilder.build().input(AEBlocks.SKY_STONE_BLOCK).result(AEItems.SKY_DUST.get()).addToGrinder().export(exporter, PATH + "skydust");
PulverizerRecipeBuilder.build().input(cItemTag("gems/certus_quartz")).result(AEItems.CERTUS_QUARTZ_DUST.get()).addToGrinder().export(exporter, PATH + "certusdust");
PulverizerRecipeBuilder.build().input(cItemTag("gems/fluix")).result(AEItems.FLUIX_DUST.get()).addToGrinder().export(exporter, PATH + "fluixdust");

// enderic compound from ender pearl dust
CentrifugeRecipeBuilder.build().input(AEItems.ENDER_DUST).result(ItemContent.ENDERIC_COMPOUND, 2).export(exporter, PATH + "endericcompound");

// fluxite in AE2 charger
exporter.accept(Oritech.id(PATH + "charger/fluxite"), new ChargerRecipe(Ingredient.of(Tags.Items.GEMS_AMETHYST), new ItemStack(ItemContent.FLUXITE)), null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,58 @@
import java.util.List;
import java.util.Optional;

import com.enderio.base.common.init.EIOItems;
import com.enderio.base.common.recipe.FireCraftingRecipe;
import com.enderio.machines.common.blocks.alloy.AlloySmeltingRecipe;
import com.enderio.enderio.init.EIOFluids;
import com.enderio.enderio.init.EIOItems;
import com.enderio.enderio.content.machines.soul_binder.SoulBindingRecipe;
import com.enderio.enderio.content.machines.alloy.AlloySmeltingRecipe;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.data.recipes.RecipeOutput;
import net.minecraft.data.recipes.RecipeProvider;
import net.minecraft.data.recipes.ShapedRecipeBuilder;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.Level;
import net.neoforged.neoforge.common.Tags;
import net.neoforged.neoforge.common.crafting.SizedIngredient;
import rearth.oritech.Oritech;
import rearth.oritech.api.recipe.CentrifugeRecipeBuilder;
import rearth.oritech.api.recipe.CentrifugeFluidRecipeBuilder;
import rearth.oritech.api.recipe.PulverizerRecipeBuilder;
import rearth.oritech.api.recipe.FoundryRecipeBuilder;
import rearth.oritech.init.BlockContent;
import rearth.oritech.init.ItemContent;
import rearth.oritech.init.TagContent;
import rearth.oritech.generator.loot.FireCraftingLootProvider;
import rearth.oritech.util.FluidIngredient;

public class EnderIORecipeGenerator {
private static final String PATH = "compat/enderio/";

public static void generateRecipes(RecipeOutput exporter, RecipeProvider provider) {
addAlloys(exporter);
addDusts(exporter);
conduitBinderCrafting(exporter, provider);
soulBinding(exporter);

// enderic compound from ender pearl dust
CentrifugeRecipeBuilder.build().input(EIOItems.POWDERED_ENDER_PEARL.get()).result(ItemContent.ENDERIC_COMPOUND, 2).export(exporter, PATH + "endericcompound");

// xp juice from sculk
CentrifugeFluidRecipeBuilder.build().input(Items.SCULK).fluidInput(Fluids.WATER, 0.25f).fluidOutput(EIOFluids.XP_JUICE.source().get(), 0.1f).export(exporter, PATH + "sculkxp");
}

private static void addAlloys(RecipeOutput exporter) {
FoundryRecipeBuilder.build().input(Tags.Items.INGOTS_COPPER).input(TagContent.SILICON).result(EIOItems.COPPER_ALLOY_INGOT.get()).export(exporter, PATH + "copperalloy");
FoundryRecipeBuilder.build().input(Tags.Items.DUSTS_REDSTONE).input(TagContent.SILICON).result(EIOItems.REDSTONE_ALLOY_INGOT.get()).export(exporter, PATH + "redstonealloy");
FoundryRecipeBuilder.build().input(TagContent.ELECTRUM_INGOTS).input(Tags.Items.DUSTS_GLOWSTONE).result(EIOItems.ENERGETIC_ALLOY_INGOT.get()).export(exporter, PATH + "energeticalloy");
FoundryRecipeBuilder.build().input(EIOItems.ENERGETIC_ALLOY_INGOT.get()).input(Tags.Items.ENDER_PEARLS).result(EIOItems.VIBRANT_ALLOY_INGOT.get()).export(exporter, PATH + "vibrantalloy");
FoundryRecipeBuilder.build().input(Tags.Items.INGOTS_IRON).input(Tags.Items.ENDER_PEARLS).result(EIOItems.PULSATING_ALLOY_INGOT.get()).export(exporter, PATH + "pulsatingalloy");
FoundryRecipeBuilder.build().input(TagContent.STEEL_INGOTS).input(Tags.Items.OBSIDIANS_NORMAL).result(EIOItems.DARK_STEEL_INGOT.get()).export(exporter, PATH + "darksteel");
FoundryRecipeBuilder.build().input(Tags.Items.INGOTS_GOLD).input(ItemTags.SOUL_FIRE_BASE_BLOCKS).result(EIOItems.SOULARIUM_INGOT.get()).export(exporter, PATH + "soularium");
FoundryRecipeBuilder.build().input(Tags.Items.INGOTS_COPPER).input(Tags.Items.INGOTS_IRON).result(EIOItems.CONDUCTIVE_ALLOY_INGOT.get()).time(120).export(exporter, PATH + "conductivealloy");
FoundryRecipeBuilder.build().input(TagContent.ELECTRUM_INGOTS).input(EIOItems.CONDUCTIVE_ALLOY_INGOT.get()).result(EIOItems.ENERGETIC_ALLOY_INGOT.get()).time(150).export(exporter, PATH + "energeticalloy");
FoundryRecipeBuilder.build().input(Tags.Items.DUSTS_REDSTONE).input(Tags.Items.INGOTS_COPPER).result(EIOItems.REDSTONE_ALLOY_INGOT.get()).time(120).export(exporter, PATH + "redstonealloy");
FoundryRecipeBuilder.build().input(Tags.Items.INGOTS_IRON).input(Tags.Items.ENDER_PEARLS).result(EIOItems.PULSATING_ALLOY_INGOT.get(), 2).time(150).export(exporter, PATH + "pulsatingalloy");
FoundryRecipeBuilder.build().input(TagContent.STEEL_INGOTS).input(Tags.Items.OBSIDIANS_NORMAL).result(EIOItems.DARK_STEEL_INGOT.get()).time(120).export(exporter, PATH + "darksteel");
FoundryRecipeBuilder.build().input(Tags.Items.INGOTS_GOLD).input(ItemTags.SOUL_FIRE_BASE_BLOCKS).result(EIOItems.SOULARIUM_INGOT.get()).time(180).export(exporter, PATH + "soularium");

exporter.accept(Oritech.id(PATH + "alloy/adamant"), new AlloySmeltingRecipe(List.of(new SizedIngredient(Ingredient.of(TagContent.NICKEL_INGOTS), 1), new SizedIngredient(Ingredient.of(Tags.Items.GEMS_DIAMOND), 1)), new ItemStack(ItemContent.ADAMANT_INGOT), 3200, 0.3f), null);
exporter.accept(Oritech.id(PATH + "alloy/steel"), new AlloySmeltingRecipe(List.of(new SizedIngredient(Ingredient.of(Tags.Items.INGOTS_IRON), 1), new SizedIngredient(Ingredient.of(TagContent.COAL_DUSTS), 1)), new ItemStack(ItemContent.STEEL_INGOT), 3200, 0.3f), null);
Expand All @@ -53,6 +65,20 @@ private static void addAlloys(RecipeOutput exporter) {
exporter.accept(Oritech.id(PATH + "alloy/energite"), new AlloySmeltingRecipe(List.of(new SizedIngredient(Ingredient.of(TagContent.NICKEL_INGOTS), 1), new SizedIngredient(Ingredient.of(ItemContent.FLUXITE), 1)), new ItemStack(ItemContent.ENERGITE_INGOT), 3200, 0.3f), null);
}

private static void addDusts(RecipeOutput exporter) {
// powdered obsidian from obsidian
// EnderIO and Mekanism recipes are both equivalent, and both mods can use either obsidian dust. Loading both recipes shouldn't be a problem.
PulverizerRecipeBuilder.build().input(Tags.Items.OBSIDIANS).result(EIOItems.POWDERED_OBSIDIAN.get(), 4).time(140).addToGrinder().export(exporter, PATH + "dust/obsidian");

PulverizerRecipeBuilder.build().input(Tags.Items.GEMS_LAPIS).result(EIOItems.POWDERED_LAPIS_LAZULI.get()).time(120).addToGrinder().export(exporter, PATH + "dust/lapis");
PulverizerRecipeBuilder.build().input(EIOItems.PRESCIENT_CRYSTAL).result(EIOItems.PRESCIENT_POWDER.get()).time(120).addToGrinder().export(exporter, PATH + "dust/prescient");
PulverizerRecipeBuilder.build().input(EIOItems.VIBRANT_CRYSTAL).result(EIOItems.VIBRANT_POWDER.get()).time(120).addToGrinder().export(exporter, PATH + "dust/vibrant");
PulverizerRecipeBuilder.build().input(EIOItems.PULSATING_CRYSTAL).result(EIOItems.PULSATING_POWDER.get()).time(120).addToGrinder().export(exporter, PATH + "dust/piezal");
PulverizerRecipeBuilder.build().input(EIOItems.ENDER_CRYSTAL).result(EIOItems.ENDER_CRYSTAL_POWDER.get()).time(120).addToGrinder().export(exporter, PATH + "dust/endgrain");
PulverizerRecipeBuilder.build().input(EIOItems.SOULARIUM_INGOT).result(EIOItems.SOUL_POWDER.get()).time(120).addToGrinder().export(exporter, PATH + "dust/soul");
PulverizerRecipeBuilder.build().input(Items.WITHER_SKELETON_SKULL).result(EIOItems.WITHERING_POWDER.get()).time(120).addToGrinder().export(exporter, PATH + "dust/withering");
}

private static void conduitBinderCrafting(RecipeOutput exporter, RecipeProvider provider) {
var conduitBinder = EIOItems.CONDUIT_BINDER.get();
createInsulatedCableRecipe(RecipeCategory.MISC,
Expand All @@ -71,4 +97,22 @@ private static void conduitBinderCrafting(RecipeOutput exporter, RecipeProvider
.pattern("sbs")
.unlockedBy(provider.getHasName(conduitBinder), RecipeProvider.has(conduitBinder)).save(exporter, Oritech.id(PATH + "crafting/pump"));
}

private static void soulBinding(RecipeOutput exporter) {
// Kind of redundant, but still fun. A soul vial is filled the exact same way a dubious container is--by "capturing" an entity with the item.
for (EntityType entityType : List.of(EntityType.ALLAY, EntityType.VEX, EntityType.PHANTOM)) {
var entityKey = BuiltInRegistries.ENTITY_TYPE.getKey(entityType);
exporter.accept(
Oritech.id(PATH + entityKey.getPath() + "soul"),
new SoulBindingRecipe(
new ItemStack(ItemContent.UNHOLY_INTELLIGENCE),
Ingredient.of(ItemContent.DUBIOS_CONTAINER),
51200,
4,
Optional.of(entityKey),
Optional.empty(),
Optional.empty(),
false), null);
}
}
}
Loading
Loading