Search in sources :

Example 1 with CrTGasStack

use of mekanism.common.integration.crafttweaker.chemical.CrTChemicalStack.CrTGasStack in project Mekanism by mekanism.

the class PressurizedReactionRecipeManager method getAction.

@Override
protected ActionAddMekanismRecipe getAction(PressurizedReactionRecipe recipe) {
    return new ActionAddMekanismRecipe(recipe) {

        @Override
        protected String describeOutputs() {
            Pair<List<@NonNull ItemStack>, @NonNull GasStack> output = getRecipe().getOutputDefinition();
            StringBuilder builder = new StringBuilder();
            List<ItemStack> itemOutputs = output.getLeft();
            if (!itemOutputs.isEmpty()) {
                builder.append("item: ").append(CrTUtils.describeOutputs(itemOutputs, ItemStackHelper::getCommandString));
            }
            GasStack gasOutput = output.getRight();
            if (!gasOutput.isEmpty()) {
                if (!itemOutputs.isEmpty()) {
                    builder.append("; ");
                }
                builder.append("gas: ").append(new CrTGasStack(gasOutput));
            }
            return builder.toString();
        }
    };
}
Also used : NonNull(mekanism.api.annotations.NonNull) List(java.util.List) CrTGasStack(mekanism.common.integration.crafttweaker.chemical.CrTChemicalStack.CrTGasStack) ICrTGasStack(mekanism.common.integration.crafttweaker.chemical.ICrTChemicalStack.ICrTGasStack) GasStack(mekanism.api.chemical.gas.GasStack) IItemStack(com.blamejared.crafttweaker.api.item.IItemStack) ItemStack(net.minecraft.item.ItemStack) CrTGasStack(mekanism.common.integration.crafttweaker.chemical.CrTChemicalStack.CrTGasStack) ICrTGasStack(mekanism.common.integration.crafttweaker.chemical.ICrTChemicalStack.ICrTGasStack)

Example 2 with CrTGasStack

use of mekanism.common.integration.crafttweaker.chemical.CrTChemicalStack.CrTGasStack in project Mekanism by mekanism.

the class RotaryRecipeManager method getAction.

@Override
protected ActionAddMekanismRecipe getAction(RotaryRecipe recipe) {
    return new ActionAddMekanismRecipe(recipe) {

        @Override
        protected String describeOutputs() {
            RotaryRecipe recipe = getRecipe();
            StringBuilder builder = new StringBuilder();
            if (recipe.hasFluidToGas()) {
                builder.append(CrTUtils.describeOutputs(recipe.getGasOutputDefinition(), CrTGasStack::new)).append(" for fluid to gas");
            }
            if (recipe.hasGasToFluid()) {
                if (recipe.hasFluidToGas()) {
                    builder.append(" and ");
                }
                builder.append(CrTUtils.describeOutputs(recipe.getFluidOutputDefinition(), MCFluidStack::new)).append(" for gas to fluid");
            }
            return builder.toString();
        }
    };
}
Also used : MCFluidStack(com.blamejared.crafttweaker.impl.fluid.MCFluidStack) RotaryRecipe(mekanism.api.recipes.RotaryRecipe) CrTGasStack(mekanism.common.integration.crafttweaker.chemical.CrTChemicalStack.CrTGasStack) ICrTGasStack(mekanism.common.integration.crafttweaker.chemical.ICrTChemicalStack.ICrTGasStack)

Aggregations

CrTGasStack (mekanism.common.integration.crafttweaker.chemical.CrTChemicalStack.CrTGasStack)2 ICrTGasStack (mekanism.common.integration.crafttweaker.chemical.ICrTChemicalStack.ICrTGasStack)2 IItemStack (com.blamejared.crafttweaker.api.item.IItemStack)1 MCFluidStack (com.blamejared.crafttweaker.impl.fluid.MCFluidStack)1 List (java.util.List)1 NonNull (mekanism.api.annotations.NonNull)1 GasStack (mekanism.api.chemical.gas.GasStack)1 RotaryRecipe (mekanism.api.recipes.RotaryRecipe)1 ItemStack (net.minecraft.item.ItemStack)1