mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-11-14 19:25:13 -05:00
Implement remaining IE handler
This commit is contained in:
parent
804cd45128
commit
eddbd81739
4 changed files with 21 additions and 5 deletions
|
@ -4,6 +4,7 @@ public class RecipeConstants {
|
|||
public static final String ITEM = "item";
|
||||
public static final String TAG = "tag";
|
||||
public static final String INPUT = "input";
|
||||
public static final String INPUTS = "inputs";
|
||||
public static final String INGREDIENT = "ingredient";
|
||||
public static final String INGREDIENTS = "ingredients";
|
||||
public static final String OUTPUT = "output";
|
||||
|
|
|
@ -11,7 +11,7 @@ public class AlmostUnifiedRuntimeForge extends AlmostUnifiedRuntime {
|
|||
|
||||
@Override
|
||||
protected void onRun() {
|
||||
if(AlmostUnifiedPlatform.INSTANCE.isModLoaded(ModConstants.IE)) {
|
||||
if (AlmostUnifiedPlatform.INSTANCE.isModLoaded(ModConstants.IE)) {
|
||||
IEModPriorityOverride.overrideModPriorities(modPriorities).run();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,10 +18,19 @@ public class IERecipeHandler implements RecipeHandler {
|
|||
|
||||
@Override
|
||||
public void transformRecipe(JsonObject json, RecipeContext context) {
|
||||
// alloy recipes
|
||||
replaceIEIngredient(json.get("input0"), context);
|
||||
replaceIEIngredient(json.get("input1"), context);
|
||||
replaceIEResult(json.get("secondaries"), context);
|
||||
|
||||
replaceIEIngredient(json.get("input0"), context); // alloy recipes, refinery
|
||||
replaceIEIngredient(json.get("input1"), context); // alloy recipes, refinery
|
||||
replaceIEIngredient(json.get(RecipeConstants.INPUT),
|
||||
context); // arc furnace, squeezer, cloche, coke oven, fermenter, fertilizer, metal_press
|
||||
replaceIEIngredient(json.get("additives"), context); // arc furnace
|
||||
replaceIEIngredient(json.get(RecipeConstants.INPUTS), context); // blueprint, mixer
|
||||
|
||||
replaceIEResult(json.get("secondaries"), context); // alloy recipes, crusher
|
||||
|
||||
JsonUtils.arrayForEach(json.get("secondaries"), JsonObject.class, secondary -> {
|
||||
replaceIEResult(secondary.get(RecipeConstants.OUTPUT), context);
|
||||
});
|
||||
|
||||
replaceIEResult(json.get(RecipeConstants.RESULT), context);
|
||||
replaceIEResult(json.get(RecipeConstants.RESULTS), context);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.almostreliable.unified.compat;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
Loading…
Reference in a new issue