mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
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:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user