Add some mekanism recipe keys

This commit is contained in:
LLytho 2022-11-30 18:32:17 +01:00
parent 849c8323f4
commit 220521df08
4 changed files with 22 additions and 1 deletions

View file

@ -5,6 +5,7 @@ public final class ModConstants {
public static final String IE = "immersiveengineering";
public static final String AMETHYST_IMBUEMENT = "amethyst_imbuement";
public static final String AD_ASTRA = "ad_astra";
public static final String MEKANISM = "mekanism";
private ModConstants() {}
}

View file

@ -18,6 +18,9 @@ public final class RecipeConstants {
public static final String ADDITIVES = "additives";
public static final String SECONDARIES = "secondaries";
public static final String SLAG = "slag";
public static final String MAIN_INPUT = "mainInput";
public static final String MAIN_OUTPUT = "mainOutput";
public static final String SECONDARY_OUTPUT = "secondaryOutput";
private RecipeConstants() {}
private RecipeConstants() {}
}

View file

@ -3,6 +3,7 @@ package com.almostreliable.unified;
import com.almostreliable.unified.api.ModConstants;
import com.almostreliable.unified.compat.AdAstraRecipeUnifier;
import com.almostreliable.unified.compat.IERecipeUnifier;
import com.almostreliable.unified.compat.MekanismRecipeUnifier;
import com.almostreliable.unified.recipe.unifier.RecipeHandlerFactory;
import com.almostreliable.unified.utils.UnifyTag;
import com.google.auto.service.AutoService;
@ -59,6 +60,7 @@ public class AlmostUnifiedPlatformForge implements AlmostUnifiedPlatform {
@Override
public void bindRecipeHandlers(RecipeHandlerFactory factory) {
factory.registerForMod(ModConstants.AD_ASTRA, new AdAstraRecipeUnifier());
factory.registerForMod(ModConstants.MEKANISM, new MekanismRecipeUnifier());
factory.registerForMod(ModConstants.IE, new IERecipeUnifier());
}

View file

@ -0,0 +1,15 @@
package com.almostreliable.unified.compat;
import com.almostreliable.unified.api.recipe.RecipeConstants;
import com.almostreliable.unified.api.recipe.RecipeUnifier;
import com.almostreliable.unified.api.recipe.RecipeUnifierBuilder;
public class MekanismRecipeUnifier implements RecipeUnifier {
@Override
public void collectUnifier(RecipeUnifierBuilder builder) {
builder.put(RecipeConstants.MAIN_INPUT, (json, ctx) -> ctx.createIngredientReplacement(json));
builder.put(RecipeConstants.MAIN_OUTPUT, (json, ctx) -> ctx.createResultReplacement(json));
builder.put(RecipeConstants.SECONDARY_OUTPUT, (json, ctx) -> ctx.createResultReplacement(json));
}
}