Search in sources :

Example 1 with EnumGateLogic

use of buildcraft.transport.gate.EnumGateLogic in project BuildCraft by BuildCraft.

the class BCTransportRecipes method makeGateModifierAssembly.

private static void makeGateModifierAssembly(int multiplier, EnumGateMaterial material, EnumGateModifier modifier, IngredientStack... mods) {
    for (EnumGateLogic logic : EnumGateLogic.VALUES) {
        String name = String.format("gate-modifier-%s-%s-%s", logic, material, modifier);
        ItemStack toUpgrade = BCTransportItems.plugGate.getStack(new GateVariant(logic, material, EnumGateModifier.NO_MODIFIER));
        ItemStack output = BCTransportItems.plugGate.getStack(new GateVariant(logic, material, modifier));
        ImmutableSet<IngredientStack> input = new ImmutableSet.Builder<IngredientStack>().add(IngredientStack.of(toUpgrade)).add(mods).build();
        AssemblyRecipeRegistry.register((new AssemblyRecipeBasic(name, MjAPI.MJ * multiplier, input, output)));
    }
}
Also used : AssemblyRecipeBasic(buildcraft.api.recipes.AssemblyRecipeBasic) ImmutableSet(com.google.common.collect.ImmutableSet) GateVariant(buildcraft.transport.gate.GateVariant) ItemStack(net.minecraft.item.ItemStack) IngredientStack(buildcraft.api.recipes.IngredientStack) EnumGateLogic(buildcraft.transport.gate.EnumGateLogic)

Aggregations

AssemblyRecipeBasic (buildcraft.api.recipes.AssemblyRecipeBasic)1 IngredientStack (buildcraft.api.recipes.IngredientStack)1 EnumGateLogic (buildcraft.transport.gate.EnumGateLogic)1 GateVariant (buildcraft.transport.gate.GateVariant)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 ItemStack (net.minecraft.item.ItemStack)1