use of crazypants.enderio.base.recipe.soul.ISoulBinderRecipe in project EnderIO by SleepyTrousers.
the class TileSoulBinder method canStartNextTask.
@Override
protected IMachineRecipe canStartNextTask(long nextSeed) {
IMachineRecipe recipe = super.canStartNextTask(nextSeed);
if (recipe == null) {
return null;
}
int xpRequired = ((ISoulBinderRecipe) recipe).getExperienceRequired();
if (xpCont.getExperienceTotal() >= xpRequired) {
return recipe;
}
return null;
}
use of crazypants.enderio.base.recipe.soul.ISoulBinderRecipe in project EnderIO by SleepyTrousers.
the class SoulBinderRecipeCategory method register.
@SuppressWarnings("null")
public static void register(IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new SoulBinderRecipeCategory(guiHelper));
registry.handleRecipes(ISoulBinderRecipe.class, SoulBinderRecipeWrapper::new, SoulBinderRecipeCategory.UID);
registry.addRecipeClickArea(GuiSoulBinder.class, 155, 42, 16, 16, SoulBinderRecipeCategory.UID);
registry.addRecipeCategoryCraftingItem(new ItemStack(block_soul_binder.getBlockNN()), SoulBinderRecipeCategory.UID);
registry.addRecipes(MachineRecipeRegistry.instance.getRecipesForMachine(MachineRecipeRegistry.SOULBINDER).values().stream().filter(r -> r instanceof ISoulBinderRecipe).collect(Collectors.toList()), UID);
registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerSoulBinder.class, SoulBinderRecipeCategory.UID, FIRST_RECIPE_SLOT, NUM_RECIPE_SLOT, FIRST_INVENTORY_SLOT, NUM_INVENTORY_SLOT);
}
Aggregations