Files
Mekanism-Community-Edition/src/main/java/mekanism/client/nei/CombinerRecipeHandler.java
T
Ben Spiers ce6946c669 Massive recipe system overhaul.
They should be much more efficient now (this reduced the tick time of the CI Chamber by 3-4x in my testing), due to being able to just use the HashMap's get() instead of being limited to iterating through entries. NEI integration code now a lot more readable and type-safe as well.
2014-09-04 04:26:55 +01:00

62 lines
1.2 KiB
Java

package mekanism.client.nei;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import mekanism.api.gas.Gas;
import mekanism.api.util.ListUtils;
import mekanism.client.gui.GuiCombiner;
import mekanism.client.gui.GuiProgress.ProgressBar;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.CombinerRecipe;
import mekanism.common.util.MekanismUtils;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
public class CombinerRecipeHandler extends AdvancedMachineRecipeHandler
{
@Override
public String getRecipeName()
{
return MekanismUtils.localize("tile.MachineBlock.Combiner.name");
}
@Override
public String getRecipeId()
{
return "mekanism.combiner";
}
@Override
public String getOverlayIdentifier()
{
return "combiner";
}
@Override
public Collection<CombinerRecipe> getRecipes()
{
return Recipe.COMBINER.get().values();
}
@Override
public ProgressBar getProgressType()
{
return ProgressBar.STONE;
}
@Override
public List<ItemStack> getFuelStacks(Gas gasType)
{
return ListUtils.asList(new ItemStack(Blocks.cobblestone));
}
@Override
public Class getGuiClass()
{
return GuiCombiner.class;
}
}