Added chance machine JEI support, added fuel display to advanced machine JEI handlers, add classes for remaining machinery

This commit is contained in:
aidancbrady committed 2016-05-20 01:16:10 -04:00
1 parent bdc071582f
commit a2143cc81c
46 files changed
+513 -8

No files matched your search

@@ -1,5 +1,46 @@
package mekanism.client.jei.machine;
public class ChanceMachineRecipeHandler {
import javax.annotation.Nonnull;
import mezz.jei.api.recipe.IRecipeHandler;
import mezz.jei.api.recipe.IRecipeWrapper;
public class ChanceMachineRecipeHandler<T extends ChanceMachineRecipeWrapper> implements IRecipeHandler<T>
{
private final ChanceMachineRecipeCategory category;
public Class<T> wrapperClass;
public ChanceMachineRecipeHandler(ChanceMachineRecipeCategory c, Class<T> wrapper)
{
category = c;
wrapperClass = wrapper;
}
@Override
public Class<T> getRecipeClass()
{
return wrapperClass;
}
@Nonnull
@Override
public String getRecipeCategoryUid()
{
return category.getUid();
}
@Nonnull
@Override
public IRecipeWrapper getRecipeWrapper(@Nonnull T recipe)
{
return recipe;
}
@Override
public boolean isRecipeValid(@Nonnull T recipe)
{
return recipe.category == category;
}
}