@Override public void updateEntity() { super.updateEntity(); if (items[0] != null && items[1] != null && ticksLeft == 0) { FluidRecipe2_1 r = RecipesLiquifier.getRecipeFromStack(items[0], items[1]); if (r != null) { maxTicks = r.getTime(); } } if (ticksLeft < maxTicks && RecipesLiquifier.getRecipeFromStack(items[0], items[1]) != null) { if (RecipesLiquifier.getRecipeFromStack(items[0], items[1]) .getOutput() .getFluid() .equals(tank.getFluid())) { ticksLeft++; worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); } else { ticksLeft = 0; resetTimeAndTexture(); } } if (RecipesLiquifier.getRecipeFromStack(items[0], items[1]) == null && ticksLeft > 0) { ticksLeft = 0; resetTimeAndTexture(); } if (ticksLeft == maxTicks && maxTicks != 0) { ticksLeft = 0; liquify(); } }