private void updateRecipeOutputDisplay() { if (internalInventoryCrafting == null || currentRecipe == null) { craftResult.setInventorySlotContents(0, null); return; } ItemStack resultStack = getRecipeOutput(); if (resultStack == null) { internalInventoryCrafting.recipeUpdate(true); resultStack = getRecipeOutput(); internalInventoryCrafting.recipeUpdate(false); } craftResult.setInventorySlotContents(0, resultStack); markDirty(); }
@Override public double getRequiredEnergy() { return craftResult.getStackInSlot(0) != null ? REQUIRED_POWER : 0f; }
@Override public void markDirty() { super.markDirty(); craftable = craftResult.getStackInSlot(0) != null; }