mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Added chance machine JEI support, added fuel display to advanced machine JEI handlers, add classes for remaining machinery
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user