Loads of JEI work- got basic machine and advanced machine stuff mostly working, still need to do chance machines and everything else

This commit is contained in:
aidancbrady committed 2016-05-19 23:22:46 -04:00
1 parent be863a4289
commit bdc071582f
32 files changed
+845 -8

No files matched your search

@@ -0,0 +1,46 @@
package mekanism.client.jei.machine;
import javax.annotation.Nonnull;
import mezz.jei.api.recipe.IRecipeHandler;
import mezz.jei.api.recipe.IRecipeWrapper;
public class AdvancedMachineRecipeHandler<T extends AdvancedMachineRecipeWrapper> implements IRecipeHandler<T>
{
private final AdvancedMachineRecipeCategory category;
public Class<T> wrapperClass;
public AdvancedMachineRecipeHandler(AdvancedMachineRecipeCategory 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;
}
}