@Override protected String getRecipeInfo() { return LogHelper.getStackDescription(recipe.getInput()); } }
@Nullable public static ICentrifugeRecipe findMatchingRecipe(ItemStack itemStack) { if (itemStack.isEmpty()) { return null; } for (ICentrifugeRecipe recipe : recipes) { ItemStack recipeInput = recipe.getInput(); if (ItemStackUtil.isCraftingEquivalent(recipeInput, itemStack)) { return recipe; } } return null; }
@Override public boolean checkIsRecipe(ICentrifugeRecipe recipe) { return recipe != null && matches(input, toIItemStack(recipe.getInput())); } }
@Override public void getIngredients(IIngredients ingredients) { ICentrifugeRecipe recipe = getRecipe(); ingredients.setInputs(ItemStack.class, Collections.singletonList(recipe.getInput())); Set<ItemStack> outputs = recipe.getAllProducts().keySet(); ingredients.setOutputs(ItemStack.class, new ArrayList<>(outputs)); } }
public static void getCentrifugeOutputs(ItemStack inputStack, NonNullList<ItemStack> outputItems) { for (ICentrifugeRecipe recipe : RecipeManagers.centrifugeManager.recipes()) { if (inputStack.isItemEqual(recipe.getInput())) { outputItems.addAll(recipe.getAllProducts().keySet()); } } }