public void finishRecipe(){
ItemStack out = getOutput(itemHandler.getStackInSlot(0),itemHandler.getStackInSlot(1),itemHandler.getStackInSlot(2),itemHandler.getStackInSlot(3));
itemHandler.insertItem(4, out, false);
for(int i = 0; i < 4; i++){
itemHandler.extractItem(i, 1, false); // first extract and then look it up that will trow a npe. so move this down
essence_stored += getEssenceOutput(itemHandler.getStackInSlot(0),itemHandler.getStackInSlot(1),itemHandler.getStackInSlot(2),itemHandler.getStackInSlot(3)).getAmount();
essence_type = getEssenceOutput(itemHandler.getStackInSlot(0),itemHandler.getStackInSlot(1),itemHandler.getStackInSlot(2),itemHandler.getStackInSlot(3)).getType();
//---Something to write to NBT here---
}
}