mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-23 13:29:40 +00:00
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.
62 lines
1.2 KiB
Java
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;
|
|
}
|
|
}
|