public void checkRecipe() { if (world.isRemote) { return; } if (CarpenterRecipeManager.matches(currentRecipe, resourceTank.getFluid(), getBoxStack(), craftingInventory) == null) { RecipePair<ICarpenterRecipe> recipePair = CarpenterRecipeManager.findMatchingRecipe(resourceTank.getFluid(), getBoxStack(), craftingInventory); currentRecipe = recipePair.getRecipe(); oreDicts = recipePair.getOreDictEntries(); if (!recipePair.isEmpty()) { int recipeTime = currentRecipe.getPackagingTime(); setTicksPerWorkCycle(recipeTime * TICKS_PER_RECIPE_TIME); setEnergyPerWorkCycle(recipeTime * ENERGY_PER_RECIPE_TIME); ItemStack craftingResult = currentRecipe.getCraftingGridRecipe().getOutput(); craftPreviewInventory.setInventorySlotContents(0, craftingResult); } else { craftPreviewInventory.setInventorySlotContents(0, ItemStack.EMPTY); } } }