// TODO: WHAT HAPPENS IF FINAL COUNT IS 63 AND WE SMELT DOUBLE?
private void craftRecipe( Recipe<?> currentRecipe)
    {
        if (currentRecipe != null && this.canAcceptRecipeOutput(currentRecipe))
        {
            ItemStack inputStack = this.inventory.get(0);
            ItemStack outputStack = this.inventory.get(2);
            ItemStack recipeResultStack = currentRecipe.getOutput();
            int resultCount = world.random.nextInt(100) < dupeChance100 ? 2 : 1;
            if (outputStack.isEmpty())
            {
                ItemStack newResultStack = recipeResultStack.copy();
                newResultStack.setAmount(resultCount);
                this.inventory.set(2, newResultStack);
            }
            else if (outputStack.getItem() == recipeResultStack.getItem())
            {
                // TODO: WHAT HAPPENS IF FINAL COUNT IS 63 AND WE SMELT DOUBLE?
                outputStack.addAmount(resultCount);
            }
            if (!this.world.isClient)
                this.setLastRecipe(currentRecipe);
            if (inputStack.getItem() == Blocks.WET_SPONGE.getItem() && !((ItemStack) this.inventory.get(1)).isEmpty() && ((ItemStack) this.inventory.get(1)).getItem() == Items.BUCKET)
            {
                this.inventory.set(1, new ItemStack(Items.WATER_BUCKET));
            }
            inputStack.subtractAmount(1);
        }
    }
else if (outputStack.getItem() == recipeResultStack.getItem())
{
// TODO: WHAT HAPPENS IF FINAL COUNT IS 63 AND WE SMELT DOUBLE?
outputStack.addAmount(resultCount);
}
ItemStack recipeResultStack = currentRecipe.getOutput();
int resultCount = world.random.nextInt(100) < dupeChance100 ? 2 : 1;
if (outputStack.isEmpty())
{
ItemStack newResultStack = recipeResultStack.copy();
newResultStack.setAmount(resultCount);
this.inventory.set(2, newResultStack);
}
else if (outputStack.getItem() == recipeResultStack.getItem())
{
// TODO: WHAT HAPPENS IF FINAL COUNT IS 63 AND WE SMELT DOUBLE?
outputStack.addAmount(resultCount);
}
if (!this.world.isClient)
this.setLastRecipe(currentRecipe);
if (inputStack.getItem() == Blocks.WET_SPONGE.getItem() && !((ItemStack) this.inventory.get(1)).isEmpty() && ((ItemStack) this.inventory.get(1)).getItem() == Items.BUCKET)
{
this.inventory.set(1, new ItemStack(Items.WATER_BUCKET));
}
inputStack.subtractAmount(1);
}
private void craftRecipe( Recipe<?> currentRecipe)
{
if (currentRecipe != null && this.canAcceptRecipeOutput(currentRecipe))
{
ItemStack inputStack = this.inventory.get(0);
ItemStack outputStack = this.inventory.get(2);
ItemStack recipeResultStack = currentRecipe.getOutput();
int resultCount = world.random.nextInt(100) < dupeChance100 ? 2 : 1;
if (outputStack.isEmpty())
{
ItemStack newResultStack = recipeResultStack.copy();
newResultStack.setAmount(resultCount);
this.inventory.set(2, newResultStack);
}
else if (outputStack.getItem() == recipeResultStack.getItem())
{
// TODO: WHAT HAPPENS IF FINAL COUNT IS 63 AND WE SMELT DOUBLE?
outputStack.addAmount(resultCount);
}
if (!this.world.isClient)
this.setLastRecipe(currentRecipe);
if (inputStack.getItem() == Blocks.WET_SPONGE.getItem() && !((ItemStack) this.inventory.get(1)).isEmpty() && ((ItemStack) this.inventory.get(1)).getItem() == Items.BUCKET)
{
this.inventory.set(1, new ItemStack(Items.WATER_BUCKET));
}
inputStack.subtractAmount(1);
}
}